What's new

Solved Unable to log into router (AX86U) after reboot

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

I'd suggest a couple of simple changes in your modified script:

FROM:
Bash:
if [ $1 == "DNS" ]; then
...
...
elif [ $1 == "VPN" ]; then
...
...

TO:
Bash:
if [ "$1" = "DNS" ]; then
...
...
elif [ "$1" = "VPN" ]; then
...
...

Your original "if" statements will work on the router without real problems; it's just that the current syntax triggers my "S/W Developer's OCD tendencies."

For example, try calling your current script *as is* manually *without* any arguments, or with an argument like "DNS VPN" (yes, blank space in between), and see for yourself what you get in such cases.

Bash:
/jffs/scripts/call-monitors.sh "DNS VPN"

Yeah, nothing "bad" really happens; it's simply a couple of runtime errors on each call without adverse effects. Granted, those are not the expected input and are unlikely to happen in your particular use case; but any test errors, however minor, are "frowned upon" in my world because the source code would not be considered "clean code."

Obviously, you're free to take or ignore my advice as you deemed appropriate.
Thank you. I made the change. VS Code didn't say anything about it when I put it through Prettier.

Also, I had another power blip here in Costa Rica last night. As a result, the router restarted and everything came up great without issues, including VPNMON and DNSMON. I'm pretty convinced the original issue (i.e. red Internet light on the router and no ability to log into the router via SSH or WebGUI) is caused by routing the DNS through the VPN. I suspect the router is using DNS to perform some checks before the VPN connection is established; however, because VPN Director policies require that the DNS traffic goes through the VPN, the router gets stuck waiting for something that can't happen.

Sadly, this means that the streaming services once again know that I'm using a VPN. When I had the rules in place, everything worked splendidly until a reboot.
 
That is wrong. /jffs/syslog.log and /jffs/syslog.log-1 should not be directories. They should be copies of the syslog files that the router periodically updates from the files in /tmp. Delete those directories and reboot the router. Then check that they are now regular files.
I deleted them, rebooted, and they are back as directories again. Could scribe turn them into directories?
 
Quite possibly it's doing that to intentionally break the router's syslog processing. Just another reason to avoid using Scribe IMHO.
Really?

Clearly anything is possible, but last time I checked; the router's Syslog processing uses /tmp/ - not /jffs/ :rolleyes: but the firmware itself may create them?
Code:
ls -l /jffs/scripts/scribe

-rwxr-xr-x    1 admin    root         48746 Mar  2 13:03 /jffs/scripts/scribe

ls -l /tmp/syslog*

lrwxrwxrwx    1 admin    root            21 Mar 13 12:14 /tmp/syslog.log -> /opt/var/log/messages
-rw-rw-rw-    1 admin    root            24 Mar 13 12:14 /tmp/syslog.log-1
and scribe works perfectly for me.
 
Clearly anything is possible, but last time I checked; the router's Syslog processing uses /tmp/ - not /jffs/ :rolleyes: but the firmware itself may create them?
On bootup the firmware copies the old syslog files from /jffs into /tmp. It then starts the syslogd process using the /tmp files. The router's watchdog then periodically copies the /tmp files to /jffs, and they are copied again during the shutdown procedure. This is how they are preserved through reboots.
 
Last edited:
On bootup the firmware copies the old syslog files from /jffs into /tmp. It then starts the syslogd process using the /tmp files. The router's watchdog then periodically copies the /tmp files to /jffs, and they are copied again during the shutdown procedure. This is how they are preserved through reboots.
So how does the above justify your snarky comment
  • "Quite possibly it's doing that to intentionally break the router's syslog processing. Just another reason to avoid using Scribe IMHO."
publicly disparaging the sterling efforts of a fellow coder?

Please share the other reasons, I am intrigued.

And yes your OP is out there.....
and @RMerlin's reply.
 
Last edited:
So how does the above justify your snarky comment
  • "Quite possibly it's doing that to intentionally break the router's syslog processing. Just another reason to avoid using Scribe IMHO."
publicly disparaging the sterling efforts of a fellow coder?

I wasn't disparaging the coder. I was pointing out that Scribe has to deliberately break the router's syslog handling to prevent it interfering with what Scribe is doing with the log files. That's one reason why I would avoid using it. I didn't mean to imply Scribe doesn't work or might not be useful for some people.
 
Last edited:
Thank you. I made the change. VS Code didn't say anything about it when I put it through Prettier.
I don't use "VS Code + Prettier" but I know of them. AFAICT, Prettier is just a source code style formatter, not a source code syntax analyzer. IOW, it parses the source code to reformat the coding style based on a specific set of formatting rules in order to make it look "pretty." It doesn't do a static analysis of the source code looking for potential syntax errors. Now, it's possible that Prettier also includes some basic syntax checking, but, AFAIK, that's not its main purpose so it may fall short on that end.

Also, I had another power blip here in Costa Rica last night.
<Begin side note>
I used to go to Costa Rica fairly often while growing up (all thru my sophomore year of high school) when I visited my Grandma & Grandpa during summer vacations. Wonderful place to visit & live. I still remember most of my colloquial Spanish but, unfortunately, never learned to write well in the language (si hablo español, suficiente para tener una conversación con la gente, pero no aprendí a escribirlo muy bien). I have not been there for many years since my sweet Grandma passed away (RIP - Que en paz descanze).
<End side note>
 
I don't use "VS Code + Prettier" but I know of them. AFAICT, Prettier is just a source code style formatter, not a source code syntax analyzer. IOW, it parses the source code to reformat the coding style based on a specific set of formatting rules in order to make it look "pretty." It doesn't do a static analysis of the source code looking for potential syntax errors. Now, it's possible that Prettier also includes some basic syntax checking, but, AFAIK, that's not its main purpose so it may fall short on that end.
I guess I assumed the addition of the quotes would be considered a style issue, but I see what you are saying.

<Begin side note>
I used to go to Costa Rica fairly often while growing up (all thru my sophomore year of high school) when I visited my Grandma & Grandpa during summer vacations. Wonderful place to visit & live. I still remember most of my colloquial Spanish but, unfortunately, never learned to write well in the language (si hablo español, suficiente para tener una conversación con la gente, pero no aprendí a escribirlo muy bien). I have not been there for many years since my sweet Grandma passed away (RIP - Que en paz descanze).
<End side note>
It is beautiful here. I'm hoping to work on my Spanish some more, pero hay muchas gentes que hablan ingles aquí. I do have until June though, then off to the next country. Estoy en Sámara ahora.

I solved the streaming issue by using Nord's SmartDNS feature. You have to register your real public IP with them, and then use 103.86.96.103 and 103.86.99.103 as your DNS servers. The streaming sites don't see you using a VPN that way. By using those DNS servers, I do have a DNS leak through the WAN; however, it doesn't impact my stated goal of streaming and it doesn't cause me to lose access to the router every time it restarts.
 
I solved the streaming issue by using Nord's SmartDNS feature. You have to register your real public IP with them, and then use 103.86.96.103 and 103.86.99.103 as your DNS servers. The streaming sites don't see you using a VPN that way. By using those DNS servers, I do have a DNS leak through the WAN; however, it doesn't impact my stated goal of streaming and it doesn't cause me to lose access to the router every time it restarts.
That's good news. Glad you finally got your situation sorted out, and things are working to your satisfaction.

You might want to tag this thread's title with the "Solved" prefix so that others may benefit from your solution. Just a suggestion.

Happy streaming! :)
 

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