when booting the system, systemctl shows openvpn as failed. in the
openvpn logs I find:
TCP/UDP: Socket bind failed on local address
[AF_INET]192.168.90.1:1194: Cannot assign requested address
but in /etc/network/interfaces I have:
iface jacktrunk.13 inet static
when restarting openvpn via sysctl restart, everything works fine. So
the network interface is not yet up when openvpn tries to bind to it.
As a workaround I patched:
/lib/systemd/system# diff -u openvpn\@.service~ openvpn\@.service
--- openvpn@.service~ 2017-07-18 22:15:17.000000000 +0200
+++ openvpn@.service 2018-04-11 17:39:37.759664731 +0200
@@ -20,6 +20,9 @@
Now when rebooting everything works. Checking the logs I find, that the
first try fails as above, and then 10 seconds later the startup is
retried and everything works fine.
I know this is a hack. But maybe it is not possible to arrange systemd
to to the correct ordering in all use cases and a retry every 10 seconds
could be a more robust solution. Dunno.