当我直接从命令行调用 OpenVPN 时,OpenVPN 启动并运行得很好,但是当我尝试通过 systemd 将其作为进程启动时,它会抛出一个失败错误,我无法找到解决方案。
这是结果(“vpnht-128”是我的配置文件的名称):systemctl status [email protected]
[email protected] - OpenVPN connection to vpnht-128
Loaded: loaded (/usr/lib/systemd/system/[email protected]; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Sal 2015-04-21 15:25:01 EEST; 5h 58min ago
Process: 295 ExecStart=/usr/bin/openvpn --cd /etc/openvpn --config /etc/openvpn/%i.conf --daemon openvpn@%i --writepid /run/openvpn@%i.pid (code=exited, status=1/FAILURE)
Apr 21 15:23:31 ben systemd[1]: Starting OpenVPN connection to vpnht-128...
Apr 21 15:23:32 ben openvpn@vpnht-128[295]: OpenVPN 2.3.6 x86_64-unknown-linux-gnu [SSL (OpenSSL)] [LZO] [EPOLL] [MH] [IPv6] built on Dec 2 2014
Apr 21 15:23:32 ben openvpn@vpnht-128[295]: library versions: OpenSSL 1.0.2a 19 Mar 2015, LZO 2.09
Apr 21 15:25:01 ben systemd[1]: [email protected] start operation timed out. Terminating.
Apr 21 15:25:01 ben openvpn@vpnht-128[295]: ERROR: could not not read Auth password from stdin
Apr 21 15:25:01 ben openvpn@vpnht-128[295]: Exiting due to fatal error
Apr 21 15:25:01 ben systemd[1]: [email protected]: control process exited, code=exited status=1
Apr 21 15:25:01 ben systemd[1]: Failed to start OpenVPN connection to vpnht-128.
Apr 21 15:25:01 ben systemd[1]: Unit [email protected] entered failed state.
Apr 21 15:25:01 ben systemd[1]: [email protected] failed.
我想做的就是自动通过管道输入我的 VPN 用户名和密码。
我提前道歉,因为有一个关于这个问题的解决线程,但我花了一整天时间搜索各种论坛,却没有找到具体的解决方案。我错过了什么?
答案1
我发现我需要更新第二个 OpenVPN 配置文件来查找auth.dat
.现在可以了。