OpenVPN发送SIGHUP重启失败:无法打开配置文件求助
OpenVPN发送SIGHUP信号重启失败
按照ArchWiki指引添加了systemd服务,通过向OpenVPN进程发送SIGHUP信号实现重启。但存在以下异常:
- 使用
sudo systemctl start openvpn-client@chenyichi可正常启动进程 - 执行
sudo /usr/bin/pkill --signal SIGHUP --exact openvpn后,进程重启失败
完整错误日志
× openvpn-client@chenyichi.service - OpenVPN tunnel for chenyichi Loaded: loaded (/usr/lib/systemd/system/openvpn-client@.service; enabled; preset: disabled) Active: failed (Result: exit-code) since Wed 2023-12-20 15:26:40 CST; 9min ago Duration: 1min 51.529s Docs: man:openvpn(8) https://community.openvpn.net/openvpn/wiki/Openvpn24ManPage https://community.openvpn.net/openvpn/wiki/HOWTO Process: 38264 ExecStart=/usr/bin/openvpn --suppress-timestamps --nobind --config /etc/openvpn/client/chenyichi.conf (code=exited, status=1/FAILURE) Main PID: 38264 (code=exited, status=1/FAILURE) Status: "Initialization Sequence Completed" CPU: 66ms 12月 20 15:26:40 trswnca-y7000p openvpn[38264]: net_route_v4_del: 192.168.1.0/24 via 10.8.0.93 dev [NULL] table 0 metric -1 12月 20 15:26:40 trswnca-y7000p openvpn[38264]: net_route_v4_del: 172.18.16.0/22 via 10.8.0.93 dev [NULL] table 0 metric -1 12月 20 15:26:40 trswnca-y7000p openvpn[38264]: net_route_v4_del: 10.8.0.1/32 via 10.8.0.93 dev [NULL] table 0 metric -1 12月 20 15:26:40 trswnca-y7000p openvpn[38264]: Closing TUN/TAP interface 12月 20 15:26:40 trswnca-y7000p openvpn[38264]: net_addr_ptp_v4_del: 10.8.0.94 dev tun0 12月 20 15:26:40 trswnca-y7000p openvpn[38264]: SIGHUP[hard,] received, process restarting 12月 20 15:26:40 trswnca-y7000p openvpn[38264]: Options error: In [CMD-LINE]:1: Error opening configuration file: /etc/openvpn/client/chenyichi.conf 12月 20 15:26:40 trswnca-y7000p openvpn[38264]: Use --help for more information. 12月 20 15:26:40 trswnca-y7000p systemd[1]: openvpn-client@chenyichi.service: Main process exited, code=exited, status=1/FAILURE 12月 20 15:26:40 trswnca-y7000p systemd[1]: openvpn-client@chenyichi.service: Failed with result 'exit-code'.
配置文件权限信息
$ ls -l /etc/openvpn/client total 16 -rw-r--r-- 1 root root 13257 12月20日 00:47 chenyichi.conf
已尝试将文件所属用户改为普通用户,问题依旧。
内容的提问来源于stack exchange,提问作者Yichi Chen
相关产品推荐
相关产品推荐

