What's new

Kill / restart dnsmasq from remote web interface?

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

plabberrunt

New Around Here
I have an annoying situation. I have a remote router that I cannot access to do a physical restart for a few more weeks.

What happened is a little confusing - but basically I have two "dnsmasq" processes running at the same time, and I do NOT have dropbear (ssh) running.

How did that happen?
The dropbear process was killed because I had idle copies running and couldn't figure out which one was the "host" process vs a stalled client.
The dnsmasq duplicate was a mistake during reconfiguration.

Usually when dropbear is killed I would go into the web interface and disable/enable it and it would restart the service.

This time, the router seems to get stuck and cannot apply settings changes. The changes "save" in the config, but the services don't restart.

So - reboot right?

Well, whatever is stopping the settings from applying is blocking the reboot command also.
Attempts to reboot the router fail, the syslog shows this:

Code:
Jan 20 02:07:42 rc_service: httpd 231:notify_rc reboot
Jan 20 02:07:42 rc_service: waitting "restart_time;restart_upnp;restart_bhblock;" via httpds ...
Jan 20 02:07:57 rc_service: skip the event: reboot.
Jan 20 02:13:41 rc_service: httpd 231:notify_rc start_sig_check
Jan 20 02:13:41 rc_service: waitting "restart_time;restart_upnp;restart_bhblock;" via httpds ...
Jan 20 02:13:56 rc_service: skip the event: start_sig_check.
Jan 20 02:24:28 rc_service: httpds 230:notify_rc restart_time;restart_upnp;restart_bhblock;
Jan 20 02:24:28 rc_service: waitting "restart_time;restart_upnp;restart_bhblock;" via httpds ...
Jan 20 02:24:43 rc_service: skip the event: restart_time;restart_upnp;restart_bhblock;.
Jan 20 02:27:07 rc_service: httpd 231:notify_rc reboot
Jan 20 02:27:07 rc_service: waitting "restart_time;restart_upnp;restart_bhblock;" via httpds ...
Jan 20 02:27:22 rc_service: skip the event: reboot.

Any solution ideas?

My next idea is to try to disable and re-enable dnsmasq entirely... but considering even reboot gets stuck, that might be a waste of time.
 
It's normal for dnsmasq to show as two processes. One is the parent process that runs as root, which spawns a second process with reduced privileges for security purposes.
 
Jan 20 02:07:42 rc_service: waitting "restart_time;restart_upnp;restart_bhblock;" via httpds ...
This series of service events from pressing apply on the Administration / System page are hung for an unknown reason, hence any new service events are dropped after 15 seconds. Not sure how to solve that remotely.
 
It's normal for dnsmasq to show as two processes. One is the parent process that runs as root, which spawns a second process with reduced privileges for security purposes.

This series of service events from pressing apply on the Administration / System page are hung for an unknown reason, hence any new service events are dropped after 15 seconds. Not sure how to solve that remotely.

Well darn.. Not a lot of other ideas. I was doing some scripting to log data to /tmp/home/root/. It was running fine, but it had a lot of conditional sections... maybe one of them went recursive and starting filling the memory or maxing out the CPU?

Pretty far out of my depth on linux to be troubleshooting. Any ideas for getting the reboot command to not get ignored?

Additional information - I can remote into a computer on the LAN, was messing around to see which functions work. The web interface hung when I tried to backup the JFFS partition, now that computer times out when trying to access the web interface through the subnet (192...) but can access it through WAN/HTTPS (thankfully was turned on).

Another idea, I could run a firmware "upgrade". Could this trigger a reboot when finished? Obviously this would be last resort, just throwing ideas out. =/
 
You need to plug those remote routers into a power switch that's somehow network accessible. Then you can power cycle remotely.
 
You need to plug those remote routers into a power switch that's somehow network accessible. Then you can power cycle remotely.

This is an interesting idea! I'm not sure it'll work since I'll lose connectivity once it's off to turn it back on... but I have several Kasa plugs, I'll test them to see if I can send an on/off combo.

That is... in a few weeks when I get back to the router ;_;

Would running a firmware update to the same version or one step higher (it's on an older version) trigger a reboot any different from the reboot that is getting stuck?
 
This is an interesting idea! I'm not sure it'll work since I'll lose connectivity once it's off to turn it back on... but I have several Kasa plugs, I'll test them to see if I can send an on/off combo.
You should just be able to send a schedule to them, right? You can schedule them to turn off in 1 minute and turn on in 2 minutes.
 
You should just be able to send a schedule to them, right? You can schedule them to turn off in 1 minute and turn on in 2 minutes.

Yeah so... Kasa kinda sucks though. I have some light switches where that works because they store the schedule on-device, but they're not Kasa and IIRC Kasa doesn't do the same, it just sends the commands from the app at those times.. but I'll test them, maybe I'm wrong.... really good idea/suggestion for solving it in the future haha
 
Yeah so... Kasa kinda sucks though. I have some light switches where that works because they store the schedule on-device, but they're not Kasa and IIRC Kasa doesn't do the same, it just sends the commands from the app at those times.. but I'll test them, maybe I'm wrong.... really good idea/suggestion for solving it in the future haha
So you go on vacation somewhere with no cell service and all of your lights no longer turn on/off on their schedules? That seems like one of the dumbest designs for a timer I've ever heard.
 
So you go on vacation somewhere with no cell service and all of your lights no longer turn on/off on their schedules? That seems like one of the dumbest designs for a timer I've ever heard.

Yeah, IOT is hot garbage right now... like I said, I even have some no-name company wifi wall switch that does the scheduling onboard so those can turn on/off on schedule., but these don't. Although these plugs are not a "timer" by design, they're for controlling things with a phone/wifi.. it's still a shirtty design.

What's a bigger pain in the butt is that even when you're ON the wifi and you turn on a light the app takes 10 seconds to.. do whatever the hell it's doing. I'm 90% sure it literally contacts their servers from your wifi, tells them to send a message to the devices that are also on the same wifi... and when their servers lag you have to wait for the lights to come on.

Some real geniuses over there designing this shirt.. don't buy t-link/Kasa stuff.
 

Similar threads

Sign Up For SNBForums Daily Digest

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