我使用网络管理器在远程设备上保持持久的 3G 连接。但是,链路时常会失败,然后无法自行重新启动。我设法在系统日志中识别出这种情况,但老实说,我不太确定我在看什么。似乎机器认为设备已拔出,但没有相应的日志条目表明它实际上已被拔出。
有人介意看一下下面的系统日志片段并指导我正确的方向吗?
Oct 13 22:25:26 tracker pppd[1091]: LCP terminated by peer
Oct 13 22:25:26 tracker pppd[1091]: Connect time 206.7 minutes.
Oct 13 22:25:26 tracker pppd[1091]: Sent 203306 bytes, received 182777 bytes.
Oct 13 22:25:26 tracker pppd[1091]: Modem hangup
Oct 13 22:25:26 tracker pppd[1091]: Connection terminated.
Oct 13 22:25:26 tracker NetworkManager[333]: <info> (ttyUSB1): device state change: 8 -> 9 (reason 13)
Oct 13 22:25:26 tracker NetworkManager[333]: <info> Unmanaged Device found; state CONNECTED forced. (see http://bugs.launchpad.net/bugs/191889)
Oct 13 22:25:26 tracker NetworkManager[333]: <warn> Activation (ttyUSB1) failed.
Oct 13 22:25:26 tracker modem-manager[337]: <info> (ttyUSB1) closing serial port...
Oct 13 22:25:26 tracker NetworkManager[333]: <info> (ttyUSB1): device state change: 9 -> 3 (reason 0)
Oct 13 22:25:26 tracker NetworkManager[333]: <info> (ttyUSB1): deactivating device (reason: 0).
Oct 13 22:25:26 tracker kernel: [12441.840088] ata1.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6
Oct 13 22:25:26 tracker kernel: [12441.846744] ata1.00: BMDMA stat 0x66
Oct 13 22:25:26 tracker kernel: [12441.850446] ata1.00: failed command: WRITE DMA
Oct 13 22:25:26 tracker kernel: [12441.855020] ata1.00: cmd ca/00:02:c4:fb:5b/00:00:00:00:00/e0 tag 0 dma 1024 out
Oct 13 22:25:26 tracker kernel: [12441.855024] res 51/84:00:c4:fb:5b/00:00:00:00:00/e0 Emask 0x30 (host bus error)
Oct 13 22:25:26 tracker kernel: [12441.870623] ata1.00: status: { DRDY ERR }
Oct 13 22:25:26 tracker kernel: [12441.874708] ata1.00: error: { ICRC ABRT }
Oct 13 22:25:26 tracker kernel: [12441.878820] ata1: soft resetting link
Oct 13 22:25:26 tracker modem-manager[337]: <info> (ttyUSB1) serial port closed
Oct 13 22:25:26 tracker modem-manager[337]: <info> Modem /org/freedesktop/ModemManager/Modems/0: state changed (connected -> disconnecting)
Oct 13 22:25:26 tracker modem-manager[337]: <info> Modem /org/freedesktop/ModemManager/Modems/0: state changed (disconnecting -> connected)
Oct 13 22:25:26 tracker NetworkManager[333]: <warn> could not read ppp stats: No such device
Oct 13 22:25:26 tracker pppd[1091]: Exit.
Oct 13 22:25:26 tracker NetworkManager[333]: <info> Unmanaged Device found; state CONNECTED forced. (see http://bugs.launchpad.net/bugs/191889)
Oct 13 22:25:26 tracker NetworkManager[333]: SCPlugin-Ifupdown: devices removed (path: /sys/devices/virtual/net/ppp0, iface: ppp0)
Oct 13 22:25:26 tracker NetworkManager[333]: <info> disconnect failed: (32) The serial port is not open.
Oct 13 22:25:27 tracker kernel: [12442.048218] ata1.00: configured for UDMA/100
Oct 13 22:25:27 tracker kernel: [12442.048241] ata1: EH complete
Oct 13 22:25:27 tracker kernel: [12442.050941] ata1.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6
Oct 13 22:25:27 tracker kernel: [12442.057483] ata1.00: BMDMA stat 0x66
Oct 13 22:25:27 tracker kernel: [12442.061153] ata1.00: failed command: WRITE DMA
Oct 13 22:25:27 tracker kernel: [12442.065696] ata1.00: cmd ca/00:02:c4:fb:5b/00:00:00:00:00/e0 tag 0 dma 1024 out
Oct 13 22:25:27 tracker kernel: [12442.065699] res 51/84:00:c4:fb:5b/00:00:00:00:00/e0 Emask 0x30 (host bus error)
Oct 13 22:25:27 tracker kernel: [12442.081273] ata1.00: status: { DRDY ERR }
Oct 13 22:25:27 tracker kernel: [12442.085366] ata1.00: error: { ICRC ABRT }
Oct 13 22:25:27 tracker kernel: [12442.089488] ata1: soft resetting link
Oct 13 22:25:27 tracker kernel: [12442.260206] ata1.00: configured for UDMA/100
Oct 13 22:25:27 tracker kernel: [12442.260226] ata1: EH complete
Oct 13 22:25:27 tracker kernel: [12442.268296] ata1.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6
Oct 13 22:25:27 tracker kernel: [12442.274829] ata1.00: BMDMA stat 0x66
Oct 13 22:25:27 tracker kernel: [12442.278480] ata1.00: failed command: WRITE DMA
Oct 13 22:25:27 tracker kernel: [12442.283022] ata1.00: cmd ca/00:02:c4:fb:5b/00:00:00:00:00/e0 tag 0 dma 1024 out
Oct 13 22:25:27 tracker kernel: [12442.283026] res 51/84:00:c4:fb:5b/00:00:00:00:00/e0 Emask 0x30 (host bus error)
Oct 13 22:25:27 tracker kernel: [12442.298605] ata1.00: status: { DRDY ERR }
Oct 13 22:25:27 tracker kernel: [12442.302693] ata1.00: error: { ICRC ABRT }
Oct 13 22:25:27 tracker kernel: [12442.306763] ata1: soft resetting link
Oct 13 22:25:27 tracker kernel: [12442.476225] ata1.00: configured for UDMA/100
Oct 13 22:25:27 tracker kernel: [12442.476248] ata1: EH complete
Oct 13 22:25:29 tracker NetworkManager[333]: <info> Activation (ttyUSB1) starting connection 'cdma'
Oct 13 22:25:29 tracker NetworkManager[333]: <info> (ttyUSB1): device state change: 3 -> 4 (reason 0)
Oct 13 22:25:29 tracker NetworkManager[333]: <info> Unmanaged Device found; state CONNECTED forced. (see http://bugs.launchpad.net/bugs/191889)
Oct 13 22:25:29 tracker NetworkManager[333]: <info> Activation (ttyUSB1) Stage 1 of 5 (Device Prepare) scheduled...
Oct 13 22:25:29 tracker NetworkManager[333]: <info> Activation (ttyUSB1) Stage 1 of 5 (Device Prepare) started...
Oct 13 22:25:29 tracker NetworkManager[333]: <info> Activation (ttyUSB1) Stage 1 of 5 (Device Prepare) complete.
Oct 13 22:25:30 tracker modem-manager[337]: <info> Modem /org/freedesktop/ModemManager/Modems/0: state changed (connected -> registered)
Oct 13 22:25:30 tracker modem-manager[337]: <info> Modem /org/freedesktop/ModemManager/Modems/0: state changed (registered -> connecting)
Oct 13 22:25:30 tracker modem-manager[337]: <info> Modem /org/freedesktop/ModemManager/Modems/0: state changed (connecting -> registered)
Oct 13 22:25:30 tracker NetworkManager[333]: <warn> CDMA connection failed: (32) Sending command failed: device is not enabled
Oct 13 22:25:30 tracker NetworkManager[333]: <info> (ttyUSB1): device state change: 4 -> 9 (reason 0)
Oct 13 22:25:30 tracker NetworkManager[333]: <info> Unmanaged Device found; state CONNECTED forced. (see http://bugs.launchpad.net/bugs/191889)
Oct 13 22:25:30 tracker NetworkManager[333]: <info> Marking connection 'cdma' invalid.
Oct 13 22:25:30 tracker NetworkManager[333]: <warn> Activation (ttyUSB1) failed.
Oct 13 22:25:30 tracker NetworkManager[333]: <info> (ttyUSB1): device state change: 9 -> 3 (reason 0)
Oct 13 22:25:30 tracker NetworkManager[333]: <info> (ttyUSB1): deactivating device (reason: 0).
Oct 13 22:25:30 tracker NetworkManager[333]: <info> Unmanaged Device found; state CONNECTED forced. (see http://bugs.launchpad.net/bugs/191889)
答案1
不幸的是,一些 3G 适配器就是这样工作的。如果串行端口关闭,则它们基本上需要重置回开机模式。这可能可以通过使用 nm-applet 中的“启用移动宽带”选项来完成,方法是取消选择并再次选择它。否则,可能需要再次进行模式切换,在这种情况下,将其与计算机断开连接并再次插入可能很简单(但如果您真的想手动切换,您需要在启用 /etc/usb_modeswitch.conf 中的日志记录后,通过 /var/log/usb_modeswitch.log 找出 udev 传递给 usb-modeswitch 的参数)。
作为一种可能的解决方法,您可以设置坚持在/etc/ppp/选项(在建立连接时仍应读取该信息)。这可能有助于保持 PPP 正常运行并避免关闭调制解调器的端口。
答案2
答案3
你的日志开始得晚了几行。我认为重要的是前
Oct 13 22:25:26 tracker pppd[1091]: LCP terminated by peer
这表明 PPP 守护进程告诉您“另一端”终止了连接。
我还担心您的 ATA.1 磁盘错误 - 您有备份吗?