What's new

No wan-disconnected event

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

Payam Nab

Occasional Visitor
Tried wan-event to trigger start and stop VPN_Failover by @Martineau
wan0-connected script works fine and triggers VPN_Failover start, but wan0-disconnected not triggers and there is no event in syslog as wan0-disconnected.
Also posted my problem on github: No wan-event in syslog as wan-disconnected

syslog after I disconnected wan cable:
Code:
Jul 14 19:12:46 kernel: eth0 (Int switch port: 3) (Logical Port: 3) (phyId: c) Link DOWN.
Jul 14 19:13:05 (VPN_Failover.sh): 2621 VPN Client Monitor: Checking VPN Client 2 connection status....
Jul 14 19:13:20 (VPN_Failover.sh): 2621 **VPN Client Monitor: Switching VPN Client 2 to VPN Client 3 (Reason: VPN Client 2 STATE=2;Connected but tunnel DOWN; Unsuccessful PING or cURL data transfer)
Jul 14 19:13:20 (VPN_Failover.sh): 2621 **VPN Client Monitor: Terminating VPN Client 2
Jul 14 19:13:20 ovpn-client2[4375]: event_wait : Interrupted system call (code=4)

syslog after connected wan cable:
Code:
Jul 14 19:13:55 kernel: eth0 (Int switch port: 3) (Logical Port: 3) (phyId: c) Link Up at 100 mbps full duplex
Jul 14 19:13:57 (wan-event): 16438     Script not defined for wan-event: wan0-stopping
Jul 14 19:13:57 ovpn-client2[16163]: event_wait : Interrupted system call (code=4)
Jul 14 19:13:58 (wan-event): 16531     Script not defined for wan-event: wan0-stopped
Jul 14 19:13:58 kernel: D8:D8:66:09:85:EB not exist in UDB, can't delete it
Jul 14 19:13:58 (wan-event): 16548     Script not defined for wan-event: wan0-init
Jul 14 19:13:58 (wan-event): 16553     Script not defined for wan-event: wan0-connecting
Jul 14 19:13:58 (wan-event): 16559     Script executing.. for wan-event: wan0-connected

Am I miss something to trigger wan0-disconnected event?
Router is AX86U with Merlin 387.6
 
Tried wan-event to trigger start and stop VPN_Failover by @Martineau
wan0-connected script works fine and triggers VPN_Failover start, but wan0-disconnected not triggers and there is no event in syslog as wan0-disconnected.
Also posted my problem on github: No wan-event in syslog as wan-disconnected

syslog after I disconnected wan cable:
Code:
Jul 14 19:12:46 kernel: eth0 (Int switch port: 3) (Logical Port: 3) (phyId: c) Link DOWN.
Jul 14 19:13:05 (VPN_Failover.sh): 2621 VPN Client Monitor: Checking VPN Client 2 connection status....
Jul 14 19:13:20 (VPN_Failover.sh): 2621 **VPN Client Monitor: Switching VPN Client 2 to VPN Client 3 (Reason: VPN Client 2 STATE=2;Connected but tunnel DOWN; Unsuccessful PING or cURL data transfer)
Jul 14 19:13:20 (VPN_Failover.sh): 2621 **VPN Client Monitor: Terminating VPN Client 2
Jul 14 19:13:20 ovpn-client2[4375]: event_wait : Interrupted system call (code=4)

syslog after connected wan cable:
Code:
Jul 14 19:13:55 kernel: eth0 (Int switch port: 3) (Logical Port: 3) (phyId: c) Link Up at 100 mbps full duplex
Jul 14 19:13:57 (wan-event): 16438     Script not defined for wan-event: wan0-stopping
Jul 14 19:13:57 ovpn-client2[16163]: event_wait : Interrupted system call (code=4)
Jul 14 19:13:58 (wan-event): 16531     Script not defined for wan-event: wan0-stopped
Jul 14 19:13:58 kernel: D8:D8:66:09:85:EB not exist in UDB, can't delete it
Jul 14 19:13:58 (wan-event): 16548     Script not defined for wan-event: wan0-init
Jul 14 19:13:58 (wan-event): 16553     Script not defined for wan-event: wan0-connecting
Jul 14 19:13:58 (wan-event): 16559     Script executing.. for wan-event: wan0-connected

Am I miss something to trigger wan0-disconnected event?
Router is AX86U with Merlin 387.6
Just did a quick test....
Code:
RT-AX86U (ChkWAN.sh): 28720 v1.17 Monitoring WAN connection using 4 target PING hosts (192.168.0.1 192.168.0.1 9.9.9.9 1.1.1.1) (Tries=3)
RT-AX86U (ChkWAN.sh): 28720 Monitoring pass 1 out of 3
RT-AX86U (ChkWAN.sh): 28720 Private LAN 192.168.0.1 will be skipped for WAN PING check!
RT-AX86U (ChkWAN.sh): 28720 Private LAN 192.168.0.1 will be skipped for WAN PING check!
RT-AX86U (ChkWAN.sh): 28720 Monitoring WAN connection OK.....(Successful ping to '9.9.9.9'). Will check WAN again in 30 secs
RT-AX86U (ChkWAN.sh): 28720 Private LAN 192.168.0.1 will be skipped for WAN PING check!
RT-AX86U (ChkWAN.sh): 28720 Private LAN 192.168.0.1 will be skipped for WAN PING check!
RT-AX86U (ChkWAN.sh): 28720 Monitoring WAN connection OK.....(Successful ping to '9.9.9.9'). Will check WAN again in 30 secs
Manually pulled the plug.....and the firmware reports the condition...
Code:
RT-AX86U kernel: eth0 (Int switch port: 3) (Logical Port: 3) (phyId: c) Link DOWN.
RT-AX86U kernel: ===> Activate Deep Green Mode
RT-AX86U kernel: bcmswlpbk0 (Ext switch port: 8) (Logical Port: 8) Virtual link DOWN
RT-AX86U WAN_Connection: WAN(0) link down.
and ChkWAN continues to monitor....
Code:
RT-AX86U (ChkWAN.sh): 28720 Private LAN 192.168.0.1 will be skipped for WAN PING check!
RT-AX86U (ChkWAN.sh): 28720 Private LAN 192.168.0.1 will be skipped for WAN PING check!
RT-AX86U (ChkWAN.sh): 28720 v1.17 Monitoring WAN connection using PING method to 9.9.9.9 check FAILED
RT-AX86U (ChkWAN.sh): 28720 v1.17 Monitoring WAN connection using PING method to 1.1.1.1 check FAILED
RT-AX86U (ChkWAN.sh): 28720 Monitoring pass 2 out of 3
RT-AX86U (ChkWAN.sh): 28720 Private LAN 192.168.0.1 will be skipped for WAN PING check!
RT-AX86U (ChkWAN.sh): 28720 Private LAN 192.168.0.1 will be skipped for WAN PING check!
RT-AX86U (ChkWAN.sh): 28720 v1.17 Monitoring WAN connection using PING method to 9.9.9.9 check FAILED
RT-AX86U (ChkWAN.sh): 28720 v1.17 Monitoring WAN connection using PING method to 1.1.1.1 check FAILED
RT-AX86U (ChkWAN.sh): 28720 Monitoring pass 3 out of 3
RT-AX86U (ChkWAN.sh): 28720 Private LAN 192.168.0.1 will be skipped for WAN PING check!
RT-AX86U (ChkWAN.sh): 28720 Private LAN 192.168.0.1 will be skipped for WAN PING check!
RT-AX86U (ChkWAN.sh): 28720 v1.17 Monitoring WAN connection using PING method to 9.9.9.9 check FAILED
RT-AX86U (ChkWAN.sh): 28720 v1.17 Monitoring WAN connection using PING method to 1.1.1.1 check FAILED
RT-AX86U (ChkWAN.sh): 31002 v1.17 WAN connection status monitoring will begin in 10 seconds.....
RT-AX86U (ChkWAN.sh): 31002 v1.17 Monitoring WAN connection using 4 target PING hosts (192.168.0.1 192.168.0.1 9.9.9.9 1.1.1.1) (Tries=3)
RT-AX86U (ChkWAN.sh): 31002 Monitoring pass 1 out of 3
RT-AX86U (ChkWAN.sh): 31002 Private LAN 192.168.0.1 will be skipped for WAN PING check!
RT-AX86U (ChkWAN.sh): 31002 Private LAN 192.168.0.1 will be skipped for WAN PING check!
RT-AX86U (ChkWAN.sh): 31002 v1.17 Monitoring WAN connection using PING method to 9.9.9.9 check FAILED
RT-AX86U (ChkWAN.sh): 31002 v1.17 Monitoring WAN connection using PING method to 1.1.1.1 check FAILED
RT-AX86U (ChkWAN.sh): 31002 Monitoring pass 2 out of 3
RT-AX86U (ChkWAN.sh): 31002 Private LAN 192.168.0.1 will be skipped for WAN PING check!
RT-AX86U (ChkWAN.sh): 31002 Private LAN 192.168.0.1 will be skipped for WAN PING check!
When the WAN cable is plugged back in, the firmware detects and initiates the WAN interface restart.....
Code:
RT-AX86U kernel: <=== Deactivate Deep Green Mode
RT-AX86U kernel: bcmswlpbk0 (Ext switch port: 8) (Logical Port: 8) Virtual link UP
RT-AX86U kernel: eth0 (Int switch port: 3) (Logical Port: 3) (phyId: c) Link Up at 100 mbps full duplex
RT-AX86U WAN_Connection: WAN(0) link up.
RT-AX86U rc_service: wanduck 1441:notify_rc restart_wan_if 0

Here are my wan0-* events logged in Syslog, and there definitely appears to be wan0-disconnected events? - although it may seem that it wasn't issued until the firmware initiated the WAN restart?
Code:
RT-AX86U custom_script: Running /jffs/scripts/service-event (args: restart wan_if)
RT-AX86U custom_script: Running /jffs/scripts/wan-event (args: 0 stopping)
RT-AX86U (wan-event): 31338 Script not defined for wan-event: wan0-stopping
RT-AX86U custom_script: Running /jffs/scripts/wan-event (args: 0 disconnected)
RT-AX86U custom_script: Running /jffs/scripts/wan-event (args: 0 stopped)
RT-AX86U custom_script: Running /jffs/scripts/wan-event (args: 0 stopped)
RT-AX86U (wan-event): 31367 Script not defined for wan-event: wan0-stopped
RT-AX86U (wan-event): 31366 Script not defined for wan-event: wan0-disconnected       <<===== ?
RT-AX86U 6relayd[4162]: Termination requested by signal.
RT-AX86U (wan-event): 31373 Script not defined for wan-event: wan0-stopped
RT-AX86U kernel: IPv6: ADDRCONF(NETDEV_UP): ifb0: link is not ready
RT-AX86U kernel: IPv6: ADDRCONF(NETDEV_UP): ifb1: link is not ready
RT-AX86U kernel: IPv6: ADDRCONF(NETDEV_UP): imq0: link is not ready
RT-AX86U kernel: IPv6: ADDRCONF(NETDEV_UP): imq1: link is not ready
RT-AX86U kernel: IPv6: ADDRCONF(NETDEV_UP): imq2: link is not ready
RT-AX86U kernel: IPv6: ADDRCONF(NETDEV_UP): sit0: link is not ready
RT-AX86U kernel: IPv6: ADDRCONF(NETDEV_UP): ip6tnl0: link is not ready
RT-AX86U kernel: IPv6: ADDRCONF(NETDEV_UP): ip6gre0: link is not ready
RT-AX86U kernel: IPv6: ADDRCONF(NETDEV_UP): bcmsw: link is not ready
RT-AX86U kernel: IPv6: ADDRCONF(NETDEV_UP): eth1: link is not ready
RT-AX86U kernel: IPv6: ADDRCONF(NETDEV_UP): eth2: link is not ready
RT-AX86U kernel: IPv6: ADDRCONF(NETDEV_UP): eth3: link is not ready
RT-AX86U kernel: IPv6: ADDRCONF(NETDEV_UP): eth4: link is not ready
RT-AX86U kernel: IPv6: ADDRCONF(NETDEV_UP): eth5: link is not ready
RT-AX86U kernel: IPv6: ADDRCONF(NETDEV_UP): bcmswlpbk0: link is not ready
RT-AX86U kernel: IPv6: ADDRCONF(NETDEV_UP): dpsta: link is not ready
RT-AX86U custom_script: Running /jffs/scripts/wan-event (args: 0 init)
RT-AX86U custom_script: Running /jffs/scripts/wan-event (args: 0 connecting)
RT-AX86U (wan-event): 31430 Script not defined for wan-event: wan0-init
RT-AX86U custom_script: Running /jffs/scripts/service-event-end (args: restart wan_if)
RT-AX86U (wan-event): 31436 Script not defined for wan-event: wan0-connecting
RT-AX86U custom_script: Running /jffs/scripts/wan-event (args: 0 disconnected)
RT-AX86U custom_script: Running /jffs/scripts/wan-event (args: 0 stopped)
RT-AX86U (wan-event): 31446 Script not defined for wan-event: wan0-disconnected       <<===== ?
RT-AX86U (wan-event): 31448 Script not defined for wan-event: wan0-stopped
RT-AX86U (ChkWAN.sh): 31002 v1.17 Monitoring WAN connection using PING method to 9.9.9.9 check FAILED
RT-AX86U (ChkWAN.sh): 31002 v1.17 Monitoring WAN connection using PING method to 1.1.1.1 check FAILED
RT-AX86U rc_service: udhcpc_wan 31977:notify_rc start_rdisc6
RT-AX86U custom_script: Running /jffs/scripts/service-event (args: start rdisc6)
RT-AX86U rc_service: udhcpc_wan 31977:notify_rc start_dhcp6c
RT-AX86U rc_service: waitting "start_rdisc6" via udhcpc_wan ...
RT-AX86U custom_script: Running /jffs/scripts/service-event-end (args: start rdisc6)
RT-AX86U custom_script: Running /jffs/scripts/wan-event (args: 0 connected)
RT-AX86U custom_script: Running /jffs/scripts/service-event (args: start dhcp6c)
RT-AX86U (wan-event): 32033 Script not defined for wan-event: wan0-connected

Looks like the WAN watchdog was extremely diligent and restarted the WAN instantly before my script noticed the failure, but there may now be a conflict for the seemingly out-of-sequence wan0-disconnected event?
 
Last edited:
Looks like the WAN watchdog was extremely diligent and restarted the WAN instantly before my script noticed the failure, but there may now be a conflict for the seemingly out-of-sequence wan0-disconnected event?

Do I need to run a separate WAN watchdog to trigger wan-events?
 
Tested again by removing wan cable and see no wan disconnected event and wan0-stopping appears after reconnecting the cable

syslog
 
Last edited:
Here are my wan0-* events logged in Syslog, and there definitely appears to be wan0-disconnected events? - although it may seem that it wasn't issued until the firmware initiated the WAN restart?
Its more seems like firmware problem not addons issue.
Kernel detects wan cable disconnected but firmware not trigger wan disconnected event on my router and on yours not until after its connected again.

Thread should not have been moved to addons section
 
Updated my RT-AX86U to 386.78_2 but wan events problem still exists.
Kernel detects wan down but firmware not trigger wan-disconnect event and also wan-stopping and wan-stopped are triggered after wan connected again

Is this an addons problem or firmware problem?

Log:

Wan cable disconnected:
Code:
Jul 25 13:41:19 kernel: eth0 (Int switch port: 3) (Logical Port: 3) (phyId: c) Link DOWN.

Wan cable connected:
Code:
Jul 25 13:42:20 kernel: eth0 (Int switch port: 3) (Logical Port: 3) (phyId: c) Link Up at 100 mbps full duplex
Jul 25 13:42:25 (wan-event): 10622     Script not defined for wan-event: wan0-stopping
Jul 25 13:42:25 (wan-event): 10734     Script executing.. for wan-event: wan0-stopped
Jul 25 13:42:25 (wan-event): 10757     Script not defined for wan-event: wan0-init
Jul 25 13:42:25 (wan-event): 10762     Script not defined for wan-event: wan0-connecting
Jul 25 13:42:25 (wan-event): 10767     Script executing.. for wan-event: wan0-connected
 

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top