Nyr / openvpn-install

OpenVPN road warrior installer for Ubuntu, Debian, AlmaLinux, Rocky Linux, CentOS and Fedora
MIT License
19.24k stars 4.92k forks source link

Job for openvpn@server.service failed because the control process exited with error code. #551

Closed slrslr closed 5 years ago

slrslr commented 5 years ago

Hello, today the installation command: wget git.io/vpn --no-check-certificate -O openvpn-install.sh && bash openvpn-install.sh

executed on newly installed Ubuntu 16.04 OpenVZ VPS asked me what IP to choose, which port and then proceed and finished with error:

CRL file: /etc/openvpn/easy-rsa/pki/crl.pem

53
Job for openvpn@server.service failed because the control process exited with error code. See "systemctl status openvpn@server.service" and "journalctl -xe" for details.

Finished!

Here i posted above requested commands output:

systemctl status openvpn@server.service

journalctl -xe

What fixed this issue was to comment out line LimitNPROC in /lib/systemd/system/openvpn@.service file Commenting out means to add "#" at the beginning of the line. (source: https://bugs.launchpad.net/ubuntu/+source/openvpn/+bug/1631104) then restart service: systemctl daemon-reload systemctl restart openvpn@server.service

@Nyr if it is not bad idea, maybe make the installation script comment out that line as a workaround: sed -i 's/LimitNPROC/#LimitNPROC/g' /lib/systemd/system/openvpn@.service systemctl daemon-reload systemctl restart openvpn@server.service

Nyr commented 5 years ago

This is a known issue. If you look closely, I actually commented in the Launchpad bug.

Problem is that the Debian and Ubuntu package maintainers are refusing to change this, so for some containers hosted in a server with lots of other customers running OpenVPN, this does happen.

I was hoping that this could be resolved upstream, but this hasn't been the case for years.

I'm going to take another look at it and consider doing something from my side. Changing the service file is not the right way, but there is a proper approach which could be implemented into the script.