FS#40838 - [openvpn] Crashes trying to start before the network is set
Attached to Project:
Arch Linux
Opened by Cláudio Pereira (claudiop) - Saturday, 14 June 2014, 11:17 GMT
Last edited by Thomas Bächler (brain0) - Friday, 12 September 2014, 17:03 GMT
Opened by Cláudio Pereira (claudiop) - Saturday, 14 June 2014, 11:17 GMT
Last edited by Thomas Bächler (brain0) - Friday, 12 September 2014, 17:03 GMT
|
Details
Description:
The openvpn@server service crashes if set as enabled on boot, but not if started manually through systemctl. The problem turns to be the service trying to start before the network is ready. A good illustration of the problem is the attached svg. I don't know if it is easily reproducible, but in my case it first happened after turning port sharing on. Additional info: Openvpn 2.3.4-1 I don't have the full log any more, but the problematic line was: TCP/UDP: Socket bind failed on local address aaa.xxx.yyy.zzz Cannot assign requested address I am sorry for not showing any configuration (its not a great idea), but its a fairly standard configuration, with non-default cryptographic settings and port sharing. As I said previously, I suspect that the late triggered the issue, but I am not sure. Solution: The unit file right now is: #------------------------- [Unit] Description=OpenVPN connection to %i [Service] Type=forking ExecStart=/usr/bin/openvpn --cd /etc/openvpn --config /etc/openvpn/%i.conf --daemon openvpn@%i --writepid /run/openvpn@%i.pid PIDFile=/run/openvpn@%i.pid [Install] WantedBy=multi-user.target #------------------------ And adding "After=network.target" in the [Unit] instructions, solved the bug. |
This task depends upon
Closed by Thomas Bächler (brain0)
Friday, 12 September 2014, 17:03 GMT
Reason for closing: Not a bug
Friday, 12 September 2014, 17:03 GMT
Reason for closing: Not a bug
I'm guessing it's removal is related to
FS#35089?I've also re-added "After=network.target" to my unit file, just like ntp and other network-relying service files has it.
The mentioned bug
FS#35089was closed as "won't implement" so I dont see why parts of it seems to have been implemented?Depending on its use case, OpenVPN has to be ordered Before=network.target, After=network.target or not at all. We cannot provide a useful default here.