What's new

restart web server from SSH

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

slvrscoobie

Regular Contributor
My Asus AC3100 running the latest version of Merlin FW always crashes the web server /GUI after a few 'automatic' log out. (its done this for ~a year now) If I log out before closing the tab or the 5min auto log out, it seems to be ok, but after 3 or so 'auto log outs' over whatever time between reboots, when I try to load the GUI the page just wont load.
The wired and Wireless network works fine, nothing that would say the routers crashed, and I can log in via SSH, but the web gui wont load.
is there a command other than reboot that I could ssh into the router and restart the GUI via command line?
I see another forum that says that "service restart_httpd" should do it, but after applying that, the GUI still does not show up from the address of the router.
Hmm seems maybe this is my problem and I just need to physically reboot :/
 
Last edited:
What are doing while using SSH? My gut feeling tells me the logout is a red herring, and more likely your problems stem from whatever else you're doing via SSH. Or does this happen if you literally do NOTHING once logged into SSH and just allow it to timeout?

As far as the restart command, does the httpd process show in the process list? And if so, has the process ID changed to prove it restarted?

Code:
ps | grep [h]ttpd

Worst case, reset to factory defaults and reconfigure from scratch (do NOT just reload a backup!). Sometimes, given enough messing w/ the config, you can create weird conflicts that are almost impossible to track down. and a complete rebuild is warranted.
 
I see another forum that says that "service restart_httpd" should do it, but after applying that, the GUI still does not show up from the address of the router.

Not sure about your issue, but to answer your question, MerlinAU addon uses: /sbin/service restart_httpd to restart the httpd webserver, so the above comment is correct.
 
This very dated issue is still happening - running on last week's build 3004.388.8_2 on Asus RT-AX88U
It happens randomly when navigating intensely around the UI for me.
syslog / dmesg shows:

Aug 7 12:30:13 kernel: CPU: 0 PID: 10010 Comm: httpds Tainted: P O 4.1.51 #2
Aug 7 12:30:13 kernel: Hardware name: Broadcom-v8A (DT)
Aug 7 12:30:13 kernel: task: ffffffc02bce9540 ti: ffffffc02b654000 task.ti: ffffffc02b654000
Aug 7 12:30:13 kernel: PC is at 0x4ff7c
Aug 7 12:30:13 kernel: LR is at 0x4ff34
Aug 7 12:30:13 kernel: pc : [<000000000004ff7c>] lr : [<000000000004ff34>] pstate: 80010010
Aug 7 12:30:13 kernel: sp : 00000000fff62500
Aug 7 12:30:13 kernel: x12: 00000000000c52d8
Aug 7 12:30:13 kernel: x11: 00000000fff627b4 x10: 00000000fff627b4
Aug 7 12:30:13 kernel: x9 : 00000000fff62852 x8 : 000000000004fe18
Aug 7 12:30:13 kernel: x7 : 0000000000000001 x6 : 00000000f72bfab8
Aug 7 12:30:13 kernel: x5 : 000000000028a0b0 x4 : 0000000000000000
Aug 7 12:30:13 kernel: x3 : 00000000000b4636 x2 : 00000000856d4500
Aug 7 12:30:13 kernel: x1 : 0000000000000409 x0 : 0000000000000000

Note that both http and httpd daemons are STILL running after this event :

admin@RT-AX88U:/jffs# ps w |grep http
10010 admin 10928 S httpds -s -i br0 -p 8443
10011 admin 10928 S httpds -s -i eth0 -p 12288 -6
10012 admin 10800 S httpd -i br0
10042 admin 3424 S grep http

and they are still bound to all sockets:

admin@RT-AX88U:/jffs# netstat -antp
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 127.0.0.1:12288 0.0.0.0:* LISTEN 10011/httpds
tcp 0 0 x.x.x.x:12288 0.0.0.0:* LISTEN 10011/httpds
tcp 0 0 127.0.0.1:80 0.0.0.0:* LISTEN 10012/httpd
tcp 0 0 127.0.0.1:8443 0.0.0.0:* LISTEN 10010/httpds
tcp 0 0 192.168.2.1:8443 0.0.0.0:* LISTEN 10010/httpds
tcp 0 0 :::12288 :::* LISTEN 10011/httpds
tcp 0 0 :::8443 :::* LISTEN 10010/httpds


Still - I am getting "connection refused" on those ports (12288 from external wan0 interface - public access, or 192.168.2.1:8443 LAN access) - unless I either kill the http+httpd processes (and watchdog restarts them automatically after a few seconds) - or a "service restart_httpd"
 
I'm contributing to this post because I've also encountered a similar problem with version 388.7 (on my AX88U too)

I had been ejected from the user interface for no reason, with these messages in the logs :

I see that this is still not resolved for version 388.8_2.

If a patch could be released soon, that would be great.

May 7 07:31:47 kernel: potentially unexpected fatal signal 11.
May 7 07:31:47 kernel: CPU: 2 PID: 1074 Comm: asd Tainted: P O 4.1.51 #2
May 7 07:31:47 kernel: Hardware name: Broadcom-v8A (DT)
May 7 07:31:47 kernel: task: ffffffc02ff90bc0 ti: ffffffc02ef44000 task.ti: ffffffc02ef44000
May 7 07:31:47 kernel: PC is at 0xf6d71a78
May 7 07:31:47 kernel: LR is at 0xf6d72cc8
May 7 07:31:47 kernel: pc : [<00000000f6d71a78>] lr : [<00000000f6d72cc8>] pstate: 200f0010
May 7 07:31:47 kernel: sp : 00000000ffa0f5b8
May 7 07:31:47 kernel: x12: 00000000f6d86154
May 7 07:31:47 kernel: x11: 00000000f6d755d4 x10: 00000000ffffffff
May 7 07:31:47 kernel: x9 : 00000000ffa0f5dc x8 : 00000000ffa0f5e0
May 7 07:31:47 kernel: x7 : 00000000f74a1ab8 x6 : 0000000000103b60
May 7 07:31:47 kernel: x5 : 00000000001039e0 x4 : 0000000000107890
May 7 07:31:47 kernel: x3 : 000000000000676f x2 : 00000000f6a00768
May 7 07:31:47 kernel: x1 : 0000000000000400 x0 : 0000000000000000
May 7 07:31:51 rc_service: service 9701:notify_rc restart_firewall
 
I'm contributing to this post because I've also encountered a similar problem with version 388.7 (on my AX88U too)

I had been ejected from the user interface for no reason, with these messages in the logs :

I see that this is still not resolved for version 388.8_2.

If a patch could be released soon, that would be great.

Your crash is related to the ASD Process which is different than the above whichs is related to the httpds process.

You can confirm if it's running or not with: ps | grep asd
More info about it from RMerlin here: https://www.snbforums.com/threads/what-is-asd-process.76242/post-729340

Were you impacted by the mass ASUS router ASD security outage a year or so ago?


According to @RMerlin some people running his firmware were also affected:

Might be worth factory resetting if you haven't since.
 
Last edited:
ASD Process

Yeah... stock Asuswrt on RT-AC1900P doing basically nothing, with a few DCD crashes in between for variety:

1723163492244.png


1723163546566.png


1723163605603.png


1723163644173.png
 
Thank you for your feedback.
For the record, I was not affected by the massive security failure a year ago.
I have, however, had these errors several times and I see here that quite a few other people are experiencing the same thing.
I hope that the feedback from these logs has been taken into account and that we can hope for a fix soon for our routers.
 
This very dated issue is still happening - running on last week's build 3004.388.8_2 on Asus RT-AX88U
It happens randomly when navigating intensely around the UI for me.
syslog / dmesg shows:

Aug 7 12:30:13 kernel: CPU: 0 PID: 10010 Comm: httpds Tainted: P O 4.1.51 #2
Aug 7 12:30:13 kernel: Hardware name: Broadcom-v8A (DT)
Aug 7 12:30:13 kernel: task: ffffffc02bce9540 ti: ffffffc02b654000 task.ti: ffffffc02b654000
Aug 7 12:30:13 kernel: PC is at 0x4ff7c
Aug 7 12:30:13 kernel: LR is at 0x4ff34
Aug 7 12:30:13 kernel: pc : [<000000000004ff7c>] lr : [<000000000004ff34>] pstate: 80010010
Aug 7 12:30:13 kernel: sp : 00000000fff62500
Aug 7 12:30:13 kernel: x12: 00000000000c52d8
Aug 7 12:30:13 kernel: x11: 00000000fff627b4 x10: 00000000fff627b4
Aug 7 12:30:13 kernel: x9 : 00000000fff62852 x8 : 000000000004fe18
Aug 7 12:30:13 kernel: x7 : 0000000000000001 x6 : 00000000f72bfab8
Aug 7 12:30:13 kernel: x5 : 000000000028a0b0 x4 : 0000000000000000
Aug 7 12:30:13 kernel: x3 : 00000000000b4636 x2 : 00000000856d4500
Aug 7 12:30:13 kernel: x1 : 0000000000000409 x0 : 0000000000000000

Note that both http and httpd daemons are STILL running after this event :

admin@RT-AX88U:/jffs# ps w |grep http
10010 admin 10928 S httpds -s -i br0 -p 8443
10011 admin 10928 S httpds -s -i eth0 -p 12288 -6
10012 admin 10800 S httpd -i br0
10042 admin 3424 S grep http

and they are still bound to all sockets:

admin@RT-AX88U:/jffs# netstat -antp
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 127.0.0.1:12288 0.0.0.0:* LISTEN 10011/httpds
tcp 0 0 x.x.x.x:12288 0.0.0.0:* LISTEN 10011/httpds
tcp 0 0 127.0.0.1:80 0.0.0.0:* LISTEN 10012/httpd
tcp 0 0 127.0.0.1:8443 0.0.0.0:* LISTEN 10010/httpds
tcp 0 0 192.168.2.1:8443 0.0.0.0:* LISTEN 10010/httpds
tcp 0 0 :::12288 :::* LISTEN 10011/httpds
tcp 0 0 :::8443 :::* LISTEN 10010/httpds


Still - I am getting "connection refused" on those ports (12288 from external wan0 interface - public access, or 192.168.2.1:8443 LAN access) - unless I either kill the http+httpd processes (and watchdog restarts them automatically after a few seconds) - or a "service restart_httpd"
Hello mate,

Did you manage to fix this issue?

I too am having this issue but on AX86U Pro.
When navigating the UI the browser half loads and I have to log in again but have the same lines in the log

Code:
Sep 24 09:45:32 kernel: CPU: 3 PID: 4032 Comm: httpd Tainted: P           O      4.19.183 #1
Sep 24 09:45:32 kernel: Hardware name: RTAX86U_PRO (DT)
Sep 24 09:45:32 kernel: pstate: 000f0010 (nzcv q A32 LE aif)
Sep 24 09:45:32 kernel: pc : 00000000f72f83a4
Sep 24 09:45:32 kernel: lr : 00000000fff8ab90
Sep 24 09:45:32 kernel: sp : 00000000fff8ab90
Sep 24 09:45:32 kernel: x12: 0000000000000000
Sep 24 09:45:32 kernel: x11: 00000000fff8ae20 x10: 00000000f73eef60
Sep 24 09:45:32 kernel: x9 : 0000000000000002 x8 : 0000000000000001
Sep 24 09:45:32 kernel: x7 : 00000000000000af x6 : 00000000fff8add0
Sep 24 09:45:32 kernel: x5 : 00000000fff8add0 x4 : 0000000000000006
Sep 24 09:45:32 kernel: x3 : 0000000000000008 x2 : 0000000000000000
Sep 24 09:45:32 kernel: x1 : 00000000fff8ab90 x0 : 0000000000000000
Sep 24 09:45:33 watchdog: start httpd
Sep 24 09:45:33 rc_service: watchdog 2581:notify_rc start_httpd
Sep 24 09:45:33 RT-AX86U_Pro: start httpd:80
Sep 24 09:48:16 kernel: CPU: 2 PID: 7360 Comm: httpd Tainted: P           O      4.19.183 #1
Sep 24 09:48:16 kernel: Hardware name: RTAX86U_PRO (DT)
Sep 24 09:48:16 kernel: pstate: 00070010 (nzcv q A32 LE aif)
Sep 24 09:48:16 kernel: pc : 00000000f713a3a4
Sep 24 09:48:16 kernel: lr : 00000000ff7f3080
Sep 24 09:48:16 kernel: sp : 00000000ff7f3080
Sep 24 09:48:16 kernel: x12: 0000000000000000
Sep 24 09:48:16 kernel: x11: 00000000ff7f3310 x10: 00000000f7230de0
Sep 24 09:48:16 kernel: x9 : 0000000000000002 x8 : 0000000000000001
Sep 24 09:48:16 kernel: x7 : 00000000000000af x6 : 00000000ff7f32c0
Sep 24 09:48:16 kernel: x5 : 00000000ff7f32c0 x4 : 0000000000000006
Sep 24 09:48:16 kernel: x3 : 0000000000000008 x2 : 0000000000000000
Sep 24 09:48:16 kernel: x1 : 00000000ff7f3080 x0 : 0000000000000000
Sep 24 09:48:33 watchdog: start httpd
Sep 24 09:48:33 rc_service: watchdog 2581:notify_rc start_httpd
Sep 24 09:48:33 RT-AX86U_Pro: start httpd:80
 
Did you manage to fix this issue?

I too am having this issue but on AX86U Pro.
Note that you should indicate that you are using stock Asus firmware, if this issue is happening on the stock firmware and not Asus-Merlin so people don't get confused and assume you are using Asus-Merlin firmware (the topic of this discussion subforum).
 
back to your original post here is my script to kill any running and another to start the web server on the vpn port after reconnection .. hope it helps

C:\kahncampnew>cat killoldsshweb.sh
#!/bin/sh

for pid in `ps -w | grep httpd | grep tun13 | awk '{print $1}'`
do
echo "killing $pid"
kill -9 $pid
done


#export pid=`ps | grep tun13 | awk 'NR==1{print $1}' | cut -d' ' -f1`;kill -9 $pid


C:\kahncampnew>cat startupsshweb.sh
#!/bin/sh
cd /www
httpd -i tun13 -p 8080


C:\kahncampnew>
 

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