You are not logged in.
Still trying to get familiar with systemd after years with Ubuntu.
I have Crashplan installed and it's systemd service unit has the following line to wait until the network comes online.
After=network-online.target
However, this doesn't seem to be working. While trying to investigate this, I noticed that the target shows as 'inactive' and 'dead'. Not entirely sure what that means.
➜ ~ systemctl list-units --type=target --all | grep network-online
network-online.target loaded inactive dead Network is Online
Where can I go from here to make sure my Crashplan service only starts after the network is online?
Thanks.
Last edited by sajan (2015-04-21 22:18:14)
Offline
How do you connect to your network?
Offline
How do you connect to your network?
I have Cinnamon DE and NetworkManager installed with the NetworkManager applet.
Offline
Please post the output of:
systemctl status network-online.target
Do you actually have a working connection?
Para todos todo, para nosotros nada
Offline
Please post the output of:
systemctl status network-online.target
Do you actually have a working connection?
Well, I'm connected to the internet via Wifi by the time I get past my lightdm greeter. Not sure if systemd wants something else.
➜ ~ ping google.com
PING google.com (216.58.216.206) 56(84) bytes of data.
64 bytes from ord31s21-in-f14.1e100.net (216.58.216.206): icmp_seq=1 ttl=54 time=21.4 ms
64 bytes from ord31s21-in-f14.1e100.net (216.58.216.206): icmp_seq=2 ttl=54 time=74.9 ms
^C
--- google.com ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1000ms
rtt min/avg/max/mdev = 21.433/48.185/74.938/26.753 ms
➜ ~ systemctl status network-online.target
● network-online.target - Network is Online
Loaded: loaded (/usr/lib/systemd/system/network-online.target; static; vendor preset: disabled)
Active: inactive (dead)
Docs: man:systemd.special(7)
http://www.freedesktop.org/wiki/Software/systemd/NetworkTarget
➜ ~ ping google.com
PING google.com (216.58.216.206) 56(84) bytes of data.
64 bytes from ord31s21-in-f14.1e100.net (216.58.216.206): icmp_seq=1 ttl=54 time=19.3 ms
64 bytes from ord31s21-in-f14.1e100.net (216.58.216.206): icmp_seq=2 ttl=54 time=24.4 ms
64 bytes from ord31s21-in-f14.1e100.net (216.58.216.206): icmp_seq=3 ttl=54 time=19.2 ms
^C
--- google.com ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2003ms
rtt min/avg/max/mdev = 19.243/20.992/24.429/2.435 ms
➜ ~
Last edited by sajan (2015-04-21 21:19:21)
Offline
What is the output of:
ls -l /etc/systemd/system/multi-user.target.wants
Para todos todo, para nosotros nada
Offline
What is the output of:
ls -l /etc/systemd/system/multi-user.target.wants
➜ ~ ls -l /etc/systemd/system/multi-user.target.wants
total 0
lrwxrwxrwx 1 root root 41 Apr 10 23:48 crashplan.service -> /usr/lib/systemd/system/crashplan.service
lrwxrwxrwx 1 root root 38 Apr 8 05:04 mysqld.service -> /usr/lib/systemd/system/mysqld.service
lrwxrwxrwx 1 root root 46 Apr 8 04:04 NetworkManager.service -> /usr/lib/systemd/system/NetworkManager.service
lrwxrwxrwx 1 root root 40 Apr 19 08:36 remote-fs.target -> /usr/lib/systemd/system/remote-fs.target
➜ ~
It is the Crashplan service that is starting before I'm online. Just to clarify, I've changed nothing since starting this thread.
Thanks for your help.
Offline
I have Crashplan installed and it's systemd service unit has the following line to wait until the network comes online.
After=network-online.target
Does it not have a matching Wants= directive? (One does not imply the other.)
Last edited by Raynman (2015-04-21 22:10:12)
Offline
sajan wrote:I have Crashplan installed and it's systemd service unit has the following line to wait until the network comes online.
After=network-online.target
Does it not have a matching Wants= directive? (One does not imply the other.)
It did not! Added the Wants directive, rebooted, and it worked as expected. Awesome, thanks. Marking as solved.
For Googler's...
Originally my crashplan.service's Unit section looked like...
[Unit]
Description=CrashPlan Backup Engine
After=network-online.target
I had to add the Wants directive which looks like...
[Unit]
Description=CrashPlan Backup Engine
After=network-online.target
Wants=network-online.target
Offline