2

SOLUTION

https://github.com/transmission/transmission/issues/537#issuecomment-370660548

What tzeejay Commented:

  1. Create the directory and then place the file (sudo required if you're not root):

    sudo mkdir /etc/systemd/system/transmission-daemon.service.d/ && sudo nano /etc/systemd/system/transmission-daemon.service.d/override.conf

  2. Place this in the config file that you just opened:

    [Service] Type=simple User=debian-transmission Group=debian-transmission

  3. Restart everything

    sudo systemctl daemon-reload && sudo systemctl start transmission-daemon.service

Gave me a running instance of Transmission

I can confirm that this worked for me. Hopefully it works for everyone else who was affected by this. Just wish I held off uninstalling for a little longer... this evening is essentially me re-adding everything.

Thanks everyone for helping!


Edit: The guide I used to install Transmission was this; https://help.ubuntu.com/community/TransmissionHowTo

After installing a new HDD to the server, I restarted the OS as for some reason GParted couldn't update the kernel with its changes, and prompted to restart first (not sure if this is related to the problem I'm experiencing, but thought it was worth mentioning).

Since restarting, I am now receiving the following message when trying to start the Trasmission Daemon (either during boot, during apt update, or manually starting the service);

● transmission-daemon.service - Transmission BitTorrent Daemon
Loaded: loaded (/lib/systemd/system/transmission-daemon.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Mon 2018-03-05 00:04:10 GMT; 1min 53s ago
Process: 28068 ExecStart=/usr/bin/transmission-daemon -f --log-error (code=exited, status=217/USER)
Main PID: 28068 (code=exited, status=217/USER)
CPU: 0

systemd[1]: Starting Transmission BitTorrent Daemon...
systemd[28068]: transmission-daemon.service: Failed to determine user credentials: No such process
systemd[1]: transmission-daemon.service: Main process exited, code=exited, status=217/USER
systemd[1]: Failed to start Transmission BitTorrent Daemon.
systemd[1]: transmission-daemon.service: Unit entered failed state.
systemd[1]: transmission-daemon.service: Failed with result 'exit-code'.

I'm fairly new to Linux and am struggling to figure out where the daemon is actually placing its log files, why this broke in the first place and how to fix it... Any help or guidance is much appreciated.


Some extra info;

Thought it would be worth mentioning that I have restarted this server in the past without issues, so I would find it surprising if it was the case of loading an incorrect config file all of a sudden (though I'm not writing off any possibilities!).

Ubuntu 17.10 and it was originally installed as CLI only but doing certain things like formatting and managing drives in GParted is easier through a GUI than a CLI, so I installed the GUI on top and keep things to a bare minimum.

From what I read about the transmission daemon, it creates its own user account on its own (without a home directory, aka a Service Account). It's been quite some time since I set this up so I can't remember doing anything particularly special with it. I essentially followed this guide:

http://idroot.net/tutorials/how-to-install-transmission-on-ubuntu-14-04/

Whilst there is an update available through apt, it can't actually install it because of the messages listed in the post. It's like it tries to start the service before updating for some reason. That or after updating it fails to launch and reverts changes... I'm not sure.

Here is what gets displayed when I try to run apt-get update/upgrade:

**sudo apt-get upgrade**
 Reading package lists... Done
 Building dependency tree       
 Reading state information... Done
 Calculating upgrade... Done
 0 to upgrade, 0 to newly install, 0 to remove and 0 not to upgrade.
 1 not fully installed or removed.
 After this operation, 0 B of additional disk space will be used.
 **Do you want to continue? [Y/n] y**
 Setting up transmission-daemon (2.93-1ubuntu1~17.10.1) ...
 Job for transmission-daemon.service failed because the control process exited with error code.
 See "systemctl  status transmission-daemon.service" and "journalctl  -xe" for details.
 invoke-rc.d: initscript transmission-daemon, action "start" failed.
 ● transmission-daemon.service - Transmission BitTorrent Daemon
    Loaded: loaded (/lib/systemd/system/transmission-daemon.service; enabled; vendor preset: enabled)
    Active: failed (Result: exit-code) since Mon 2018-03-05 18:43:15 GMT; 6ms ago
   Process: 13378 ExecStart=/usr/bin/transmission-daemon -f --log-error (code=exited, status=217/USER)
  Main PID: 13378 (code=exited, status=217/USER)
  CPU: 0

 systemd[1]: Starting Transmission BitTorrent Daemon...
 systemd[13378]: transmission-daemon.service: Failed to determine user credentials: No such process
 systemd[1]: transmission-daemon.service: Main process exited, code=exited, status=217/USER
 systemd[1]: Failed to start Transmission BitTorrent Daemon.
 systemd[1]: transmission-daemon.service: Unit entered failed state.
 systemd[1]: transmission-daemon.service: Failed with result 'exit-code'.
 dpkg: error processing package transmission-daemon (--configure):
  subprocess installed post-installation script returned error exit status 1
 Errors were encountered while processing:
  transmission-daemon
 E: Sub-process /usr/bin/dpkg returned an error code (1)

Any help is greatly appreciated.


So following @Trevor Hammonds Suggestion, I edited the /lib/systemd/system/transmission-daemon.service file (which I believe is the one he was referring to). It originally contained the following text;

[Unit]
Description=Transmission BitTorrent Daemon
After=network.target

[Service]
User=transmission
Type=notify
ExecStart=/usr/bin/transmission-daemon -f --log-error
ExecReload=/bin/kill -s HUP $MAINPID

[Install]
WantedBy=multi-user.target

So I changed the User= to daemon-transmission, and now I'm getting a different error when trying to start or update the service (after a good 2 minute pause) it fails. journalctl states the following:

Mar 06 22:12:46 PlexServer sudo[3382]:     *me*  : TTY=pts/0 ; PWD=/ ; USER=root ; COMMAND=/usr/sbin/service transmission-daemon start
Mar 06 22:12:46 PlexServer sudo[3382]: pam_unix(sudo:session): session opened for user root by *me*(uid=0)
Mar 06 22:12:47 PlexServer systemd[1]: Starting Transmission BitTorrent Daemon...
-- Subject: Unit transmission-daemon.service has begun start-up
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Unit transmission-daemon.service has begun starting up.
Mar 06 22:12:48 *server* transmission-daemon[3411]: [2018-03-06 22:12:48.759] UDP Failed to set receive buffer: requested 4194304, got 425984 (tr-udp.c:84)
Mar 06 22:12:48 *server* transmission-daemon[3411]: [2018-03-06 22:12:48.759] UDP Failed to set send buffer: requested 1048576, got 425984 (tr-udp.c:95)
Mar 06 22:12:48 *server* transmission-daemon[3411]: [2018-03-06 22:12:48.759] UDP Failed to set receive buffer: requested 4194304, got 425984 (tr-udp.c:84)
Mar 06 22:12:48 *server* transmission-daemon[3411]: [2018-03-06 22:12:48.759] UDP Failed to set send buffer: requested 1048576, got 425984 (tr-udp.c:95)
Mar 06 22:14:17 *server* systemd[1]: transmission-daemon.service: Start operation timed out. Terminating.
Mar 06 22:14:18 *server* transmission-daemon[3411]: Closing transmission session... done.
Mar 06 22:14:18 *server* systemd[1]: Failed to start Transmission BitTorrent Daemon.
-- Subject: Unit transmission-daemon.service has failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Unit transmission-daemon.service has failed.
--
-- The result is failed.
Mar 06 22:14:18 *server* systemd[1]: transmission-daemon.service: Unit entered failed state.
Mar 06 22:14:18 *server* systemd[1]: transmission-daemon.service: Failed with result 'timeout'.
Mar 06 22:14:18 *server* sudo[3382]: pam_unix(sudo:session): session closed for user root

I'm on the verge of a reinstall... I just wish I knew what broke it/how to fix it as this is a huge disruption/inconvenience and I would rather not have to go through this every time the Transmission devs update it :(

  • Is transmission looking for files on the old HDD? – user535733 Mar 5 '18 at 20:20
1

The apt upgrade changed the user to "debian-transmission" and also changed ownership of several of the directories to that, as well. As a result, the transmssion daemon could not read its configuration file nor write to the downloads directory. You need to either change your transmission-daemon.service file to reflect the new username, or fix everything that the upgrade broke by changing back all the ownership of the files and directories to your previous transmission user.

| improve this answer | |
  • So I updated my original post to explain what happened when I tried following your suggestion (or at least I believe I did...). Not good news :( – Joe Smith Mar 6 '18 at 22:19
  • Are you able to elaborate on this? I "thought" I had everything fixed, but like OP I'm still getting errors. – Ackis Mar 8 '18 at 16:31
  • 1
    I realize this is a very late reply, but for the record, here is goes anyway. You mentioned that you changed the User= to daemon-transmission. It needs to be 'debian-transmission' or whichever user your system is using to run the Transmission daemon. Check to see that the directories and files are also owned by that same user. – Trevor Hammonds Dec 5 '19 at 23:15

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