Month: March 2021

MTU Probing

We’ve had a number of very strange network problems lately — Zoneminder cannot talk to cameras, clients veg out talking to Myth, Twonky is non-functional (even the web page — you get enough of the header to have a title, but the page just hangs, Scott cannot get to our Discourse site. And, more frustratingly, he cannot SSH to some of our hosts. Using “ssh -v” and throwing on a bunch of flags to not attempt key auth (-o PasswordAuthentication=yes -o PreferredAuthentications=keyboard-interactive,password -o PubkeyAuthentication=no) and his connection still hung. But, at least, I could see something. The last thing the SSH connection reported is:

debug1: expecting SSH2_MSG_KEX_ECDH_REPLY

Which I’ve seen before … fortunately when I had a great Unix support guy working in the same office building that I did. Who let me stop over and bounce really oddball problems off of him. He told me to enable mtu probing.

echo 1 >/proc/sys/net/ipv4/tcp_mtu_probing

And, if that doesn’t work, use “echo 2”. Which …. yeah, wouldn’t have been any of my first thirty guesses. Cloudflare published a good article on what exactly MTU path discovery is, and I can RTFM enough to figure out what I’ve set here. But no idea what’s got a smaller MTU than our computers.

 

tcp_mtu_probing - INTEGER
	Controls TCP Packetization-Layer Path MTU Discovery.  
	  0 - Disabled
	  1 - Disabled by default, enabled when an ICMP black hole detected
	  2 - Always enabled, use initial MSS of tcp_base_mss.

55 Days of Grilling: Day 12 – Breakfast

I made grilled french toast this morning — 4 eggs, 1 tsp cinnamon, 1/4 cup maple syrup, 1 tbsp vanilla, 1/4 tsp nutmeg, and 1/2 cup milk. Dipped the bread in the mix, heated in a pan until the egg solidified, then moved to the grill to toast. This crisped up the bread quite nicely, and we got a custard-like inner bread with a slight crunch on the outside.

Served with fresh maple syrup. Very tasty!

Google OAUTH Stuff

Reminder to self — when you set up a desktop app with OAUTH to use the Google APIs … you have to hit the authorization URL from the computer running the code. That means, for my calendar scraper, that I need to do X-redirection from the server & run the script. Firefox launches & the flow actually completes. Attempting to hit the URL from my computer yields a connection failure to the https://localhost:SomePort at the end of the workflow.

Move token.pickle to backup file, run getCalendarEvents.py with X-redirection so auth can be processed through web form.

55 Days of Grilling: Day 11

Tonight, we made cubano sandwiches using the pork roast from last night. Pork, ham, swiss cheese, and pickle on Cuban bread. Butter outsides of bread before … well, normally pressing in a panini press. But, in this case, before grilling for a few minutes to get the bread toast and melt the cheese.

Cuban bread uses a poolish — 1/4 cup flour, 1/4 cup water, and 1/2 tsp yeast. That sits overnight (12+ hours). Add 1 cup water, 1.5 tsp salt, 1.5 tsp sugar, 1 Tbsp oil (traditionally lard), 1.5 tsp yeast, and 3 cups flour. Mix and kneed — add up to an additional 1/2 cup flour to form a dough ball. Let sit in a warm place for 1-2 hrs to raise. Deflate the dough and let raise for another hour. Form into two logs and embed a metal skewer in the top. Cover with a clean towel and let raise for 30 minutes. After 30 minutes, preheat oven to 400F. Bake for 25 minutes.

Remove skewers

55 Days of Grilling: Day 10

I made a braised pork today — cooked at ~300 degrees for about six hours. A few days ago, I mixed up a marinade for the bone-in pork roast.

  • 2 Tbsp kosher salt
  • 4 Tbsp maple syrup
  • 1 Tbsp ground mustard
  • 1/2 cup Dijon mustard
  • 2 Tbsp freshly ground black pepper
  • 1 Tbsp smoked sweet paprika
  • 1/2 cup vegetable oil

I coated the roast in the marinade then vacuum packaged it. Six hours was too long — a more marbled roast might have been fine, but the one we had got dry. Drizzling it with maple syrup helped!

Python: dir

I am writing this down because I never manage to remember these two super useful functions that tells you what a variable is.

iLastProcessedTimestamp = 0
with open(‘test.txt’) as f:
iLastProcessedTimestamp = int(f.readline())
print(dir(iLastProcessedTimestamp))
print(type(iLastProcessedTimestamp))

The type function tells you the variable’s class (in this case, int). The dir function tells you the attributes of the variable.