Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to start Transmission Daemon after upgrade to 2.93 #537

Closed
auveele opened this issue Mar 5, 2018 · 17 comments
Closed

Failed to start Transmission Daemon after upgrade to 2.93 #537

auveele opened this issue Mar 5, 2018 · 17 comments

Comments

@auveele
Copy link

auveele commented Mar 5, 2018

After I upgraded my transmission in Ubuntu 16.04 to 2.93
I get the next error when the daemon try to start.

transmission-daemon.service - Transmission BitTorrent Daemon
   Loaded: loaded (/lib/systemd/system/transmission-daemon.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since lun 2018-03-05 17:31:32 CET; 8s ago
  Process: 2991 ExecStart=/usr/bin/transmission-daemon -f --log-error (code=exited, status=217/USER)
 Main PID: 2991 (code=exited, status=217/USER)

mar 05 17:31:32 domus.local systemd[1]: Starting Transmission BitTorrent Daemon...
mar 05 17:31:32 domus.local systemd[1]: transmission-daemon.service: Main process exited, code=exited, status=217/USER
mar 05 17:31:32 domus.local systemd[1]: Failed to start Transmission BitTorrent Daemon.
mar 05 17:31:32 domus.local systemd[1]: transmission-daemon.service: Unit entered failed state.
mar 05 17:31:32 domus.local systemd[1]: transmission-daemon.service: Failed with result 'exit-code'.

I tried to remove the package, purge, and reinstall again, but the problem persists.

I've seen a related post in the Ubuntu Forum
https://ubuntuforums.org/showthread.php?t=2386355

@TalZiv
Copy link

TalZiv commented Mar 5, 2018

Hi,
There are two issues, if you install the PPA version the user in the daemon service file is now "transmission" and not "debian-transmission" also now there is a systemd service file and not an init.d file which causes conflicts, so remove the init.d file.

after fixing this the daemon started, But it exits after a minute or two with the following error of time out:

● transmission-daemon.service - Transmission BitTorrent Daemon
   Loaded: loaded (/etc/systemd/system/transmission-daemon.service; disabled; vendor preset: enabled)
   Active: failed (Result: timeout) since Mon 2018-03-05 18:44:41 IST; 4min 49s ago
  Process: 3486 ExecStart=/usr/local/bin/transmission-daemon -f --log-error (code=exited, status=0/SUCCESS)
 Main PID: 3486 (code=exited, status=0/SUCCESS)

Mar 05 18:43:10 cribstore systemd[1]: Starting Transmission BitTorrent Daemon...
Mar 05 18:43:12 cribstore transmission-daemon[3486]: [2018-03-05 18:43:12.106] UDP Failed to set receive buffer: requested 4194304, got 425984 (/root/trans/Transmission/libtransmission/tr-udp.c:97)
Mar 05 18:43:12 cribstore transmission-daemon[3486]: [2018-03-05 18:43:12.106] UDP Failed to set send buffer: requested 1048576, got 425984 (/root/trans/Transmission/libtransmission/tr-udp.c:105)
Mar 05 18:44:41 cribstore systemd[1]: transmission-daemon.service: Start operation timed out. Terminating.
Mar 05 18:44:41 cribstore systemd[1]: Failed to start Transmission BitTorrent Daemon.
Mar 05 18:44:41 cribstore systemd[1]: transmission-daemon.service: Unit entered failed state.
Mar 05 18:44:41 cribstore systemd[1]: transmission-daemon.service: Failed with result 'timeout'.

The issue is present on PPA and when building from source I am on Ubuntu 16.04.4 LTS.

Hope this helps to point to the right direction.

@auveele
Copy link
Author

auveele commented Mar 5, 2018

Oh Thanks!
I remove the PPA file, and install again.
It works perfectly.

Thank you!!

@TalZiv
Copy link

TalZiv commented Mar 5, 2018

Hi,

By removing the PPA you installed an earlier version from Ubuntu repositories version 2.84 if I remember correctly

@auveele
Copy link
Author

auveele commented Mar 5, 2018

Yes, it is the version 2.84

transmission-daemon:
  Instalados: 2.84-3ubuntu3.1

@TalZiv
Copy link

TalZiv commented Mar 5, 2018

If I switch to the transmission user and run /usr/local/bin/transmission-daemon --log-error
it works, so the problem is with the -f switch that does the foreground in the service file.

this is more pin point in order to debug.

@mizled
Copy link

mizled commented Mar 5, 2018

If I switch to the transmission user and run /usr/local/bin/transmission-daemon --log-error
it works, so the problem is with the -f switch that does the foreground in the service file.

Does the service continue to run or does it stop after a minute or two? Is there any negative to removing the foreground flag from the systemd startup script?

@TalZiv
Copy link

TalZiv commented Mar 5, 2018

With the original service file with -f it run for a minute or two and than stops.

Without the -f in the service file it does not even start.

@mikedld
Copy link
Member

mikedld commented Mar 5, 2018

Please use forums for support.

@bingo1105
Copy link

TalZiv isn't asking for support. He's explaining to you that your package is broken.

@mizled
Copy link

mizled commented Mar 5, 2018

Yeah this seems more like a bug than a support issue. 2.93 is crashing in Ubuntu 16.04. Are there any logs we can post to help you determine what the issue is?

@TalZiv
Copy link

TalZiv commented Mar 6, 2018

Please reopen this, there is a problem with version 2.93.

@lordairivis
Copy link

Can confirm, this bug began for me as well after updating to 2.93 from the PPA last night.

Changing the user to debian-transmission from transmission in /lib/systemd/system/transmission-daemon.service allows the service to start for a couple minutes, but then crashes with the error:

● transmission-daemon.service - Transmission BitTorrent Daemon
   Loaded: loaded (/lib/systemd/system/transmission-daemon.service; enabled; vendor preset: enabled)
   Active: failed (Result: timeout) since Mon 2018-03-05 17:20:02 MST; 7s ago
  Process: 16433 ExecStart=/usr/bin/transmission-daemon -f --log-error (code=exited, status=0/SUCCESS)
 Main PID: 16433 (code=exited, status=0/SUCCESS)

Mar 05 17:18:31 download systemd[1]: Starting Transmission BitTorrent Daemon...
Mar 05 17:20:02 download systemd[1]: transmission-daemon.service: Start operation timed out. Terminating.
Mar 05 17:20:02 download systemd[1]: Failed to start Transmission BitTorrent Daemon.
Mar 05 17:20:02 download systemd[1]: transmission-daemon.service: Unit entered failed state.
Mar 05 17:20:02 download systemd[1]: transmission-daemon.service: Failed with result 'timeout'.

Removing the -f flag from the ExecStart=/usr/bin/transmission-daemon -f --log-error line in the transmission-daemon.service file causes the service to fail immediately rather than a couple minutes:

download@download:/etc/init.d$ sudo nano /lib/systemd/system/transmission-daemon.service 
download@download:/etc/init.d$ systemctl daemon-reload
==== AUTHENTICATING FOR org.freedesktop.systemd1.reload-daemon ===
Authentication is required to reload the systemd state.
Authenticating as: download,,, (download)
Password: 
==== AUTHENTICATION COMPLETE ===
download@download:/etc/init.d$ systemctl start transmission-daemon.service
==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units ===
Authentication is required to start 'transmission-daemon.service'.
Authenticating as: download,,, (download)
Password: 
==== AUTHENTICATION COMPLETE ===
download@download:/etc/init.d$ systemctl status transmission-daemon
● transmission-daemon.service - Transmission BitTorrent Daemon
   Loaded: loaded (/lib/systemd/system/transmission-daemon.service; enabled; vendor preset: enabled)
   Active: inactive (dead) since Mon 2018-03-05 17:30:36 MST; 7s ago
  Process: 16605 ExecStart=/usr/bin/transmission-daemon --log-error (code=exited, status=0/SUCCESS)
 Main PID: 16605 (code=exited, status=0/SUCCESS)

Output of journalctl -xe with only username changed and -f flag intact (journalctl -xe shows no information with -f removed):

Mar 05 17:33:11 download systemd[1]: Starting Transmission BitTorrent Daemon...
-- Subject: Unit transmission-daemon.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit transmission-daemon.service has begun starting up.
Mar 05 17:33:23 download transmission-daemon[16670]: [2018-03-05 17:33:23.435] UDP Failed to set receive buffer: requested 4194304, got 425984 (tr-udp.c:84)
Mar 05 17:33:23 download transmission-daemon[16670]: [2018-03-05 17:33:23.437] UDP Failed to set send buffer: requested 1048576, got 425984 (tr-udp.c:95)
Mar 05 17:34:41 download systemd[1]: transmission-daemon.service: Start operation timed out. Terminating.
Mar 05 17:34:41 download transmission-daemon[16670]: Closing transmission session... done.
Mar 05 17:34:41 download systemd[1]: Failed to start Transmission BitTorrent Daemon.
-- Subject: Unit transmission-daemon.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit transmission-daemon.service has failed.
-- 
-- The result is failed.

It appears until this is fixed the only option is to roll back to 2.84.

@mikedld
Copy link
Member

mikedld commented Mar 6, 2018

  1. We're not managing and are not responsible for the content at ppa:transmissionbt/ppa
  2. The forum thread linked by OP has a fix that:
    • changes service type to "simple": the transmission-daemon in ppa:transmissionbt/ppa is built without support for systemd (try objdump -T /usr/bin/transmission-daemon | fgrep sd_), which means "notify" type that's specified in the unit file provided by the package doesn't work (systemd is waiting on daemon to notify it, but the daemon never does)
    • changes user/group to "debian-transmission": the service file in our repository (daemon/transmission-daemon.service) has "transmission" user in it; obviously, we cannot change it to "debian-transmission" because this user name is Debian-specific (and Ubuntu is based on Debian), and so what downstream distributions usually do is patch the file or provide their own to fit their distribution, which was not done in ppa:transmissionbt/ppa (compared to the official 2.84 package in you distribution)

Ergo this issue stays closed. If you want to open an issue, do so somewhere where guy(s) responsible for ppa:transmissionbt/ppa could hear you.

@TalZiv
Copy link

TalZiv commented Mar 6, 2018

Please stop being stubborn, If you had read my posts you would have seen that I said this issue happens also when I am building from source.

I will check the solution above on my source build and report back.

EDIT
the problem is indeed the sd_notify. running objdump -T /usr/bin/transmission-daemon | fgrep sd_ on github built source daemon binary returns no results, the problem is that by following this build instructions here transmission/wiki/Building-Transmission especially the Prerequisites section for ubuntu does not mention to apt install libsystemd-dev and therefore when building from source it does not find the systemd h files and does not build and compile with sd_notify and the service fails.

to sum things up, on Ubuntu when building from source and using systemd you must install libsystemd-dev. this is missing from the transmission wiki documentation and probably why the PPA packages failed.

Now the issue can be closed, Thank you for your time.

@MarcosBL
Copy link

MarcosBL commented Mar 7, 2018

Just as 2 cents for others looking for help:

Create a file /etc/systemd/system/transmission-daemon.service.d/override.conf with this content:

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

Then reload systemd config with systemctl daemon-reload

And finally start the service again with systemctl start transmission-daemon.service

After that transmission 2.93 works perfectly.

Original source at Ubuntu Forums

@satter
Copy link

satter commented Mar 8, 2018

@MarcosBL you have two empty options, this wont work.
Correct config is:

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

@tzeejay
Copy link

tzeejay commented Mar 8, 2018

Just tried a mix of @MarcosBL fix and @satter 's correction as follows:

  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
  1. Restart everything
    sudo systemctl daemon-reload && sudo systemctl start transmission-daemon.service

Gave me a running instance of Transmission 👍

@transmission transmission locked and limited conversation to collaborators Mar 8, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

No branches or pull requests

9 participants