openvpn
단위 파일 ExecStart=
에서 정확한 호출을 사용하여 명령 행에서 올바르게 시작 systemd
합니다.
/usr/sbin/openvpn --daemon ovpn-server --status /run/openvpn/server.status 10 --cd /etc/openvpn --script-security 2 --config /etc/openvpn/server.conf /run/openvpn/server.pid
ps ax
프로세스가 있는지 확인합니다.
1634 ? Ss 0:00 /usr/sbin/openvpn --daemon ovpn-server --status /run/openvpn/server.status 10 --cd /etc/openvpn --script-security 2 --config /etc/openvpn/server.conf --writepid /run/openvpn/
그러나 systemctl start openvpn@server
성공하지 못했습니다 :
● openvpn@server.service - OpenVPN connection to server
Loaded: loaded (/lib/systemd/system/openvpn@.service; disabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Thu 2016-03-17 09:54:52 UTC; 4s ago
Docs: man:openvpn(8)
https://community.openvpn.net/openvpn/wiki/Openvpn23ManPage
https://community.openvpn.net/openvpn/wiki/HOWTO
Process: 1679 ExecStart=/usr/sbin/openvpn --daemon ovpn-server --status /run/openvpn/server.status 10 --cd /etc/openvpn --script-security 2 --config /etc/openvpn/server.conf --writepid /run/openvpn/s
Main PID: 819 (code=exited, status=1/FAILURE)
Mar 17 09:54:52 vpn ovpn-server[1679]: push_ifconfig_ipv6_remote = ::
Mar 17 09:54:52 vpn ovpn-server[1679]: enable_c2c = DISABLED
Mar 17 09:54:52 vpn ovpn-server[1679]: duplicate_cn = DISABLED
Mar 17 09:54:52 vpn ovpn-server[1679]: cf_max = 0
Mar 17 09:54:52 vpn ovpn-server[1679]: cf_per = 0
Mar 17 09:54:52 vpn ovpn-server[1679]: max_clients = 1024
Mar 17 09:54:52 vpn systemd[1]: openvpn@server.service: Control process exited, code=exited status=1
Mar 17 09:54:52 vpn systemd[1]: Failed to start OpenVPN connection to server.
Mar 17 09:54:52 vpn systemd[1]: openvpn@server.service: Unit entered failed state.
Mar 17 09:54:52 vpn systemd[1]: openvpn@server.service: Failed with result 'exit-code'.
나는 journalctl | grep ovpn-server | tail -n 100
그것이 포크에 실패했다는 것을 해석 합니다.
Mar 17 09:57:44 vpn ovpn-server[1693]: OpenVPN 2.3.10 x86_64-pc-linux-gnu [SSL (OpenSSL)] [LZO] [EPOLL] [PKCS11] [MH] [IPv6] built on Feb 2 2016
Mar 17 09:57:44 vpn ovpn-server[1693]: library versions: OpenSSL 1.0.2g 1 Mar 2016, LZO 2.08
Mar 17 09:57:44 vpn ovpn-server[1693]: daemon() failed or unsupported: Resource temporarily unavailable (errno=11)
Mar 17 09:57:44 vpn ovpn-server[1693]: Exiting due to fatal error
LimitNPROC
했습니다. 답변과 같이 주석을 달아 서비스가 정상적으로 시작되었습니다.