Wednesday, March 14, 2018

A Tree Fell On The House

True story.  See pictures.  We have had a series of storms in the Boston area and the one that occurred on March 8th, 2018 was so strong it took a tree down in front of our house and it fell on the house.  This happened at 2:30 AM.  I was actually up because our storm door (which is broken for other reasons) was banging back and forth in the 110 km/h winds.  I was trying to tie that down for the night so it would not cause more damage.  After I tied it down, I went to my computer to pull up and check on the storm for the rest of the night.  During this time, the tree came down.  I ran upstairs as fast as I could to check on everyone.  There were no injuries.

Some highlights of the incident:
  • The top of the tree came down on the right third of our roof.  Branches went through the roof in to the attic and a large branch went through the wall in to our bedroom.  There were no broken windows, surprisingly.  The tree has done a lot of damage to the roof, siding, and gutters.
  • The trunk feel basically right next to the house and when it came down, it pulled the rest of the tree off the roof.  It also took our our fiber line and electric service.
  • The tree was a very old city owned tree.  A maple, I think.  It had been significantly trimmed over the years and was also rotten in the middle.
  • Power was out for 4 days and Internet service was out for 5 days.  The electric service damage was on the customer side and I had to get our electrician to repair our service drop.  The hard part was getting National Grid to reconnect service.
We have had emergency roof patching done, but there is a lot of repair work still to do.  Especially on the inside.  We have since had another storm that dumped 60 cm of snow on us.  The insurance company has rescheduled to come and inspect things.

While we had no power, we could not run the oil burner so we had no heat.  We ended up staying at a hotel.  This was frustrating because it was difficult to determine how long we needed to plan to be in the hotel.  The insurance company was willing to pay but they wanted to know how many days.  The power company would not give a restore estimate either.

We have a lot of public shade trees on our street.  In Massachusetts, public shade trees are owned by the city or town you live in and are the responsibility of the municipality.  By law, every municipality must have a full time tree warden who must meet certain qualifications and maintain the trees (why they don't call this position the lorax is beyond me).  Because of this, private citizens are not permitted to do any tree trimming or removal.  This makes sense to me because (a) the trees are not on your property and (b) proper trimming and removal in a dense environment requires skills that the average person with a chainsaw won't have.

We have two more city trees that overhang our property, so I have asked the tree warden to inspect these for either trimming or removal.  You usually don't have to ask, but since there are a lot of trees and only one person checking them out they sort of wait for trees to present major hazards before doing anything about them.

In case something like this happens again, I have ordered a backup generator and am having a transfer switch installed to run a subset of critical house things.

Saturday, February 24, 2018

Wireless Access Points

At home we use a Ubiquity UniFi access point.  These are commerical grade access points designed to be used as part of a very large network of access points.  Think hotels, airports, and office buildings.  But one of them works just fine.  I recently ran in to some problems with ours.

Last year, this happened and every wireless capable computer system was vulnerable.  Updates came out, we updated systems, and life went on.  Except me because I forgot the admin login for the access point and didn't get around to updating the firmware until today.

Updating the firmware required removing it from the mounting bracket.  This simple task is rendered nearly impossible by the Ubiquity's "secureproof" mounting bracket in order to prevent theft (?) of these things in a commercial setting.  After a while, I finally got it removed from the bracket.  But...

I accidentally disconnected the power supply before I was ready, so that put a wrench in the works for a while.  This was supposed to be a quick process, but was now going to take the better part of the evening to fix.

First, reset to factory defaults.  Online discussions forums state you either hold down the reset button with a paper clip for 5 seconds, more than 5 seconds, 10 seconds, or more than 10 seconds.  I basically ended up doing all of them and finally it reset itself.  I guess this is good because it means a power failure in a commercial setting won't mean the devices won't come back on and be useful.  It's really hard to remove the settings from the device through a simple reset.

Now I needed to run the UniFi Controller software.  This piece of shit is written in Java and is sort of silent when it comes to error reporting.  I needed to make sure the Java Jenga stack was in place and then start the program.  I sits and spins for a while and then just says "nope".  It doesn't tell me why it failed, just that it was unable to start.  Not even a clue.

Since this is all on Windows, I did what you usually do in these situations.  Perform some updates, uninstall and reinstall, rearrange the desktop icons, defrag the hard disk.  Nothing seemed to work.  Time to dig further.

Poking around in the UniFi software directory, I find that it has installed not to C:\Program Files, but rather to my home directory (or user directory or whatever Windows calls it).  This seemed odd to me, then I realized that it may not be running the program as the Administrator user.  I tried doing that with the right click, run as Administrator trick, but it didn't work.  Ugh.

I looked around in the UniFi directory and found a subdirectory called "logs".  Wonder what's in there.  There were two log files, so I opened the one that started with unifi.  This just said information about the program running and so on.  Wait.  The program ran?  No it didn't.  The timestamps are from now.  Scroll scroll.  Ah.  OK, so it's trying to connect to a MongoDB service and is timing out.  MongoDB?  WHHHHHHYYYYYYY?

The other log file was for MongoDB.  This file just had the same error over and over.  Unable to start because you don't have eleven billion gigabytes of free disk space.  Actually, this is exactly how it said it:

Sat Feb 24 18:37:18.705 [initandlisten] MongoDB starting : pid=8216 port=27117 dbpath=C:\Users\dcantrel\

Ubiquiti UniFi\data\db 64-bit host=dcantrel-PC
Sat Feb 24 18:37:18.705 [initandlisten] db version v2.4.14
Sat Feb 24 18:37:18.705 [initandlisten] git version: 05bebf9ab15511a71bfbded684bb226014c0a553
Sat Feb 24 18:37:18.705 [initandlisten] build info: windows sys.getwindowsversion(major=6, minor=1, build=7601, platform=2, service_pack='Service Pack 1') BOOST_LIB_VERSION=1_49
Sat Feb 24 18:37:18.705 [initandlisten] allocator: system
Sat Feb 24 18:37:18.705 [initandlisten] options: { bind_ip: "", dbpath: "C:\Users\dcantrel\Ubiquiti UniFi\data\db", logappend: true, logpath: "logs/mongod.log", nohttpinterface: true, port: 27117 }
Sat Feb 24 18:37:18.721 [initandlisten] journal dir=C:\Users\dcantrel\Ubiquiti UniFi\data\db\journal
Sat Feb 24 18:37:18.721 [initandlisten] recover : no journal files present, no recovery needed
Sat Feb 24 18:37:18.721 [initandlisten]
Sat Feb 24 18:37:18.721 [initandlisten] ERROR: Insufficient free space for journal files
Sat Feb 24 18:37:18.721 [initandlisten] Please make at least 3379MB available in C:\Users\dcantrel\Ubiquiti UniFi\data\db\journal or use --smallfiles
Sat Feb 24 18:37:18.721 [initandlisten]
Sat Feb 24 18:37:18.721 [initandlisten] exception in initAndListen: 15926 Insufficient free space for journals, terminating
Sat Feb 24 18:37:18.721 dbexit:
Sat Feb 24 18:37:18.721 [initandlisten] shutdown: going to close listening sockets...
Sat Feb 24 18:37:18.721 [initandlisten] shutdown: going to flush diaglog...
Sat Feb 24 18:37:18.721 [initandlisten] shutdown: going to close sockets...
Sat Feb 24 18:37:18.721 [initandlisten] shutdown: waiting for fs preallocator...
Sat Feb 24 18:37:18.721 [initandlisten] shutdown: lock for final commit...
Sat Feb 24 18:37:18.721 [initandlisten] shutdown: final commit...
Sat Feb 24 18:37:18.721 [initandlisten] shutdown: closing all files...
Sat Feb 24 18:37:18.721 [initandlisten] closeAllFiles() finished
Sat Feb 24 18:37:18.721 [initandlisten] journalCleanup...
Sat Feb 24 18:37:18.721 [initandlisten] removeJournalFiles
Sat Feb 24 18:37:18.721 [initandlisten] shutdown: removing fs lock...
Sat Feb 24 18:37:18.721 dbexit: really exiting now


Gee, thanks.  It would have been nice for UniFi Controller to propagate that up or even just put it in a damn FAQ or in the dialog box.  What it really wanted was around 4GB of free space.  I had 1.something.  OK, let's delete some shit.

The biggest offender were the Blurb book projects I have for my daughter.  I use the Blurb software to make these once a year on Windows.  The three book projects I have were taking 9.2GB.  Bingo.  Let's nuke these.  But I wanted to move them elsewhere first.

Tried to scp them to my vhost.  Nope.  Public key failure.  Oh right, I need to do that.  Well, why not cheat and use the key from my workstation?  USB'ed that over and oh you can't use that because PuTTY has a different damn key file format than OpenSSH.  Damn it. Damn it.  Damn it.  FINE.

I wiped a 32GB USB flash drive and copied all the Blurb stuff to that, then deleted it.  This took forever because of course it did.

With the hard disk sporting enough free space to run UniFi Controller, I'm back in business.  I ran it and claimed the access point and began setting it up again.  I also updated the firmware to the latest version so we are protected from KRACK and maybe other things.

Very annoying and I'm mostly writing it down here because when I need to do this again, I'm going to run in to the not enough disk space problem again and won't know what to do.

Wednesday, February 21, 2018

Technology Evolves, Artifical Problems Remain


Management:  The product release won't fit on a single $OBSTACLE, we need to adjust the installation process to support spanning it across multiple $OBSTACLE media!
Engineering:  But it fits on a single $SOLUTION, why don't we use that?
Management:  Our enterprise customers have standardized on $OBSTACLE media and we cannot deviate from that!
Engineering:  So we're going to engineer a convoluted solution to work around what amounts to a problem that could be solved by replacing something with a $40 order from Amazon?
Management:  Yes!

* much work commences *

SOLUTION="USB flash drive"
OBSTACLE="USB flash drive"

Saturday, February 17, 2018

PDF Product Manuals

I've always had a collection of product manuals in printed form for various things around the house.  Appliances, computer products, radios, power tools...the list goes on.  Keeping track of these requires some level of effort, but I always have trouble finding manuals when I actually need them.  I've decided the best thing to do is start replacing the printed manuals with PDF copies.

Problem is, I need to find all of those.  So does anyone have any suggestions besides manufacturer web sites to find product manuals?  Household appliances are the most difficult at the moment.

Sunday, February 11, 2018

argv[0] name for Firefox processes

I've noticed recent versions of Firefox are creating subprocesses for new tabs but their command name as shown in top(1) and ps(1) is now Web Content instead of firefox.  I can see why this may be appealing for users of Windows or MacOS X, but I would like those subprocesses to continue to say firefox.  Does anyone know how to restore the previous behavior?  I really want to be able to say pkill firefox like I used to be able to do.  I will continue looking through the source to figure out how to maybe turn this off, but so far I have not had any luck.

Monday, December 11, 2017

Be Careful With Your SSD On Linux

My laptop has an SSD instead of a spinning hard disk.  The first laptop I had with an SSD was a company-issued ThinkPad with either a 32GB or 64GB SSD.  It was entirely too small for what I was doing at the time.  After that, I always chose capacity over speed for my laptop hard disk.

Skip to now and SSDs for laptops are entirely usable capacity-wise.  So my ThinkPad now has a 1TB SSD in it.  It came with one when I bought it, but I recently had to replace it because it failed.  SSDs are great, but you can beat them up rather quickly if you're not careful.

On my laptop I also use the LUKS encryption for my /home volume.  I don't encrypt the entire laptop because I don't really care that my man pages are encrypted or my cups configuration file is encrypted.  Just the stuff in /home is important to me.  What I failed to do was make sure I open the LUKS device with --allow-discards on the cryptsetup(8) command.

The --allow-discards option enables TRIM or UNMAP on the underlying device, though it's probably TRIM in nearly every case.  Without getting in to the technical details, this enables the kernel to handle unused blocks differently on an SSD than on a spinning hard disk.  TL;DR, this is important to not wear out the flash memory quickly.

So that's what happened to me.  And the failure was interesting too because the laptop just started acting very strangely until eventually write operations failed and then it started lying and saying the device was full.

Make sure you're unlocking LUKS volumes on SSDs with --allow-discards.  Every distribution is a little different, but a common method us defining the device in /etc/crypttab with the options you need to use.

Monday, October 9, 2017

AOL Instant Messenger Shutting Down

After 20 years or so, AOL Instant Messenger is shutting down.  Not really a surprise.  A lot of instant messaging services have come and gone.  I still have an AIM account that is named after an FCC callsign I was granted in 2000 but no longer have.  At the time it was easy to communicate with less techy friends and family and it was easy to use on Linux with programs like gaim.

I currently use it through a program called bitlbee and then interact with that through irssi.

While AIM is shutting down, I still have Facebook Messenger, Google Hangouts, and regular IRC on FreeNode.  I also use email.

Remember ICQ?  It's apparently still running and I think people are using it.  Implementations come and go but there will always be a way to do instant messaging in some capacity.  People seem to like that.  Right now I am working on a more integrated and reliable setup for my Facebook Messenger+Google Hangouts+IRC setup so I can move between computers and networks and have everything move between clients.  Yeah, that'll totally work.