Category Archives: Linux

Nginx 502 Bad Gateway after Ubuntu Upgrade

So I finally tracked down about 6 different errors that were keeping my VPS running  Ubuntu 14.04 instead of something more recent. One of the main errors was due to a system misconfig by my VPS host OVH. After getting that fixed, vexed with frustration and carelessly impatient, I upgraded all the installed packages and ended up taking all the sites I host on this VPS down for the last 10 hours.
Continue reading Nginx 502 Bad Gateway after Ubuntu Upgrade

It’s 2017 and ZFS STILL doesn’t have an API?!?

Why is it that, in 2017, with ZFS, –routinely called the most advanced file system in the world– I’m having to use awk to parse the status output from its built-in tools? Why is there STILL no documented, easily query-able API for me to use? The only way that there is for me to get Python to interact with ZFS is for me to use awkward wrappers with little to no documentation. There’s a bunch of undocumented APIs, but nothing that’s really usable for someone without advanced understanding of the platform. I just want to be notified when a drive dies, or starts having problems.
Continue reading It’s 2017 and ZFS STILL doesn’t have an API?!?

ZFS on Linux NFS shares lost at reboot

On several occasions NFS has inexplicably stopped working with my ZFS shares under ZFS on Linux on Ubuntu Server 14.04×64. It seemed to happen every reboot, after checking the sharenfs property on each of the ZFS FS’ I found they were set properly, but still clients were getting access denied when trying to mount the share. Other times, even when they were able to re-mount the share they wouldn’t do so unless I manually triggered it.
Continue reading ZFS on Linux NFS shares lost at reboot

Full home audio without iTunes

I want to have speakers in every room of my house, and I want them to be able to play the same stations, or different ones. Basically I want to have digital FM radio across the whole house, so that as I walk from the living room, to the back yard the music doesn’t skip a beat. This is currently offered by Sonos at a ridiculous price, and was offered until 2012 by Logitech, with Squeezebox at a less ridiculous price. Squeezebox being discontinued, I’m not willing to sink my money or time into that, and Sonos is too expensive.
Continue reading Full home audio without iTunes

Bash script to automatically restart MySQL when website database connection is down

I’ve been noticing that periodically my MySQL service will hang and require a restart. It’s easy enough to SSH in and restart it, but I only catch it after the fact. So I wrote this little script which curls my website, sees that it’s down and restarts MySQL and shoots me an email with sSMTP. This only checks for the MySQL service not accepting connections from Apache. If there’s an error with Apache, or it’s not running this won’t do anything. Continue reading Bash script to automatically restart MySQL when website database connection is down

Generate Certificate for TomatoUSB from Active Directory CA

I wanted to install a cert on my router so that I could stop getting shit for not trusting it when I log in. However, installing the cert on every device that I access it with. Since I’ve got all my computers on a domain, I can just install the CA role on my DC, so I don’t need to fuck around with an untrusted CA like StartCom who offer free certs, but still require you to install the CA chain, or buy a ridiculously overpriced cert from some random CA.
Continue reading Generate Certificate for TomatoUSB from Active Directory CA

Compiling Mosh for OpenIndiana II

I recently wrote about compiling Mosh for OI, and ended by saying I couldn’t get it working. Thanks to the help from the list post I mentioned, I got it compiled, and was able to execute the binary. However, it didn’t work. Connecting to it failed always, and the compiled client just out the word “hangup” and then exited.
Continue reading Compiling Mosh for OpenIndiana II

Saga of Data-Loss induced paranoia.

My current setup leaves a lot to be desired, specifically due to the fact that I’ve yet to purchase a proper RAID controller and am instead using softRAID, which has many shortfalls. One of those is the fact that while I do have a live redundant copy of all data stored on that array, when one disk dies, as recently happened to me, there is no way to rebuild the array through the software management. Instead, I have to boot up, umount the now single disk, dd if=<working disk> of =<new disk>, reboot, enter RAID setup, rebuild the array, and then remount the new array to the old position. Not something I’m too worried about, since it doesn’t happen that often, but since I can’t leave well enough alone, when it happened this time I decided to reorganize my entire file system, install the server version of Ubuntu, and move everything around in a way that will, ostensibly, give me much more room for expanding my storage space.

Continue reading Saga of Data-Loss induced paranoia.