You are not logged in.
Basically, I can't make the transmission systemd service start up after the network is up. As per
https://wiki.archlinux.org/index.php/Transmission
I've tried adding a
/etc/systemd/system/transmission.service.d/fixdep.conf
file containing
[Unit]
Requires=network.target
However, journalctl shows that transmission is started after dhcpcd , but never the less it still fails (i presume its because there's a race condition between obtaining the lease and getting the network up, and the the transmission daemon). If I manually restart the service after the system has booted everything is fine. I've also tried adding
[Unit]
After=network-online.target
Wants=network-online.target
As explained in http://www.freedesktop.org/wiki/Softwar … orkTarget/
Which didn't work either. Anybody have any idea how to control this? All i want, is for transmission not to start until we got network. Thats it.
Last edited by justdanyul (2014-12-26 22:32:42)
Offline
Not a Sysadmin issue, moving to Networking...
Offline
Not a Sysadmin issue, moving to Networking...
sorry, wasn't sure which was appropriate. Seemed to be to be a systemd issue, as in, its timing of init scripts rather than a actual problem with any of the individual services, so I thought system administration was appropriate :-)
Last edited by justdanyul (2014-12-26 19:38:27)
Offline
However, journalctl shows that transmission is still started after dhcpcd , which results in it failing.
Isn't this exactly what you want? I mean, the network won't be up until after dhcpcd gets itself an address, right?
Getting proper dependency and ordering might be easier if you were to indicate what network management tool you are using. I know that NetworkManager apparently uses the network-online.target properly, but others don't. It might also help to post some output. Like what does it look like when it fails and what does it look like when it succeeds?
Also, does it consistently fail? Or is it racey and sometimes work just by chance?
I think you should start by trying to make it 'After=' watever network management solution you use.
Offline
justdanyul wrote:However, journalctl shows that transmission is still started after dhcpcd , which results in it failing.
Isn't this exactly what you want? I mean, the network won't be up until after dhcpcd gets itself an address, right?
Getting proper dependency and ordering might be easier if you were to indicate what network management tool you are using. I know that NetworkManager apparently uses the network-online.target properly, but others don't. It might also help to post some output. Like what does it look like when it fails and what does it look like when it succeeds?
Also, does it consistently fail? Or is it racey and sometimes work just by chance?
I think you should start by trying to make it 'After=' watever network management solution you use.
Indeed, I reworded it to make it clearer.
There seems to be a race condition between getting the network up and running, and the transmission daemon. Which transmission consistently looses due to a rather snappy SSD lol. I don't believe I am actually using any network management tool(im actually not sure, I know I haven't explicitly installed one). I tried checking ''systemctl --type=service" and nothing there looked like network management.
Last edited by justdanyul (2014-12-26 22:43:56)
Offline
Well... your machine is getting in IP address somehow. It rather sounds as though dhcpcd is involved. So are you using the dhcpcd.service or the dhcpcd@.service? Because I would try ordering it After that instead of using the target, as the network-online.target is known to not be entirely reliable and the network.target simply means that the network is ready for action (not necessarily that it has established full connectivity).
Offline
Well, as per my first post, I do have a dhcpcd What I meant is that I have no idea if im using NetworkManager or such (and that I certainly didn't explicitly install it
). I tried using 'After' dhcpcd as well, which does what it says on the tin, but that was never the problem (it consistently ran after dhcpcd will the other alternatives as well).
However, progress have been made, I just tried using dhcpcd@.service (as you suggested above), and that did the trick. Weirdly enough, I now works without any 'Requires', 'Wants' or 'After' directive.
Thanks a lot :-)
Offline