Incorrect conditions in systemd and upstart script for transmission-daemon

Bug #1261192 reported by Edward Barford
54
This bug affects 12 people
Affects Status Importance Assigned to Milestone
Transmission
Unknown
Unknown
transmission (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Release: Ubuntu Server 13.10 x86_64
Package: transmission-daemon 2.82

After the system is booted transmission-daemon is not contactable on port 9091 using transmission-remote or the web interface.

The daemon is however started and uploading/downloading.

After the daemon is restarted everything works correctly.

The 'start on' condition (in /etc/init/transmission-daemon.conf) currently reads as follows:

    start on (filesystem and net-device-up IFACE=lo)

i.e. start after both the filesystem and loopback adapter are available.

The transmission-daemon binds to 0.0.0.0:9091 on start up in order to listen for remote procedure calls and as such should wait for an adapter other than the loopback adapter to be available.

The line should read as follows:

    start on (filesystem and net-device-up IFACE!=lo)

PS At least I think that's what's going on (and this change has resolved my problem)...

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in transmission (Ubuntu):
status: New → Confirmed
Revision history for this message
Maarten Fonville (maarten-fonville) wrote :

I also was confronted with this bug. Please fix it, because it is for users quite hard to figure out *what* is going wrong, and it takes a lot of debugging time before arriving at the source of the problem

The fix is trivial and should therefor be (in my opinion) be applied as soon as possible for the next Ubuntu release.

Revision history for this message
Jason Heeris (detly) wrote :

I can confirm that this problem exists in 14.04.1 LTS, and is fixed by changing the init script as per the original comment.

Revision history for this message
Paul Simon (2-ops) wrote :

This problem still exists in 14.04.2 LTS, and can still be resolved by the fix in the original comment.

Revision history for this message
Maarten Fonville (maarten-fonville) wrote :

In Ubuntu Vivid, this problem can't even by fixed by the original editing of lines, a new start of the script has to be used.
I now succesfully use:

start on (starting network-interface
          or starting network-manager
          or starting networking)

Revision history for this message
Maarten Fonville (maarten-fonville) wrote :

Hmm, what I had used 'succesfully' was apprently pure chance that it did work that boot.

Apparently it is still the broken, and the cause has to be found within the systemd I guess.

With the information of this bug: https://trac.transmissionbt.com/ticket/5421
Everything 'seems to be right' in /etc/systemd/system/multi-user.target.wants/transmission-daemon.service but still transmission-daemon is not able to reliable bind to the ip address.

Revision history for this message
Maarten Fonville (maarten-fonville) wrote :

I now got a fix.
Problem is that the regular 'network' target in systemd does not define a per se on-linen working internet connection. The trick is to change the systemd configuration for transmission-daemon, open:

/etc/systemd/system/multi-user.target.wants/transmission-daemon.service

Under the [Unit] section, change:
After=network.target

to:
After=network-online.target

summary: - Incorrect start on condition in upstart script for transmission-daemon
+ Incorrect start on condition in systemd and upstart script for
+ transmission-daemon
summary: - Incorrect start on condition in systemd and upstart script for
- transmission-daemon
+ Incorrect conditions in systemd and upstart script for transmission-
+ daemon
Revision history for this message
Maarten Fonville (maarten-fonville) wrote :

A proper systemd configuration file could be done together with the upstream Transmission project

Revision history for this message
Maarten Fonville (maarten-fonville) wrote :

This problem is also applicable to Wily.
Why is the solution not applied in e.g. an Ubuntu-patch?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.