What's new
  • 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!

Web Interface Crash

marksb

New Around Here
I have been having an issue with the 384.13 version on an RT-AC88U router. After a couple of days, I can no longer access the router using a browser or the ASUS Router app on my iPhone. The router is still running and I can get to the internet and other devices.

Is this a known problem? is there some way I can get it running again by ssh'ing into the router without having to reboot?

I can't go back to the stock ASUS firmware because the latest version caused my samba shares to stop working.

Thanks for the help
 
I have been having an issue with the 384.13 version on an RT-AC88U router. After a couple of days, I can no longer access the router using a browser or the ASUS Router app on my iPhone. The router is still running and I can get to the internet and other devices.

Is this a known problem? is there some way I can get it running again by ssh'ing into the router without having to reboot?

I can't go back to the stock ASUS firmware because the latest version caused my samba shares to stop working.

Thanks for the help
Yea, this has been brought up a couple times. @Jack Yaz even wrote a scmerlin script that you could use to restart it.

Edit: Link to said script. https://www.snbforums.com/threads/scmerlin-service-and-script-control-menu-for-asuswrt-merlin.56277/
 
No problem and welcome to the forum!
 
Is there a reliable way to test if httpd is hung from the command line? Seems like a simple thing to run a script every 5 minutes or so to test if it's hung and then restart httpd if it is ...
 
Is there a reliable way to test if httpd is hung from the command line? Seems like a simple thing to run a script every 5 minutes or so to test if it's hung and then restart httpd if it is ...
This is John’s command (for https or http enabled):
Code:
/usr/sbin/curl --silent --connect-timeout 10 --head --user-agent asusrouter-asuswrt-curl --referer https://192.168.1.1:443 --insecure https://192.168.1.1:443
/usr/sbin/curl --silent --connect-timeout 10 --head --user-agent asusrouter-asuswrt-curl --referer http://192.168.1.1:80 http://192.168.1.1:80
But you need to determine:
  1. http or https
  2. LAN IP
  3. http port
  4. https port
 
Last edited:
This is John’s command (for https or http enabled):
Code:
/usr/sbin/curl --silent --connect-timeout 10 --head --user-agent asusrouter-asuswrt-curl --referer https://192.168.1.1:443 --insecure https://192.168.1.1:443
/usr/sbin/curl --silent --connect-timeout 10 --head --user-agent asusrouter-asuswrt-curl --referer http://192.168.1.1:80 http://192.168.1.1:80
But you need to determine:
  1. http or https
  2. LAN IP
  3. http port
  4. https port
I'm not at home to check, but if there's an httpd.conf file somewhere you might be able to scour that information from the conf file, or if everything is passed as parameters, you should be able to see what the command line call was.
 
I'm not at home to check, but if there's an httpd.conf file somewhere you might be able to scour that information from the conf file, or if everything is passed as parameters, you should be able to see what the command line call was.
It’s all in nvram. After the holiday. ;)
 
Or you could SSH to router: service restart_httpd
Right, that's what I do now ... just would be nice for it to be automatic rather than required me to SSH into the router.
 
I worked a little bit on a script, but in the end I concede general sucking at writing something from scratch. I leave this here for more skilled scripters to freely laugh at and then make better. I was still working on keeping the 3 states of http only/https only/both and how to track the different test results if both are active simultaneously. And there should be a persistence check to avoid restarting unnecessarily.

Code:
# cat httpd_check.sh
#!/bin/sh

[ -n "$(pidof httpd)" ] || service restart_httpd

echo "httpd running"

if [ $(nvram get http_enable) != "0" ]; then
        echo "HTTPS is enabled"
        # https
        if [ $(nvram get ntp_ready) = "1" ]; then
                echo "NTP is synced"
                curlrc=$(/usr/sbin/curl --silent --connect-timeout 10 --head --user-agent asusrouter-asuswrt-curl --referer https://$(nvram get lan_ipaddr):$(nvram get https_lanport) --insecure https://$(nvram get lan_ipaddr):$(nvram get https_lanport) >/dev/null; echo $?)
                echo "Got HTTPS rc" $curlrc
        else
                echo "NTP not ready"
        fi
fi

if $(nvram get http_enable) != "1" ]; then
        echo "HTTP is enabled"
        # http
        curlrc=$(/usr/sbin/curl --silent --connect-timeout 10 --head --user-agent asusrouter-asuswrt-curl --referer http://$(nvram get lan_ipaddr):$(nvram get http_lanport) http://$(nvram get lan_ipaddr):$(nvram get http_lanport) >/dev/null; echo $?)
        echo "Got HTTP rc" $curlrc
fi

if [ "$curlrc" != "0" ]; then
        echo "Restarting httpd"
       service restart_httpd
fi
 

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!

Members online

Back
Top