我有一个Strato虚拟服务器其上运行 Ubuntu 18 操作系统,我尝试使用以下命令在此服务器上安装 VPN 服务器这指导。但运行后我收到以下错误消息service openvpn@server restart
:
Aug 6 23:39:19 systemd[1]: Started OpenVPN connection to server.
Aug 6 23:39:19 ovpn-server[31964]: Diffie-Hellman initialized with 2048 bit key
Aug 6 23:39:19 ovpn-server[31964]: Outgoing Control Channel Authentication: Using 256 bit message hash 'SHA256' for HMAC authentication
Aug 6 23:39:19 ovpn-server[31964]: Incoming Control Channel Authentication: Using 256 bit message hash 'SHA256' for HMAC authentication
Aug 6 23:39:19 ovpn-server[31964]: TUN/TAP device tap0 opened
Aug 6 23:39:19 ovpn-server[31964]: Note: Cannot set tx queue length on tap0: Operation not permitted (errno=1)
Aug 6 23:39:19 ovpn-server[31964]: do_ifconfig, tt->did_ifconfig_ipv6_setup=0
Aug 6 23:39:19 ovpn-server[31964]: /sbin/ip link set dev tap0 up mtu 1500
Aug 6 23:39:19 ovpn-server[31964]: openvpn_execve: unable to fork: Resource temporarily unavailable (errno=11)
Aug 6 23:39:19 ovpn-server[31964]: Exiting due to fatal error
Aug 6 23:39:19 systemd-udevd[31965]: link_config: autonegotiation is unset or enabled, the speed and duplex are not writable.
Aug 6 23:39:19 systemd-udevd[31965]: link_config: could not get ethtool features for tap0
Aug 6 23:39:19 systemd-udevd[31965]: Could not set offload features of tap0: No such device
Aug 6 23:39:19 systemd[1]: [email protected]: Main process exited, code=exited, status=1/FAILURE
Aug 6 23:39:19 systemd[1]: [email protected]: Failed with result 'exit-code'.
所以似乎tap0
不存在。但为什么缺少它以及如何添加它?
答案1
这是关于LimitNPROC
设定的。您可以通过以下方式获得当前值
systemctl show openvpn@server --property=LimitNPROC
您可以通过将其添加到单元文件来解决该问题
[Service]
LimitNPROC=infinity
然后systemctl daemon-reload
在重新启动 OpenVPN 服务之前运行。