I recently purchased a Unifi UVC-G3 network camera for the outside of my house. It works great in standalone mode, but has no recording capability without a Unifi NVR. The Ubiquiti hardware one is about $350, but a lot of people just repurpose a small linux box to do the job. That, to me, seemed silly since I have a Mac Mini that serves as my home media server, and runs my weather station (and a few other things). I also have a Raspberry Pi in the garage that runs Cacti (for network monitoring), and the Unifi wireless controller. This all got me thinking, “wait, I could just run the free version of VMWare ESXi (vSphere) and virtualize all of this on the Mac Mini”. The problem was, was that really possible? I know Apple allows virtualization of it’s OS on Apple hardware, and there are hacks to get it to work on non-Apple hardware, but I’d never actually managed a vSphere server before. Sure, I have tons of VMs at work, but the system is managed by another group, and all the VMs are Windows or Linux. So, I had to try.
For about 5 years now, I have run a Crashplan ProE (at the time, just Crashplan Pro) server at my office. It ran on a server here in town, then a remote server as well (for offsite backup). This server largely stalled out at version 3.6, and has worked quite well, but had limited storage, so we basically only backed up the bare necessities (Documents and Desktop, no pictures, music, videos, etc). Which, while fine, isn’t exactly what Journalism faculty expect when they generate a lot of photos, videos, etc. =/
However, a couple years ago, central campus had enough pressure to start up its own CrashPlan offering. They chose to utilize CrashPlan’s cloud storage offering, which is great. It meant unlimited storage, at the cost of about $90/user (with up to 5 computers per user).
I had an interesting issue hit my site recently, that I still can’t figure out WHY it happened, but after a few days of troubleshooting, I have figured out what happened, and how to fix it.
First, let me say that my site runs on a Mac Mini running Mavericks (10.9.5). So, all of this MAY come down to some update Apple released recently, I’m really unsure. I also run my site behind Cloudflare, which I also was curious about. It seems to have cropped up on/around the time Wordpress 4.2 was released, which is what I thought the issue was at first (and why I was involved in the wordpress.org forum thread here). The issue is basically that Wordpress, in my case, wouldn’t generate thumbnails for JPG image uploads, but PNGs would. The issue cropped up right around the time that wordpress 4.2 was released, so the natual causation logic seemed to point to Wordpress being the issue. Interestingly, it wasn’t. After banging my head on this for a while, a coworker finally found a note that Wordpress defaults to using ImageMagick (imagick.so) for image processing if it’s present, otherwise it uses GD. So, I found a “plugin” that forces Wordpress to use GD, and that fixed it. So crap, the issue is my ImageMagick install. The problem is, Wordpress is failing silently, and not throwing ANY errors.
So, I added a simple script to test imagick using some code I found on php.net hoping it would actually throw an error. And it did throw an error:
PHP Fatal error: Uncaught exception 'ImagickException' with message 'Wrong JPEG library version: library is 70, caller expects 90
There we go. So, the issue is ImageMagick is being compiled against libjpeg version 9, but when it’s going to run, it’s being handed version 7. So, I was able to do an “mdfind” and see I had version 9 and 8 installed, as well as 7, both in /usr/local/lib, and with my PHP install. So, knowing I installed both 8 and 9, I removed 8 and 9, so only 7 was avaible, and then recompiled ImageMagick, and uninstall and reinstall imagick.so. Then, I ran my test, and it worked!