You are not logged in.

#1 2013-02-25 21:53:48

orschiro
Member
Registered: 2009-06-04
Posts: 2,136
Website

[sovled] Programs cannot establish connection if internet not at boot

Hello,

I have the problem that all my programs that feature a service such as Crashplan Backup Software, Dropbox, Insync are not able to establish a connection of my internet connection is not available immediately after boot. However, I often have the occasion to connect to my wireless network not immediately after boot. In such cases I have to restart these programs or restart their services in order to let them recognise the established connection.

How do others live with that problem or are you not affected by this?

Regards

Last edited by orschiro (2013-03-12 10:01:01)

Offline

#2 2013-02-25 22:06:23

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [sovled] Programs cannot establish connection if internet not at boot

Service files with After=network.target


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2013-02-25 22:08:59

orschiro
Member
Registered: 2009-06-04
Posts: 2,136
Website

Re: [sovled] Programs cannot establish connection if internet not at boot

Would you modify the original service file of for example Dropbox or create a separate service file?

Offline

#4 2013-03-01 02:44:08

demize
Package Maintainer (PM)
From: Stockholm, Sweden
Registered: 2012-10-23
Posts: 20
Website

Re: [sovled] Programs cannot establish connection if internet not at boot

orschiro wrote:

Would you modify the original service file of for example Dropbox or create a separate service file?

You should copy the original file to /etc/systemd/system/ and then edit it

Offline

#5 2013-03-01 10:56:35

orschiro
Member
Registered: 2009-06-04
Posts: 2,136
Website

Re: [sovled] Programs cannot establish connection if internet not at boot

Then there must be a problem on my system.

Let's take Crashplan for example. The original service file contains:

[Unit]
Description=CrashPlan Backup Engine
After=network.target

However, when I am booting without an immediate internet connection but establish the connection afterwards, Crashplan just says: "Waiting for connection"
I have to manually restart the service to let it find the internet connection.

EDIT:

I just found that this sees to be related to the use of Networkmanager: https://bbs.archlinux.org/viewtopic.php?id=151921

I will try the hint to enable:

systemctl enable NetworkManager-wait-online.service

Last edited by orschiro (2013-03-01 11:01:08)

Offline

#6 2013-03-01 14:20:57

orschiro
Member
Registered: 2009-06-04
Posts: 2,136
Website

Re: [sovled] Programs cannot establish connection if internet not at boot

I enabled NetworkManager-wait-online.service but it fails to start. journalctl -b shows me:

NetworkManager-wait-online.service: main process exited, code=exited, status=1/FAILURE
Failed to start Network Manager Wait Online
Unit NetworkManger-wait-online.service entered failed state
Starting Network.
Reached target Network.

Offline

#7 2013-03-12 10:00:45

orschiro
Member
Registered: 2009-06-04
Posts: 2,136
Website

Re: [sovled] Programs cannot establish connection if internet not at boot

I finally realised that this particular behaviour is related to Network Manager itself. One has to differentiate two cases.

A: Immediate internet connection after boot but during boot programs are started before an interface is set up. This will result in programs such as Dropbox telling you that they are connecting. The solution is to enable an additional service called NetworkManager-wait-online.service.

B: No immediate internet connection after boot, e.g. because you are not at home or connecting later on. The result will be the same as in A even with NetworkManager-wait-online.service being enabled. The reason is that NetworkManager-wait-online.service only delays the start but not infinitely until a connection is established. Actually it does not even test for established connections. In this case you have to use dispatcher scripts. For different programs there are various scripts available in the AUR.

Offline

Board footer

Powered by FluxBB