I spent way too long tearing my hair out over this.

I’m setting up a new 14.04 server (trusty). I installed Plex Media Server, which is a horribly written piece of software with absolutely brilliant features. Seeing as how it’s about the best out there in terms of features, I’m taking the, “eh, whatever, it works” approach & dealing with the associated headaches.

One headache I didn’t expect was running into problems with the upstart job. Ubuntu trusty, you may or may know, uses the upstart init system, the merits of which can be debated. Elsewhere.

After tracking down the PPA and coming to terms with having to just ignore the warning:

W: Conflicting distribution: https://downloads.plex.tv public InRelease (expected public but got )

Plex was starting on boot but upstart seemed oblivious to its existence, even though it was most decidedly present in the upstart initctl listing:

root@alba:/home/eddie# service plexmediaserver stop
stop: Unknown job: plexmediaserver
root@alba:/home/eddie# sudo initctl list | grep plex
plexmediaserver stop/waiting

Do ya see what I’m doing wrong there? Yeah, I didn’t either. When running initctl without the sudo, the job was not present:

initctl list | grep plex
root@alba:/home/eddie#

It seems that upstart cares who you are, and if you’re root, (that is, not interacting via sudo), you get a different set of jobs to pick from. I’m sure this is all very well covered in the upstart manual, which is like a gazillion pages long. And I’m sure there’s probably a good reason it’s like this. That being lost on me, I spent hours trying to troubleshoot the upstart job. Which was, apparently, working fine the whole time. It was my fault for trying to do service/stop start via the root user & not using sudo.

Running the command via sudo fixed the “problem”:

root@alba:/home/eddie# sudo service plexmediaserver start
plexmediaserver start/running, process 4415

I hope this saves someone some headache, and some hair.