내 OpenVPN 연결이 계속 끊어집니다. 저는 이 주제에 대해 잘 모릅니다. 올바른 방향을 알려 주실 수 있나요? 이것은 a 및 기타 관련 라인을 /var/log/messages
포함하는 tail 입니다 .<warn>
Jul 15 21:27:58 notebook NetworkManager[907]: <info> Tunnel Device: tun0
Jul 15 21:27:58 notebook NetworkManager[907]: <info> IPv4 configuration:
Jul 15 21:27:58 notebook NetworkManager[907]: <info> Internal Gateway: 10.8.0.65
Jul 15 21:27:58 notebook NetworkManager[907]: <info> Internal Address: 10.8.0.66
Jul 15 21:27:58 notebook NetworkManager[907]: <info> Internal Prefix: 32
Jul 15 21:27:58 notebook NetworkManager[907]: <info> Internal Point-to-Point Address: 10.8.0.65
Jul 15 21:27:58 notebook NetworkManager[907]: <info> Maximum Segment Size (MSS): 0
Jul 15 21:27:58 notebook NetworkManager[907]: <info> Static Route: 10.8.0.1/32 Next Hop: 10.8.0.1
Jul 15 21:27:58 notebook NetworkManager[907]: <info> Forbid Default Route: no
Jul 15 21:27:58 notebook NetworkManager[907]: <info> Internal DNS: 10.8.0.1
Jul 15 21:27:58 notebook nm-openvpn[5675]: Initialization Sequence Completed
Jul 15 21:27:58 notebook NetworkManager[907]: <info> DNS Domain: '(none)'
Jul 15 21:27:58 notebook NetworkManager[907]: <info> No IPv6 configuration
Jul 15 21:27:59 notebook NetworkManager[907]: <info> VPN connection 'Some VPN' (IP Config Get) complete.
Jul 15 21:27:59 notebook NetworkManager[907]: <info> Policy set 'Some VPN' (tun0) as default for IPv4 routing and DNS.
Jul 15 21:27:59 notebook NetworkManager[907]: <warn> /sys/devices/virtual/net/tun0: couldn't determine device driver; ignoring...
Jul 15 21:27:59 notebook NetworkManager[907]: <info> VPN plugin state changed: started (4)
Jul 15 21:28:44 notebook NetworkManager[907]: <info> VPN plugin state changed: stopping (5)
Jul 15 21:28:44 notebook NetworkManager[907]: <info> VPN plugin state changed: stopped (6)
Jul 15 21:28:44 notebook NetworkManager[907]: <info> VPN plugin state change reason: 0
Jul 15 21:28:44 notebook avahi-daemon[910]: Withdrawing workstation service for tun0.
Jul 15 21:28:44 notebook avahi-daemon[910]: Withdrawing address record for 192.168.0.5 on em1.
Jul 15 21:28:44 notebook avahi-daemon[910]: Leaving mDNS multicast group on interface em1.IPv4 with address 192.168.0.5.
Jul 15 21:28:44 notebook avahi-daemon[910]: Interface em1.IPv4 no longer relevant for mDNS.
Jul 15 21:28:44 notebook avahi-daemon[910]: Joining mDNS multicast group on interface em1.IPv4 with address 192.168.0.5.
Jul 15 21:28:44 notebook avahi-daemon[910]: New relevant interface em1.IPv4 for mDNS.
Jul 15 21:28:44 notebook avahi-daemon[910]: Registering new address record for 192.168.0.5 on em1.IPv4.
Jul 15 21:28:44 notebook nm-openvpn[5675]: SIGTERM[hard,] received, process exiting
Jul 15 21:28:45 notebook NetworkManager[907]: <info> Policy set 'System em1' (em1) as default for IPv4 routing and DNS.
Jul 15 21:28:45 notebook NetworkManager[907]: <warn> error disconnecting VPN: Could not process the request because no VPN connection was active.
Jul 15 21:28:45 notebook NetworkManager[907]: <warn> (5) failed to find interface name for index
Jul 15 21:28:45 notebook NetworkManager[907]: nm_system_iface_flush_routes: assertion `iface != NULL' failed
Jul 15 21:28:45 notebook NetworkManager[907]: <warn> (5) failed to find interface name for index
Jul 15 21:28:49 notebook NetworkManager[907]: <info> VPN service 'openvpn' disappeared
답변1
해결 방법으로 openvpn이 아직 실행 중인지 확인하는 스크립트를 생성하세요.
if ! pgrep "openvpn" > /dev/null; then
/usr/sbin/service openvpn restart
echo "["$(date "+%Y-%m-%d %H:%M:%S")"] openvpn restarted">> /var/log/openvpn.log
fi
그리고 crontab에서 채팅 스크립트를 자세히 호출합니다.