What's new

VPNMON VPNMON-R2 v2.52 -Mar 27, 2023- Monitor your VPN connection's Health (Thread locked/closed)

  • 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!

@Viktor Jaep I should have added that I had enabled your **NEW** "Recommended Server" option prior to this "test" and that I only have 1 NordVPN slot configured, pretty simple setup - config file follows for your learned perusal!
:D

Code:
TRIES=3
INTERVAL=60
PINGHOST="1.1.1.1"
UpdateVPNMGR=1
USELOWESTSLOT=1
PINGCHANCES=5
UseNordVPN=1
NordVPNSuperRandom=0
NordVPNMultipleCountries=0
NordVPNCountry="Australia"
NordVPNCountry2="0"
NordVPNCountry3="0"
NordVPNLoadReset=50
RecommendedServer=1
UseSurfShark=0
SurfSharkSuperRandom=0
SurfSharkMultipleCountries=0
SurfSharkCountry="United States"
SurfSharkCountry2="0"
SurfSharkCountry3="0"
SurfSharkLoadReset=50
UsePP=0
PPSuperRandom=0
PPMultipleCountries=0
PPCountry="U.S.A."
PPCountry2="0"
PPCountry3="0"
PPLoadReset=50
UseWeVPN=0
WeVPNSuperRandom=0
WeVPNMultipleCountries=0
WeVPNCountry="USA"
WeVPNCountry2="0"
WeVPNCountry3="0"
WeVPNLoadReset=50
UpdateSkynet=1
ResetOption=0
DailyResetTime="00:00"
MINPING=200
N=1
SHOWSTATS=1
DelayStartup=0
TRIMLOGS=1
MAXLOGSIZE=1000
SyncYazFi=0
YF24GN1=0
YF24GN2=0
YF24GN3=0
YF5GN1=0
YF5GN2=0
YF5GN3=0
YF52GN1=0
YF52GN2=0
YF52GN3=0
Thanks @Stephen Harrington! I'm going to try to duplicate this issue on my end! ;)
 
@Viktor Jaep I’ve been poking around and have just noticed what might be another clue - in the @Jack Yaz VPNMGR I can no longer get it to show me the current load by hitting the Load button, it churns away and then shows:-

“NordVPN - Sydney | undefined%”

Getting late here so if I get time in the morning I’ll try switching off the “Recommended Server” option and re-test perhaps?
 
Screenshots follow, note "": bad number" error in shot 1 and the "parse error: Unfinished string ..." in shot 2:-
I have duplicated the setup you have... 1 VPN slot, Recommended servers... I'm not getting a "Bad Number" error. I will go try pulling the WAN and see how it behaves afterwards... Are you still experiencing this error? Or did that go away after your reset as well?

The 2nd error kept repeating over subsequent 60 second cycles of VPNMON-R2.
It wasn't until I killed out of it with "Control-C" and re-started it that it all came good again.
Any thoughts?
From what I've been able to find, this one falls squarely on NordVPN... apparently the output that their API gave was faulty in its construct, giving an error, and subsequently wasn't able to get the "load" value in this case. I can't quite say I've ever seen this one before! Nice catch! :)
 
@Viktor Jaep I’ve been poking around and have just noticed what might be another clue - in the @Jack Yaz VPNMGR I can no longer get it to show me the current load by hitting the Load button, it churns away and then shows:-

“NordVPN - Sydney | undefined%”

Getting late here so if I get time in the morning I’ll try switching off the “Recommended Server” option and re-test perhaps?
Hmmm if VPNMGR is also having issues, I wonder if Nord is messing with the API. :( I'm not having this issue in the US at the moment, but let me switch to Australia, as they may be messing with it there?
 
I will go try pulling the WAN and see how it behaves afterwards... Are you still experiencing this error? Or did that go away after your reset as well?
It’s behaving normally after a stop/start of VPNMON-R2, only symptom right now is the weird undefined% message in VPNMGR.
 
It’s behaving normally after a stop/start of VPNMON-R2, only symptom right now is the weird undefined% message in VPNMGR.
Bah!! If you can reliably cause a "Bad Number" error, please let me know, as I might ask you to turn on debugging mode, and have you please send me the results... but then again, perhaps these 2 issues were interrelated, and we'll never see these again as long as Nord keeps from messing with the API. ;)

Have a good rest!! :) See you in the AM!
 
@Viktor Jaep yep it’s a weird one. Will do some more “scientific” playing when I can and try to reproduce … but I won’t be able to get to it for a couple of days.
 
Just reporting in, I didn't run AMTM/VPNMON and the uptime is stable at 14 hours+ Normally, 7 hours is the max before the AXE16000 reboots. I will keep troubleshooting until I find what combination works and what doesn't.
 
@Viktor Jaep it looks like VPNMGR doesn't like/co-operate with your "Recommended Server" option.
I stopped VPNMON-R2, turned off the option, re-started and forced a Reset. VPNMGR then looks normal and will show the Load if you hit the button.

note that in this "old" mode it says "NordVPN AU732 P2P UDP | 10%"

WITHOUT Rec Servers On.jpg


If I turn the "Recommended Server" option back on, VPN MGR can no longer show the Load, even thought your GUI does Ok.
It now shows as "NordVPN - Sydney | undefined%"

WITH Rec Servers On.jpg


Not sure what that all means but just getting the info to you as I see things ...
 
@Viktor Jaep it looks like VPNMGR doesn't like/co-operate with your "Recommended Server" option.
I stopped VPNMON-R2, turned off the option, re-started and forced a Reset. VPNMGR then looks normal and will show the Load if you hit the button.

note that in this "old" mode it says "NordVPN AU732 P2P UDP | 10%"

View attachment 44540

If I turn the "Recommended Server" option back on, VPN MGR can no longer show the Load, even thought your GUI does Ok.
It now shows as "NordVPN - Sydney | undefined%"

View attachment 44541

Not sure what that all means but just getting the info to you as I see things ...
I think I know why, @Stephen Harrington ... you are still using vpnmgr to populate your vpn slots... so it's inserting the full hostname (like au7373.nordvpn.com" into the "Address" field in the VPN slot UI. When you enable "Recommended Servers" in vpnmon-r2, it is overwriting this field with the NordVPN Recommended Server's IP address (like whatever the IP equivalent of au7373.nordvpn.com is)... which is by design so I can import these into Skynet if needed.

I took a look at @Jack Yaz's code, and it looks like he's expecting a full hostname (not an IP) in that field, in order to get the load values:

Code:
getServerLoad(){
    curlstring="https://api.nordvpn.com/server/stats/"
    serverhostname="$(echo "$1" | cut -f2 -d ' ' | tr "A-Z" "a-z").nordvpn.com"
    /usr/sbin/curl -fsL --retry 3 "$curlstring$serverhostname" | jq -r -e '.percent // "Unknown"'

So in this case, it's trying to find the load for a "91.22.113.54.nordvpn.com" (example), and that's causing an "Unknown" error, which probably translates to "Undefined" when it gets to the Web UI. All in all, pretty harmless as you could see the load on the vpnmon-r2 side like you said. I will see what I can do to translate IP's back into hostnames for the Address field if the option to update vpnmgr=ON. That would correct this issue...
 
I will see what I can do to translate IP's back into hostnames for the Address field if the option to update vpnmgr=ON. That would correct this issue...
Ok, thanks. As you say, pretty harmless in the grand scheme of things, but knowing the perfectionist you are … :p

Meanwhile I think I’ll leave “Recommended Servers” off and try to repeat those other errors I showed you for the wan-failover perhaps, or is it all related somehow?
 
Ok, thanks. As you say, pretty harmless in the grand scheme of things, but knowing the perfectionist you are … :p
Oh how you know me so well... ;)

Meanwhile I think I’ll leave “Recommended Servers” off and try to repeat those other errors I showed you for the wan-failover perhaps, or is it all related somehow?
Don't believe they are, but I welcome your attempts to try to duplicate the issue!! It seemed to me the load error was being caused by a malformed json response for that particular server... but the "bad number" error is the one I would REALLY love to figure out. LOL
 
but the "bad number" error is the one I would REALLY love to figure out.
Ok, will certainly try to reproduce if I get a “window” in next few days where I can take down WAN0 again without certain other people giving me “that look” again

Given there was nothing much in “your” log, what would you be after, given I run Scribe/uiScribe and don’t have the Asus debug logging as an option? I could just send you the relevant portion of the fire-hose that is the “messages” log I guess?
 
Ok, will certainly try to reproduce if I get a “window” in next few days where I can take down WAN0 again without certain other people giving me “that look” again

Given there was nothing much in “your” log, what would you be after, given I run Scribe/uiScribe and don’t have the Asus debug logging as an option? I could just send you the relevant portion of the fire-hose that is the “messages” log I guess?
Well, if you are successful at replicating that error - first, please share what you did! Secondarily, what would truly help is debug output... uncomment lines 3565, 3566, and 3923... please know, it will get messy, but if you think you captured it, kill it with CTRL-C and add comments to those lines again to get back to normal... please save that output and send 'er on over! :)
 
what would truly help is debug output... uncomment lines 3565, 3566, and 3923
Ah Ok, you have you own debug mode, of course you do - no problem, will run debug version if I get to the testing …
 
Just reporting in, I didn't run AMTM/VPNMON and the uptime is stable at 14 hours+ Normally, 7 hours is the max before the AXE16000 reboots. I will keep troubleshooting until I find what combination works and what doesn't.
Hey @monakh! Just checking in with you... how's things going with the beast (AXE16000)?? :)
 
Howdy! So over the last few days here's what I have confirmed for the beast (it is a bit unstable):

  1. IF you run the router without VPN activated, it can run for days/weeks without an issue
  2. If you run it with the VPN (without any scripts running), within 24 hours, it will demonstrate the "WAN down"/"WAN restored" errors. This is the reason I started running VPNMON to begin with!
  3. If you run AMTM or VPNMON or anything else, it will reboot within 7 hours
I turned off QoS, AI Protection, and all that but could not stabilize the router under the current firmware with AMTM or VPNMON. I recall this wasn't an issue during the early troubleshooting, but maybe I was rebooting manually so much that I never noticed. Honestly, I am not sure now.

Another takeaway is the "WAN down" issue. I think it's a router problem. I love blaming the ISP but if you don't run the extras and look through the logs, you never see it show up but the moment you start running VPN, it appears within 12-14 hours at the latest. Also, when the WAN is restored, DNS services seem to take a hike, and all internet connectivity halts (more or less). This is without VPNMON though.

So, yeah, that's what's happening. I am kinda at square one here! Almost tempted to go back to my AX88 since I never had these kinda issues with it. Hoping things would improve with future firmware upgrades.
 
Last edited:
Another takeaway is the "WAN down" issue. I think it's a router problem. I love blaming the ISP but if you don't run the extras and look through the logs, you never see it show up but the moment you start running VPN, it appears within 12-14 hours at the latest. Also, when the WAN is restored, DNS services seem to take a hike, and all internet connectivity halts (more or less). This is without VPNMON though.
Same here.
Have constant wan down/up errors.
A constant running vpn connection keeps running (iptv), but a new changed url is not possible. (DNS ?)
Then have to restart the vpn.
This is with or without VPNMON running, so not VPNMON blaming.
The moment VPNMON checks the wan, it is probably up and the off time to short to notice
Code:
Oct  4 16:16:15 WAN_Connection: WAN(0) link down.
Oct  4 16:16:20 WAN_Connection: WAN was restored.
Oct  4 16:31:35 WAN_Connection: WAN(0) link down.
Oct  4 16:31:40 WAN_Connection: WAN was restored.
Oct  4 16:46:13 WAN_Connection: WAN(0) link down.
Oct  4 16:46:18 WAN_Connection: WAN was restored.

RT-AX68U here.
 
Last edited:
Howdy! So over the last few days here's what I have confirmed for the beast (it is a bit unstable):

  1. IF you run the router without VPN activated, it can run for days/weeks without an issue
  2. If you run it with the VPN (without any scripts running), within 24 hours, it will demonstrate the "WAN down"/"WAN restored" errors. This is the reason I started running VPNMON to begin with!
  3. If you run AMTM or VPNMON or anything else, it will reboot within 7 hours
I turned off QoS, AI Protection, and all that but could not stabilize the router under the current firmware with AMTM or VPNMON. I recall this wasn't an issue during the early troubleshooting, but maybe I was rebooting manually so much that I never noticed. Honestly, I am not sure now.

Another takeaway is the "WAN down" issue. I think it's a router problem. I love blaming the ISP but if you don't run the extras and look through the logs, you never see it show up but the moment you start running VPN, it appears within 12-14 hours at the latest. Also, when the WAN is restored, DNS services seem to take a hike, and all internet connectivity halts (more or less). This is without VPNMON though.

So, yeah, that's what's happening. I am kinda at square one here! Almost tempted to go back to my AX88 since I never had these kinda issues with it. Hoping things would improve with future firmware upgrades.
Thanks for the feedback on this, @monakh! Wow, you've definitely looked at this from all angles... I really don't know what else to recommend, other than bringing up this topic in the main Asus-Merlin threads, and seeing if any of the other seasoned pro's out there can offer any advice, or perhaps there are others like @yogy who are experiencing some similar issues. Perhaps they can ask you to dive into other settings and whatnot to see if they can stabilize this behavior... or perhaps it all stems from something buggy in the firmware, or even hardware itself. Definitely worth a shot!

Same here.
Have constant wan down/up errors.
A constant running vpn connection keeps running (iptv), but a new changed url is not possible. (DNS ?)
Then have to restart the vpn.
This is with or without VPNMON running, so not VPNMON blaming.
The moment VPNMON checks the wan, it is probably up and the off time to short to notice
Code:
Oct  4 16:16:15 WAN_Connection: WAN(0) link down.
Oct  4 16:16:20 WAN_Connection: WAN was restored.
Oct  4 16:31:35 WAN_Connection: WAN(0) link down.
Oct  4 16:31:40 WAN_Connection: WAN was restored.
Oct  4 16:46:13 WAN_Connection: WAN(0) link down.
Oct  4 16:46:18 WAN_Connection: WAN was restored.

RT-AX68U here.
@yogy ... that connection is bouncing every *15* minutes to the second almost. There has got to be something behind that. Do you have any automated tasks, cron jobs by chance doing anything? But you're right... by default, VPNMON only checks the WAN every 60 seconds or whatever you have your interval configured to, so it might be missing that small < 5s window where the WAN might be considered "down"? Definitely not normal behavior... like I recommended above, definitely worth pursuing by posting in the main Asus-Merlin threads for the experts to give advice on. That's where I'd be going if I had hair-pullingly frustrating things happening with my router! :p
 
Last edited:
Can't express enough thanks to @Stephen Harrington for his dedication to testing VPNMON-R2 in order to eliminate error messages stemming from CURL and JQ during WAN failovers... v2.26 is out today!

What's new?
v2.26 - (October 10, 2022)
- CHANGED:
Added some additional layers of error checking and logic pertaining to VPN provider API calls to help eliminate any errors from showing on the screen when connectivity might possibly be interfering with results being returned, resulting in parse error messages from CURL and JQ being displayed on screen. This behavior was particularly evident in Dual WAN failover situations. HUGE thanks to @Stephen Harrington for his patience and willingness to help test VPNMON-R2 during these failovers! You have helped make this script better and better over time, much thanks to you! :)
- FIXED: Minor fixes to the VPN reset functionality to ensure it bypasses the interval timer after a reset.
- FIXED: Also, revamped the function that kills VPN slots, ensuring it only kills the slots that are allocated to VPNMON-R2, should you be running other VPN connections on other slots.
- FIXED: the -wipe SCREEN command is now being checked earlier before the script determines how it is going to initiate a SCREEN session.

Download Link (or update directly from within AMTM):
Code:
curl --retry 3 "https://raw.githubusercontent.com/ViktorJp/VPNMON-R2/master/vpnmon-r2-2.26.sh" -o "/jffs/scripts/vpnmon-r2.sh" && chmod a+rx "/jffs/scripts/vpnmon-r2.sh"
 

Similar threads

Latest threads

Sign Up For SNBForums Daily Digest

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