1

I'm running an ubuntu box, mainly as a learning exercise, so I should probably begin by stating that I'm still very much at the "copying commands until something works" stage of unix knowledge. I recently upgraded from 14.10 to 15.04, and since that upgrade I've been having an issue with the daemon for the deluge torrent client.

When I upgraded to 15.04, I followed the 'official' instructions for moving the deluged daemon over to systemd. As part of this process, I believe I deleted the old upstart configurations associated with this service. In both my previous and my new configuration, I'm launching the daemon under my own user account (launching it under a 'deluge' user caused problems for me when I first installed) - and this works, except for one issue.

Despite my .service file being correct for the configuration I want, and despite this service starting normally and working fine when i do systemctl start deluged, I'm not able to start the service unless I kill an instance of deluged that is running at boot under the root user account. I don't want it to run as root, and as far as I'm aware, I've never configured it to do so - and this instance of the daemon obviously prevents my desired instance from starting up. I obviously don't want it running as root, partly because I know it's a bad idea, but also because it prevents the thin client from actually being able to connect.

Tl;dr: How can I work out what is causing this service to launch on startup as root, and how do I prevent it from doing so, so that I'm able to start the daemon properly without first having to manually kill the unwanted instance after each reboot? I have deleted all existing configs before following instructions, and as far as I know upstart and init.d are no longer active on my system anyway. There is a possibility that I did something dumb when I first installed that I don't remember, as deluge was one of the first things I configured on my first ever unix installation.

(For anyone kind enough to provide an answer, my current unix competence is at the level of knowing whether a process/daemon is running, understanding and manually editing config files, a beginner understanding of how to interpret logs, and basically no understanding at all of the deeper concepts at work behind the scenes.)

  • You can disable that from running at boot with systemctl disable unit but as far as running services as regular user . . . I somewhat doubt its possible – Sergiy Kolodyazhnyy Aug 28 '15 at 2:08
  • The deluged daemon runs just fine under my own account, it just won't automatically start because another instance keeps launching as root first – Toadfish Aug 30 '15 at 3:10
1

Because this doesn't seem to be that common a problem, and to resolve this after all this time, I'm answering my own question – turns out that the process was being started in /etc/rc.local, which was really stupid of me (and it's also fairly stupid that I didn't think to check there).

So, if there's any lesson to be learned here, it's to enumerate every possible way a fault can occur and then check the possibilities one by one, no matter how stupid, and no matter whether or not you think you already checked there.

  • rc.local was my first thought, especially given it started as root. Good catch, anyway! – muru Oct 6 '15 at 9:21
  • 1
    The irony is that the only reason i opened rc.local was to add a script that would pkill deluge followed by systemctl start deluged lmao – Toadfish Oct 6 '15 at 9:23
  • @Toadfish: could you click the grey at the left of this text, which means Yes, this answer is valid! ;-) – Fabby Oct 11 '15 at 10:50
  • i thought it would be gauche to approve my own answer, but I failed to consider that it also serves the purpose of closing the question, hah – Toadfish Oct 11 '15 at 10:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.