16.04,网络停止工作

16.04,网络停止工作

Ubuntu 16.04。网络(有线或 Wi-Fi)在一段时间后停止工作。

这是我/var/log/syslog上次出现问题后

davide@brenna:~$ cat /var/log/syslog
Apr 29 09:30:23 brenna colord[1150]: (colord:1150): Cd-WARNING **: failed to get session [pid 4355]: Device o indirizzo non esistente
Apr 29 09:30:40 brenna anacron[896]: Job `cron.daily' terminated
Apr 29 09:30:40 brenna anacron[896]: Normal exit (1 job run)
Apr 29 09:32:28 brenna com.ubuntu.OneConf[1671]: WARNING:oneconf.hosts:Error in loading other_hosts file: [Errno 2] No such file or directory: '/home/davide/.cache/oneconf/3bdacd8fb8c349449cd523c9f50dfcb9/other_hosts'
Apr 29 09:36:46 brenna AptDaemon: INFO: Quitting due to inactivity
Apr 29 09:36:46 brenna AptDaemon: INFO: Quitting was requested
Apr 29 09:36:46 brenna org.debian.apt[943]: 09:36:46 AptDaemon [INFO]: Quitting due to inactivity
Apr 29 09:36:46 brenna org.debian.apt[943]: 09:36:46 AptDaemon [INFO]: Quitting was requested
Apr 29 09:40:15 brenna upowerd[1831]: (upowerd:1831): UPower-Linux-WARNING **: energy 44,400000 bigger than full 31,912500
Apr 29 09:40:23 brenna avahi-daemon[940]: Withdrawing address record for 192.168.0.216 on eth0.
Apr 29 09:40:23 brenna avahi-daemon[940]: Leaving mDNS multicast group on interface eth0.IPv4 with address 192.168.0.216.
Apr 29 09:40:23 brenna gnome-session[1803]: [2045:2151:0429/094023:ERROR:cloud_print_proxy_backend.cc(538)] Notifications for connector 9EEEB091-559D-9344-6BAC-C8DDB4835FE9 disabled.
Apr 29 09:40:23 brenna gnome-session[1803]: [2045:2151:0429/094023:ERROR:cloud_print_proxy_backend.cc(538)] Notifications for connector 9EEEB091-559D-9344-6BAC-C8DDB4835FE9 disabled.
Apr 29 09:40:23 brenna avahi-daemon[940]: Interface eth0.IPv4 no longer relevant for mDNS.
Apr 29 09:40:23 brenna systemd[1]: Starting Cleanup of Temporary Directories...
Apr 29 09:40:23 brenna systemd-tmpfiles[7098]: [/usr/lib/tmpfiles.d/var.conf:14] Duplicate line for path "/var/log", ignoring.
Apr 29 09:40:23 brenna systemd[1]: Started Cleanup of Temporary Directories.
Apr 29 09:40:23 brenna whoopsie[920]: [09:40:23] Cannot reach: https://daisy.ubuntu.com
Apr 29 09:40:23 brenna whoopsie[920]: [09:40:23] offline
Apr 29 09:40:24 brenna whoopsie[920]: [09:40:24] Cannot reach: https://daisy.ubuntu.com
Apr 29 09:41:23 brenna whoopsie[920]: [09:41:23] Cannot reach: https://daisy.ubuntu.com

拔下插头并重新插入(或关闭 Wi-Fi 卡并重新启用它)可以解决问题,直到下次重启(即,此后网络可以无限期地工作,直到重启)。

这非常烦人,尤其是当这种情况发生时没有任何视觉输出。它只是停止工作,当你尝试提交在线请求时(可能在论坛上发帖,或者尝试访问新页面),它就不再起作用了。

有什么提示吗?

今天我能够在问题发生之前更新,所以syslog美国

davide@brenna:~$ cat /var/log/syslog
Apr 30 09:19:18 brenna colord[1137]: (colord:1137): Cd-WARNING **: failed to get session [pid 4254]: Device o indirizzo non esistente
Apr 30 09:19:31 brenna anacron[962]: Job `cron.daily' terminated
Apr 30 09:19:31 brenna anacron[962]: Normal exit (1 job run)
Apr 30 09:26:23 brenna AptDaemon: INFO: Quitting due to inactivity
Apr 30 09:26:23 brenna AptDaemon: INFO: Quitting was requested
Apr 30 09:26:23 brenna org.debian.apt[891]: 09:26:23 AptDaemon [INFO]: Quitting due to inactivity
Apr 30 09:26:23 brenna org.debian.apt[891]: 09:26:23 AptDaemon [INFO]: Quitting was requested
Apr 30 09:29:18 brenna avahi-daemon[979]: Withdrawing address record for 192.168.0.216 on eth0.
Apr 30 09:29:18 brenna avahi-daemon[979]: Leaving mDNS multicast group on interface eth0.IPv4 with address 192.168.0.216.
Apr 30 09:29:18 brenna avahi-daemon[979]: Interface eth0.IPv4 no longer relevant for mDNS.
Apr 30 09:29:18 brenna systemd[1]: Starting Cleanup of Temporary Directories...
Apr 30 09:29:18 brenna systemd-tmpfiles[4409]: [/usr/lib/tmpfiles.d/var.conf:14] Duplicate line for path "/var/log", ignoring.
Apr 30 09:29:18 brenna gnome-session[2299]: [2547:2656:0430/092918:ERROR:cloud_print_proxy_backend.cc(538)] Notifications for connector 9EEEB091-559D-9344-6BAC-C8DDB4835FE9 disabled.
Apr 30 09:29:18 brenna gnome-session[2299]: [2547:2656:0430/092918:ERROR:cloud_print_proxy_backend.cc(538)] Notifications for connector 9EEEB091-559D-9344-6BAC-C8DDB4835FE9 disabled.
Apr 30 09:29:18 brenna systemd[1]: Started Cleanup of Temporary Directories.
Apr 30 09:29:18 brenna whoopsie[982]: [09:29:18] Cannot reach: https://daisy.ubuntu.com
Apr 30 09:29:18 brenna whoopsie[982]: [09:29:18] offline
Apr 30 09:29:19 brenna whoopsie[982]: [09:29:19] Cannot reach: https://daisy.ubuntu.com
Apr 30 09:32:46 brenna whoopsie[982]: [09:32:46] Cannot reach: https://daisy.ubuntu.com
Apr 30 09:33:02 brenna whoopsie[982]: [09:33:02] Cannot reach: https://daisy.ubuntu.com
Apr 30 09:33:18 brenna whoopsie[982]: [09:33:18] Cannot reach: https://daisy.ubuntu.com
Apr 30 09:38:24 brenna whoopsie[982]: [09:38:24] Cannot reach: https://daisy.ubuntu.com
Apr 30 09:39:00 brenna dbus[891]: [system] Activating service name='org.debian.apt' (using servicehelper)
Apr 30 09:39:01 brenna AptDaemon: INFO: Initializing daemon
Apr 30 09:39:01 brenna org.debian.apt[891]: 09:39:01 AptDaemon [INFO]: Initializing daemon
Apr 30 09:39:01 brenna dbus[891]: [system] Successfully activated service 'org.debian.apt'
Apr 30 09:39:01 brenna AptDaemon.PackageKit: INFO: Initializing PackageKit compat layer
Apr 30 09:39:01 brenna org.debian.apt[891]: /usr/lib/python3/dist-packages/aptdaemon/worker/pkworker.py:35: PyGIWarning: PackageKitGlib was imported without specifying a version first. Use gi.require_version('PackageKitGlib', '1.0') before import to ensure that the right version gets loaded.
Apr 30 09:39:01 brenna org.debian.apt[891]:   from gi.repository import PackageKitGlib as pk
Apr 30 09:39:01 brenna org.debian.apt[891]: 09:39:01 AptDaemon.PackageKit [INFO]: Initializing PackageKit compat layer
Apr 30 09:39:01 brenna AptDaemon: INFO: CommitPackages() was called: dbus.Array([dbus.String('')], signature=dbus.Signature('s')), dbus.Array([dbus.String('')], signature=dbus.Signature('s')), dbus.Array([dbus.String('')], signature=dbus.Signature('s')), dbus.Array([dbus.String('')], signature=dbus.Signature('s')), dbus.Array([dbus.String('ubuntu-core-launcher')], signature=dbus.Signature('s')), dbus.Array([dbus.String('')], signature=dbus.Signature('s'))
Apr 30 09:39:01 brenna org.debian.apt[891]: 09:39:01 AptDaemon [INFO]: CommitPackages() was called: dbus.Array([dbus.String('')], signature=dbus.Signature('s')), dbus.Array([dbus.String('')], signature=dbus.Signature('s')), dbus.Array([dbus.String('')], signature=dbus.Signature('s')), dbus.Array([dbus.String('')], signature=dbus.Signature('s')), dbus.Array([dbus.String('ubuntu-core-launcher')], signature=dbus.Signature('s')), dbus.Array([dbus.String('')], signature=dbus.Signature('s'))
Apr 30 09:39:01 brenna AptDaemon.Trans: INFO: Queuing transaction /org/debian/apt/transaction/c920bbc5aef04a96b9cfe22ca0070cab
Apr 30 09:39:01 brenna org.debian.apt[891]: 09:39:01 AptDaemon.Trans [INFO]: Queuing transaction /org/debian/apt/transaction/c920bbc5aef04a96b9cfe22ca0070cab
Apr 30 09:39:01 brenna AptDaemon.Worker: INFO: Simulating trans: /org/debian/apt/transaction/c920bbc5aef04a96b9cfe22ca0070cab
Apr 30 09:39:01 brenna org.debian.apt[891]: 09:39:01 AptDaemon.Worker [INFO]: Simulating trans: /org/debian/apt/transaction/c920bbc5aef04a96b9cfe22ca0070cab
Apr 30 09:39:01 brenna AptDaemon.Worker: INFO: Committing packages: dbus.Array([], signature=dbus.Signature('s')), dbus.Array([], signature=dbus.Signature('s')), dbus.Array([], signature=dbus.Signature('s')), dbus.Array([], signature=dbus.Signature('s')), dbus.Array([dbus.String('ubuntu-core-launcher')], signature=dbus.Signature('s')), dbus.Array([], signature=dbus.Signature('s'))
Apr 30 09:39:01 brenna org.debian.apt[891]: 09:39:01 AptDaemon.Worker [INFO]: Committing packages: dbus.Array([], signature=dbus.Signature('s')), dbus.Array([], signature=dbus.Signature('s')), dbus.Array([], signature=dbus.Signature('s')), dbus.Array([], signature=dbus.Signature('s')), dbus.Array([dbus.String('ubuntu-core-launcher')], signature=dbus.Signature('s')), dbus.Array([], signature=dbus.Signature('s'))
Apr 30 09:39:02 brenna AptDaemon.Worker: INFO: Processing transaction /org/debian/apt/transaction/c920bbc5aef04a96b9cfe22ca0070cab
Apr 30 09:39:02 brenna org.debian.apt[891]: 09:39:02 AptDaemon.Worker [INFO]: Processing transaction /org/debian/apt/transaction/c920bbc5aef04a96b9cfe22ca0070cab
Apr 30 09:39:02 brenna gnome-session[2299]: debconf: DbDriver "passwords" warning: could not open /var/cache/debconf/passwords.dat: Permission denied
Apr 30 09:39:04 brenna kernel: [ 1491.033247] audit_printk_skb: 52 callbacks suppressed
Apr 30 09:39:04 brenna kernel: [ 1491.033251] audit: type=1400 audit(1462001944.072:28): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="/usr/bin/ubuntu-core-launcher" pid=4526 comm="apparmor_parser"
Apr 30 09:39:03 brenna gnome-session[2299]: message repeated 2 times: [ debconf: DbDriver "passwords" warning: could not open /var/cache/debconf/passwords.dat: Permission denied]
Apr 30 09:39:05 brenna AptDaemon.Worker: INFO: Finished transaction /org/debian/apt/transaction/c920bbc5aef04a96b9cfe22ca0070cab
Apr 30 09:39:05 brenna org.debian.apt[891]: /usr/lib/python3/dist-packages/aptdaemon/progress.py:491: Warning: Source ID 41 was not found when attempting to remove it
Apr 30 09:39:05 brenna org.debian.apt[891]:   GLib.source_remove(id)
Apr 30 09:39:05 brenna org.debian.apt[891]: /usr/lib/python3/dist-packages/aptdaemon/progress.py:491: Warning: Source ID 42 was not found when attempting to remove it
Apr 30 09:39:05 brenna org.debian.apt[891]:   GLib.source_remove(id)
Apr 30 09:39:05 brenna org.debian.apt[891]: 09:39:05 AptDaemon.Worker [INFO]: Finished transaction /org/debian/apt/transaction/c920bbc5aef04a96b9cfe22ca0070cab
Apr 30 09:39:06 brenna gnome-session[2299]: (unity-control-center:4593): unity-control-center-WARNING **: Could not load /usr/share/themes/Adwaita/index.theme: File o directory non esistente
Apr 30 09:39:21 brenna gnome-session[2299]: /usr/bin/update-manager:28: PyGIWarning: Gtk was imported without specifying a version first. Use gi.require_version('Gtk', '3.0') before import to ensure that the right version gets loaded.
Apr 30 09:39:21 brenna gnome-session[2299]:   from gi.repository import Gtk
Apr 30 09:39:21 brenna gnome-session[2299]: /usr/lib/python3/dist-packages/UpdateManager/UnitySupport.py:29: PyGIWarning: Dbusmenu was imported without specifying a version first. Use gi.require_version('Dbusmenu', '0.4') before import to ensure that the right version gets loaded.
Apr 30 09:39:21 brenna gnome-session[2299]:   from gi.repository import Dbusmenu, Unity
Apr 30 09:39:21 brenna gnome-session[2299]: /usr/lib/python3/dist-packages/UpdateManager/UnitySupport.py:29: PyGIWarning: Unity was imported without specifying a version first. Use gi.require_version('Unity', '7.0') before import to ensure that the right version gets loaded.
Apr 30 09:39:21 brenna gnome-session[2299]:   from gi.repository import Dbusmenu, Unity
Apr 30 09:39:23 brenna com.ubuntu.OneConf[2070]: WARNING:oneconf.hosts:Error in loading other_hosts file: [Errno 2] No such file or directory: '/home/davide/.cache/oneconf/3bdacd8fb8c349449cd523c9f50dfcb9/other_hosts'

按要求

davide@brenna:~$ lspci -nn | grep Network
07:00.0 Network controller [0280]: Intel Corporation Centrino Wireless-N 2230 [8086:0887] (rev c4)
davide@brenna:~$ lspci -nn | grep Eth
09:00.0 Ethernet controller [0200]: Qualcomm Atheros AR8161 Gigabit Ethernet [1969:1091] (rev 10)

我通过 systemd 日志找到了这个

mag 05 12:18:32 brenna avahi-daemon[939]: Withdrawing address record for 192.168.0.216 on eth0.
mag 05 12:18:32 brenna gnome-session[1789]: [2013:2119:0505/121832:ERROR:cloud_print_proxy_backend.cc(538)] Notifications for connector 9EEEB091-559D-9344-6BAC-C8DDB4835
mag 05 12:18:32 brenna gnome-session[1789]: [2013:2119:0505/121832:ERROR:cloud_print_proxy_backend.cc(538)] Notifications for connector 9EEEB091-559D-9344-6BAC-C8DDB4835
mag 05 12:18:32 brenna avahi-daemon[939]: Leaving mDNS multicast group on interface eth0.IPv4 with address 192.168.0.216.
mag 05 12:18:32 brenna systemd[1]: Starting Cleanup of Temporary Directories...
mag 05 12:18:32 brenna whoopsie[931]: [12:18:32] Cannot reach: https://daisy.ubuntu.com
mag 05 12:18:32 brenna whoopsie[931]: [12:18:32] offline
mag 05 12:18:32 brenna avahi-daemon[939]: Interface eth0.IPv4 no longer relevant for mDNS.
mag 05 12:18:32 brenna systemd-tmpfiles[4930]: [/usr/lib/tmpfiles.d/var.conf:14] Duplicate line for path "/var/log", ignoring.
mag 05 12:18:33 brenna systemd[1]: Started Cleanup of Temporary Directories.
mag 05 12:18:33 brenna whoopsie[931]: [12:18:33] Cannot reach: https://daisy.ubuntu.com

这个问题关于avahi-daemon。正在朝这个方向投资---

答案1

该问题已通过正常更新得到解决,因此不清楚问题到底出在哪里。

答案2

检查 的内容/etc/network/interfaces。虽然我可能弄错了,但听起来好像您正在从 GUI 管理网络。我以前遇到过我的 /etc/network/interfaces文件和 Ubuntu GUI 设置之间发生冲突的问题。

如果/etc/network/interfaces其中设置了网络,请尝试删除它们并仅使用 GUI 设置。如果这不起作用,并且该文件中只有以下几行,请尝试以下步骤。

auto lo
iface lo inet loopback

如果您的/etc/network/interfaces文件只有这几行,我的第一个尝试是删除 Ubuntu GUI 网络中的所有内容并放入/etc/network/interfaces

auto eth0
iface eth0 inet dhcp

或者配置静态 IP(适用于没有 dhcp 路由器的情况):

auto eth0
iface eth0 inet static
  address 192.168.1.14
  gateway 192.168.1.1
  netmask 255.255.255.0
  network 192.168.1.0
  broadcast 192.168.1.255

并将其替换eth0eth1wlan0 等,以获得辅助以太网或无线网卡。

然后运行sudo /etc/init.d/networking restart测试它,然后重新启动以查看它是否有效。

附言:我不保证这种方法一定有效。从您发布的信息数量有限来看,很难判断问题出在哪里。这只是我首先要尝试的方法。

相关内容