Bug found in YazFi 4.4.4. I believe it's the reasons there are several users and post with internet issues using YasFi, or connectivity but not internet.
Setup: Asus Router AC-86U. Firmware 386.12_6.
Router connected to ISP router by ethernet cable.
How to reproduce bug? Reset ISP router or save configuration in ISP router that cut temporarly connectivity
When Asus Router loose connectivity partially, that means that it detect wan RJ-45 has cable but not providing answer, Asus Router doesn't launch any event if the time is too short but dnsmasq run again, loosing all DNS setup did by YasFi.
Here log when reseting ISP router en debug mode:
May 3 00:19:59 ovpn-client5[2973]: read UDPv4 [EHOSTUNREACH]: No route to host (fd=8,code=113)
May 3 00:20:08 ovpn-client5[2973]: read UDPv4 [EHOSTUNREACH]: No route to host (fd=8,code=113)
May 3 00:20:17 ovpn-client5[2973]: read UDPv4 [EHOSTUNREACH]: No route to host (fd=8,code=113)
May 3 00:20:26 ovpn-client5[2973]: read UDPv4 [ECONNREFUSED]: Connection refused (fd=8,code=111)
May 3 00:20:54 dnsmasq[1990]: read /etc/hosts - 22 names
May 3 00:20:54 dnsmasq[1990]: using nameserver 127.0.1.1#53
May 3 00:20:54 dnsmasq[1990]: using nameserver 127.0.1.1#53
May 3 00:21:27 ovpn-client5[2973]: Inactivity timeout (--ping-restart), restarting
May 3 00:21:27 ovpn-client5[2973]: SIGUSR1[soft,ping-restart] received, process restarting
So, in my case it take around 1 minute to ISP router to provide lan/internet connectivity. After these events show above there is only ovpn-client5 reconnecting, but again no other events. I have registered with a script all wan-event and nothing. Openvpn-event sometime I register one even on tunnel but sometime no, I don't know the reason. I assume it depends on when ISP router is restarted versus cycle watchdog internal process on Asus Router.
Ping and all connectivity is OK but DNS doesn't work at all using any YasFi subnet but "normal main" Wi-Fi net work well all the time including DNS.
Bug was quite dificult to find because it doesn't happen all the time I reset ISP router and it isn't happenning all the time in normal condition, you can be months without issue. Sometime ISP provider also reset remotly router without your knowledge due upgrade or maintenance activity in the net.
The unique way I found to solve bug is to create a script that search for event "dnsmasq*: using nameserver 127.0.1.1#53" each minute and if dnsmasq event is found and there there isn't any event line that YasFi has run completed successfully after dnsmasq, I force YasFi to reset with "YasFi runnow" command.
That solve the issue.
I have attached script in case someone else has same issue.
Save script check_dnsmasq_failure.sh in /jffs/scripts/
Execute authorization chmod +x /jffs/scripts/check_dnsmasq_failure.sh
Add line for recurring execution of script each minutes in /jffs/scripts/services-start
cru a check_dnsmasq "*/1 * * * * /jffs/scripts/check_dnsmasq_failure.sh"
Ensure in Asus Router, system log section, level of logging is in debug level, if not dnsmasq event will not be record in /tmp/syslog.log so script will not find the event.
Reset router
The solution isn't very top but it works. Maybe it could be an improvement for next version of YasFi?
Some way to formaly report this bug to developer?
Cheers,
Setup: Asus Router AC-86U. Firmware 386.12_6.
Router connected to ISP router by ethernet cable.
How to reproduce bug? Reset ISP router or save configuration in ISP router that cut temporarly connectivity
When Asus Router loose connectivity partially, that means that it detect wan RJ-45 has cable but not providing answer, Asus Router doesn't launch any event if the time is too short but dnsmasq run again, loosing all DNS setup did by YasFi.
Here log when reseting ISP router en debug mode:
May 3 00:19:59 ovpn-client5[2973]: read UDPv4 [EHOSTUNREACH]: No route to host (fd=8,code=113)
May 3 00:20:08 ovpn-client5[2973]: read UDPv4 [EHOSTUNREACH]: No route to host (fd=8,code=113)
May 3 00:20:17 ovpn-client5[2973]: read UDPv4 [EHOSTUNREACH]: No route to host (fd=8,code=113)
May 3 00:20:26 ovpn-client5[2973]: read UDPv4 [ECONNREFUSED]: Connection refused (fd=8,code=111)
May 3 00:20:54 dnsmasq[1990]: read /etc/hosts - 22 names
May 3 00:20:54 dnsmasq[1990]: using nameserver 127.0.1.1#53
May 3 00:20:54 dnsmasq[1990]: using nameserver 127.0.1.1#53
May 3 00:21:27 ovpn-client5[2973]: Inactivity timeout (--ping-restart), restarting
May 3 00:21:27 ovpn-client5[2973]: SIGUSR1[soft,ping-restart] received, process restarting
So, in my case it take around 1 minute to ISP router to provide lan/internet connectivity. After these events show above there is only ovpn-client5 reconnecting, but again no other events. I have registered with a script all wan-event and nothing. Openvpn-event sometime I register one even on tunnel but sometime no, I don't know the reason. I assume it depends on when ISP router is restarted versus cycle watchdog internal process on Asus Router.
Ping and all connectivity is OK but DNS doesn't work at all using any YasFi subnet but "normal main" Wi-Fi net work well all the time including DNS.
Bug was quite dificult to find because it doesn't happen all the time I reset ISP router and it isn't happenning all the time in normal condition, you can be months without issue. Sometime ISP provider also reset remotly router without your knowledge due upgrade or maintenance activity in the net.
The unique way I found to solve bug is to create a script that search for event "dnsmasq*: using nameserver 127.0.1.1#53" each minute and if dnsmasq event is found and there there isn't any event line that YasFi has run completed successfully after dnsmasq, I force YasFi to reset with "YasFi runnow" command.
That solve the issue.
I have attached script in case someone else has same issue.
Save script check_dnsmasq_failure.sh in /jffs/scripts/
Execute authorization chmod +x /jffs/scripts/check_dnsmasq_failure.sh
Add line for recurring execution of script each minutes in /jffs/scripts/services-start
cru a check_dnsmasq "*/1 * * * * /jffs/scripts/check_dnsmasq_failure.sh"
Ensure in Asus Router, system log section, level of logging is in debug level, if not dnsmasq event will not be record in /tmp/syslog.log so script will not find the event.
Reset router
The solution isn't very top but it works. Maybe it could be an improvement for next version of YasFi?
Some way to formaly report this bug to developer?
Cheers,