You are not logged in.

#1 2015-04-21 16:45:29

sajan
Member
From: USA
Registered: 2015-04-03
Posts: 13
Website

[Solved] systemd - network-online.target inactive dead

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

#2 2015-04-21 17:51:54

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: [Solved] systemd - network-online.target inactive dead

How do you connect to your network?

Offline

#3 2015-04-21 17:53:51

sajan
Member
From: USA
Registered: 2015-04-03
Posts: 13
Website

Re: [Solved] systemd - network-online.target inactive dead

tomk wrote:

How do you connect to your network?

I have Cinnamon DE and NetworkManager installed with the NetworkManager applet.

Offline

#4 2015-04-21 20:39:05

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,732
Website

Re: [Solved] systemd - network-online.target inactive dead

Please post the output of:

systemctl status network-online.target

Do you actually have a working connection?

Offline

#5 2015-04-21 21:18:27

sajan
Member
From: USA
Registered: 2015-04-03
Posts: 13
Website

Re: [Solved] systemd - network-online.target inactive dead

Head_on_a_Stick wrote:

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

#6 2015-04-21 21:46:10

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,732
Website

Re: [Solved] systemd - network-online.target inactive dead

What is the output of:

ls -l /etc/systemd/system/multi-user.target.wants

Offline

#7 2015-04-21 21:48:08

sajan
Member
From: USA
Registered: 2015-04-03
Posts: 13
Website

Re: [Solved] systemd - network-online.target inactive dead

Head_on_a_Stick wrote:

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

#8 2015-04-21 22:09:43

Raynman
Member
Registered: 2011-10-22
Posts: 1,539

Re: [Solved] systemd - network-online.target inactive dead

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.)

Last edited by Raynman (2015-04-21 22:10:12)

Offline

#9 2015-04-21 22:17:52

sajan
Member
From: USA
Registered: 2015-04-03
Posts: 13
Website

Re: [Solved] systemd - network-online.target inactive dead

Raynman wrote:
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

Board footer

Powered by FluxBB