You are not logged in.
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
Service files with After=network.target
Offline
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
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
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
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