Приветствую!
Один объект регулярно теряет связь, может пропасть уже через полчаса после перезагрузки. Логов на момент падения сейчас под нет, но сохранились логи от предыдущей сессии, в них интересное. В чем может быть дело?
июл 03 11:21:45 potok24000051 systemd[1]: Stopped PPTP link to megafon.
июл 03 11:21:45 potok24000051 systemd[1]: Starting PPTP link to megafon...
июл 03 11:21:47 potok24000051 dhclient[5240]: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 11
июл 03 11:21:49 potok24000051 dhclient[5579]: DHCPDISCOVER on eth1 to 255.255.255.255 port 67 interval 15
июл 03 11:21:52 potok24000051 ntpd[1088]: error resolving pool 1.debian.pool.ntp.org: Name or service not known (-2)
июл 03 11:21:54 potok24000051 kernel: usb 2-1.2: new high-speed USB device number 59 using ci_hdrc
июл 03 11:21:54 potok24000051 kernel: usb 2-1.2: config 1 interface 0 altsetting 0 endpoint 0x81 has an invalid bInterval 255, changing to 11
июл 03 11:21:54 potok24000051 kernel: usb 2-1.2: New USB device found, idVendor=058b, idProduct=0041, bcdDevice= 0.00
июл 03 11:21:54 potok24000051 kernel: usb 2-1.2: New USB device strings: Mfr=0, Product=0, SerialNumber=0
июл 03 11:21:55 potok24000051 kernel: usb 2-1.2: USB disconnect, device number 59
июл 03 11:21:56 potok24000051 kernel: usb 2-1.2: new high-speed USB device number 60 using ci_hdrc
июл 03 11:21:56 potok24000051 kernel: usb 2-1.2: New USB device found, idVendor=8087, idProduct=07ed, bcdDevice= 1.00
июл 03 11:21:56 potok24000051 kernel: usb 2-1.2: New USB device strings: Mfr=0, Product=0, SerialNumber=0
июл 03 11:21:57 potok24000051 kernel: usb 2-1.2: USB disconnect, device number 60
июл 03 11:21:57 potok24000051 ntpd[1088]: error resolving pool 3.debian.pool.ntp.org: Name or service not known (-2)
июл 03 11:21:58 potok24000051 dhclient[5240]: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 9
июл 03 11:22:01 potok24000051 kernel: usb 2-1.2: new high-speed USB device number 61 using ci_hdrc
июл 03 11:22:01 potok24000051 kernel: usb 2-1.2: New USB device found, idVendor=1e0e, idProduct=0020, bcdDevice=17.30
июл 03 11:22:01 potok24000051 kernel: usb 2-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
июл 03 11:22:01 potok24000051 kernel: usb 2-1.2: Product: SIMCOM_PRODUCT
июл 03 11:22:01 potok24000051 kernel: usb 2-1.2: Manufacturer: SIMCOM_VENDOR
июл 03 11:22:01 potok24000051 kernel: usb 2-1.2: SerialNumber: 004999010640000
июл 03 11:22:01 potok24000051 kernel: cdc_acm 2-1.2:1.0: ttyACM0: USB ACM device
июл 03 11:22:02 potok24000051 kernel: cdc_acm 2-1.2:1.2: ttyACM1: USB ACM device
июл 03 11:22:02 potok24000051 kernel: cdc_acm 2-1.2:1.4: ttyACM2: USB ACM device
июл 03 11:22:02 potok24000051 kernel: cdc_acm 2-1.2:1.6: ttyACM3: USB ACM device
июл 03 11:22:02 potok24000051 kernel: cdc_acm 2-1.2:1.8: ttyACM4: USB ACM device
июл 03 11:22:02 potok24000051 kernel: cdc_acm 2-1.2:1.10: ttyACM5: USB ACM device
июл 03 11:22:02 potok24000051 kernel: cdc_acm 2-1.2:1.12: ttyACM6: USB ACM device
июл 03 11:22:03 potok24000051 chat[10483]: Can't get terminal parameters: Inappropriate ioctl for device
июл 03 11:22:03 potok24000051 chat[10485]: Can't get terminal parameters: Inappropriate ioctl for device
июл 03 11:22:03 potok24000051 chat[10487]: Can't get terminal parameters: Inappropriate ioctl for device
июл 03 11:22:03 potok24000051 chat[10489]: Can't get terminal parameters: Inappropriate ioctl for device
июл 03 11:22:03 potok24000051 chat[10491]: Can't get terminal parameters: Inappropriate ioctl for device
июл 03 11:22:03 potok24000051 chat[10493]: Can't get terminal parameters: Inappropriate ioctl for device
июл 03 11:22:03 potok24000051 chat[10495]: Can't get terminal parameters: Inappropriate ioctl for device
июл 03 11:22:03 potok24000051 wb-gsm[9695]: Turning OFF modem's POWER FET
июл 03 11:22:04 potok24000051 wb-gsm[9695]: Force exit: no valid usb-AT connection after 30s
июл 03 11:22:04 potok24000051 wb-gsm[9695]: 1: /usr/lib/wb-utils/wb-gsm-common.sh:493 init_usb_connection(...)
июл 03 11:22:04 potok24000051 wb-gsm[9695]: 2: /usr/lib/wb-utils/wb-gsm-common.sh:529 ensure_on(...)
июл 03 11:22:04 potok24000051 wb-gsm[9695]: 3: /usr/bin/wb-gsm:25 restart_if_broken(...)
июл 03 11:22:04 potok24000051 kernel: usb 2-1.2: USB disconnect, device number 61
июл 03 11:22:04 potok24000051 systemd[1]: ppp@megafon.service: Control process exited, code=exited status=1
июл 03 11:22:04 potok24000051 systemd[1]: Failed to start PPTP link to megafon.
июл 03 11:22:04 potok24000051 systemd[1]: ppp@megafon.service: Unit entered failed state.
июл 03 11:22:04 potok24000051 systemd[1]: ppp@megafon.service: Failed with result 'exit-code'.
июл 03 11:22:04 potok24000051 systemd[1]: ppp@megafon.service: Service hold-off time over, scheduling restart.
июл 03 11:22:04 potok24000051 systemd[1]: Stopped PPTP link to megafon.
июл 03 11:22:04 potok24000051 systemd[1]: Starting PPTP link to megafon...
Устройств установлено много, проблемы с пропаданием со связи только у нескольких.
На случай проблем с модемом у нас везде установлен такой вот cron; но сделан для 4G но просочился и на это устройство.
*/5 * * * * root /bin/sh -c "/usr/bin/wb-gsm restart_if_broken; ifup usb0 2>&1" >/dev/null
После написания этого поста скрипт отключил, буду следить. В логе смущают сообщения от 7 chat одновременно…
На всякий случай конфиги /lib/systemd/system/ppp@.service
:
[Unit]
Description=PPTP link to %I
After=network.target
[Service]
Type=forking
Restart=on-failure
# PIDFile=/run/ppp-%i.pid
ExecStart=/usr/bin/pon %I
ExecStop=/usr/bin/poff %I
ExecReload=/usr/bin/poff -r %I
ExecStartPre=/usr/bin/wb-gsm reset
ExecStartPre=/usr/bin/wb-gsm restart_if_broken
ExecStartPre=/bin/sleep 20
[Install]
WantedBy=multi-user.target
/etc/ppp/peers/megafon
:
/dev/ttyACM0
115200
#disable hardware flow control
nocrtscts
# Assumes that your IP address is allocated dynamically by the ISP.
noipdefault
# Try to get the name server addresses from the ISP.
usepeerdns
# Use this connection as the default route.
defaultroute
# Makes pppd "dial again" when the connection is lost.
nopersist
# Do not ask the remote to authenticate.
noauth
nopersist
# no limit on failed connections
maxfail 0
lcp-echo-interval 10
lcp-echo-failure 3
holdoff 10
init "/usr/bin/wb-gsm restart_if_broken"
user gdata
connect "/usr/sbin/chat -v -f /etc/chatscripts/megafon2"
и /etc/chatscripts/megafon2
:
ABORT "BUSY"
ABORT "NO ANSWER"
ABORT "NO CARRIER"
ABORT "ERROR"
TIMEOUT 5
"" ATZ
OK AT+CGDCONT=1,"IP","internet"
OK ATD*99***1#
CONNECT