我有一台启用了 SSH 的服务器。它是 Ubuntu 18.04 LTS。与 SSH 服务器的连接有时会冻结,当它发生冻结时,连接到它的其他人报告它也冻结了。有时,大约 10-50 秒后,它会解冻并再次“正常”运行。这已经成为一个常见问题,我想知道是什么原因造成的?如果你们需要日志或任何东西,我很乐意提供它们。此外,如果这可能有帮助,我最近确实在机器上安装了 OpenVPN,虽然这台机器是新的,所以 OpenVPN 是与它一起安装的。不确定这是否也会导致问题。
syslog
:
Jan 30 21:57:50 staff-libraryofcode NetworkManager[1047]: <info> [1548903470.3868] manager: NetworkManager state is now CONNECTED_SITE
Jan 30 21:57:50 staff-libraryofcode dbus-daemon[1000]: [system] Activating via systemd: service name='org.freedesktop.nm_dispatcher' unit='dbus-org.freedesktop.nm-dispatcher.service' requested by ':1.14' (uid=0 pid=1047 comm="/usr/sbin/NetworkManager --no-daemon " label="unconfined")
Jan 30 21:57:50 staff-libraryofcode whoopsie[1324]: [21:57:50] offline
Jan 30 21:57:50 staff-libraryofcode systemd[1]: Starting Network Manager Script Dispatcher Service...
Jan 30 21:57:50 staff-libraryofcode dbus-daemon[1000]: [system] Successfully activated service 'org.freedesktop.nm_dispatcher'
Jan 30 21:57:50 staff-libraryofcode systemd[1]: Started Network Manager Script Dispatcher Service.
Jan 30 21:57:50 staff-libraryofcode nm-dispatcher: req:1 'connectivity-change': new request (1 scripts)
Jan 30 21:57:50 staff-libraryofcode nm-dispatcher: req:1 'connectivity-change': start running ordered scripts...
Jan 30 21:57:51 staff-libraryofcode whoopsie[1324]: [21:57:51] Cannot reach: https://daisy.ubuntu.com
Jan 30 22:00:47 staff-libraryofcode systemd[1]: Started Run anacron jobs.
Jan 30 22:00:47 staff-libraryofcode anacron[11097]: Anacron 2.3 started on 2019-01-30
Jan 30 22:00:47 staff-libraryofcode anacron[11097]: Normal exit (0 jobs run)
Jan 30 22:07:50 staff-libraryofcode NetworkManager[1047]: <info> [1548904070.6125] manager: NetworkManager state is now CONNECTED_GLOBAL
Jan 30 22:07:50 staff-libraryofcode dbus-daemon[1000]: [system] Activating via systemd: service name='org.freedesktop.nm_dispatcher' unit='dbus-org.freedesktop.nm-dispatcher.service' requested by ':1.14' (uid=0 pid=1047 comm="/usr/sbin/NetworkManager --no-daemon " label="unconfined")
Jan 30 22:07:50 staff-libraryofcode whoopsie[1324]: [22:07:50] The default IPv4 route is: /org/freedesktop/NetworkManager/ActiveConnection/1
Jan 30 22:07:50 staff-libraryofcode whoopsie[1324]: [22:07:50] Not a paid data plan: /org/freedesktop/NetworkManager/ActiveConnection/1
Jan 30 22:07:50 staff-libraryofcode whoopsie[1324]: [22:07:50] Found usable connection: /org/freedesktop/NetworkManager/ActiveConnection/1
Jan 30 22:07:50 staff-libraryofcode systemd[1]: Starting Network Manager Script Dispatcher Service...
Jan 30 22:07:50 staff-libraryofcode dbus-daemon[1000]: [system] Successfully activated service 'org.freedesktop.nm_dispatcher'
Jan 30 22:07:50 staff-libraryofcode systemd[1]: Started Network Manager Script Dispatcher Service.
Jan 30 22:07:50 staff-libraryofcode nm-dispatcher: req:1 'connectivity-change': new request (1 scripts)
Jan 30 22:07:50 staff-libraryofcode nm-dispatcher: req:1 'connectivity-change': start running ordered scripts...
Jan 30 22:07:51 staff-libraryofcode whoopsie[1324]: [22:07:51] online
Jan 30 22:17:01 staff-libraryofcode CRON[11198]: (root) CMD ( cd / && run-parts --report /etc/cron.hourly)
Jan 30 22:18:26 staff-libraryofcode systemd[1]: Stopping User Manager for UID 1000...
Jan 30 22:18:26 staff-libraryofcode systemd[10305]: Stopped target Default.
Jan 30 22:18:26 staff-libraryofcode systemd[10305]: Stopped target Basic System.
Jan 30 22:18:26 staff-libraryofcode systemd[10305]: Stopped target Timers.
Jan 30 22:18:26 staff-libraryofcode systemd[10305]: Stopped target Sockets.
Jan 30 22:18:26 staff-libraryofcode systemd[10305]: Closed GnuPG cryptographic agent and passphrase cache (access for web browsers).
Jan 30 22:18:26 staff-libraryofcode systemd[10305]: Closed GnuPG cryptographic agent and passphrase cache.
Jan 30 22:18:26 staff-libraryofcode systemd[10305]: Closed D-Bus User Message Bus Socket.
Jan 30 22:18:26 staff-libraryofcode systemd[10305]: Closed GnuPG network certificate management daemon.
Jan 30 22:18:26 staff-libraryofcode systemd[10305]: Closed GnuPG cryptographic agent (ssh-agent emulation).
Jan 30 22:18:26 staff-libraryofcode systemd[10305]: Closed GnuPG cryptographic agent and passphrase cache (restricted).
Jan 30 22:18:26 staff-libraryofcode systemd[10305]: Stopped target Paths.
Jan 30 22:18:26 staff-libraryofcode systemd[10305]: Stopped Pending report trigger for Ubuntu Report.
Jan 30 22:18:26 staff-libraryofcode systemd[10305]: Reached target Shutdown.
Jan 30 22:18:26 staff-libraryofcode systemd[10305]: Starting Exit the Session...
Jan 30 22:18:26 staff-libraryofcode systemd[10305]: Received SIGRTMIN+24 from PID 11212 (kill).
Jan 30 22:18:26 staff-libraryofcode systemd[1]: Stopped User Manager for UID 1000.
Jan 30 22:18:26 staff-libraryofcode systemd[1]: Removed slice User Slice of matthew.
Jan 30 22:58:02 staff-libraryofcode systemd[1]: Created slice User Slice of matthew.
Jan 30 22:58:02 staff-libraryofcode systemd[1]: Starting User Manager for UID 1000...
Jan 30 22:58:03 staff-libraryofcode systemd[1]: Started Session 19 of user matthew.
Jan 30 22:58:03 staff-libraryofcode systemd[11425]: Reached target Timers.
Jan 30 22:58:03 staff-libraryofcode systemd[11425]: Listening on GnuPG network certificate management daemon.
Jan 30 22:58:03 staff-libraryofcode systemd[11425]: Listening on GnuPG cryptographic agent and passphrase cache.
Jan 30 22:58:03 staff-libraryofcode systemd[11425]: Listening on GnuPG cryptographic agent and passphrase cache (access for web browsers).
Jan 30 22:58:03 staff-libraryofcode systemd[11425]: Listening on GnuPG cryptographic agent and passphrase cache (restricted).
Jan 30 22:58:03 staff-libraryofcode systemd[11425]: Starting D-Bus User Message Bus Socket.
Jan 30 22:58:03 staff-libraryofcode systemd[11425]: Started Pending report trigger for Ubuntu Report.
Jan 30 22:58:03 staff-libraryofcode systemd[11425]: Reached target Paths.
Jan 30 22:58:03 staff-libraryofcode systemd[11425]: Listening on GnuPG cryptographic agent (ssh-agent emulation).
Jan 30 22:58:03 staff-libraryofcode systemd[11425]: Listening on D-Bus User Message Bus Socket.
Jan 30 22:58:03 staff-libraryofcode systemd[11425]: Reached target Sockets.
Jan 30 22:58:03 staff-libraryofcode systemd[11425]: Reached target Basic System.
Jan 30 22:58:03 staff-libraryofcode systemd[11425]: Reached target Default.
Jan 30 22:58:03 staff-libraryofcode systemd[11425]: Startup finished in 157ms.
Jan 30 22:58:03 staff-libraryofcode systemd[1]: Started User Manager for UID 1000.
Jan 30 22:58:10 staff-libraryofcode systemd[1]: Started Session 21 of user matthew.
Jan 30 22:58:38 staff-libraryofcode systemd[1]: Started Session 22 of user matthew.
连接到 OpenVPN 或 PPTP VPN 时似乎也会出现这种情况。连接会短暂冻结,就像我们不再连接到服务器并且无法访问任何网站一样。10-50 秒后,一切又“神奇地”开始恢复正常。