[Release] [500 Error Self-Healing] Rootin' Tootin' Self-Rebootin' (0.96)

The 0.94 release has a bug in the cookie mode. I fixed it and sent some other changes in a PM you can accept or reject.

1 Like

@codahq submitted a great pull request this morning!

0.95 is released --- it should fix that reboot transmission error. It also makes changing the settings a lot easier. :slight_smile:

2 Likes

Hi Adam.
I'm getting an error at the last line.
Inserted a } and this cured the issue.
Probably a typo but thought I would mention it.

1 Like

Thanks for the catch. I added it back in :slight_smile:

2 Likes

Someone (very kindly) just submitted a PR on GitHub that fixes a bug for non-password rebooters. If this is you, I urge you to update your code :slight_smile:

@adamkempenich I need to do another PR for passworded rebooters by the way. The session we store times out and we try to use it without refreshing it. I just haven't gotten around to it but I'll do something eventually if somebody else doesn't.

1 Like

Shouldn’t be too tough to schedule a cron event every 30 minutes and call refresh(). Thankfully it’s not much strain on the system. I may be able to do that tonight.

We can do that or we can call authenticate first on a reboot when password is enabled and then have the authenticate handler call the reboot if we want to optimize.

@codahq made some helpful changes a while back that I wasn't able to get around to posting until now.

Enjoy 0.96 :slight_smile:

1 Like

Does this only work in the even of an Error 500 or under any other circumstance?

It can also detect when a hub is slowing down, and attempt a safe reboot

I getting the following error?

2020-03-24 06:16:54.431 pm errorLogin failed with status 408. Please check configuration!

How can I correct it?

Are you using a username and password to login? Or does your hub not use it?

I do use an username and password?? I didn't see that in the configuration file?

You’ll have to edit lines 41-46 in the app code itself. If we try to save your username/password/ip in the settings, the reliability of rebooting gets lost and it’ll often fail.

Sorry about that I just forgot about that part. Thanks

1 Like

My hub locks up almost daily now :cry: :sob:

I was hoping this app would detect the slow down and reboot it, but it is not doing so. Is there a setting I need to change?

Once the hub is manually rebooted it seems fine, but I usually find this out when something does not work right.

EDIT: I don't have any security enable on the hub, and get no errors in the logs (once it locks up/ manual reboot, I don't have logs)

How often do you have it checking? You could try increasing the frequency. You could also turn up the verbosity of the logging for a while in RTSR.

Also, it detects slowdowns. If something is taking your hub down immediately (all at once) it won't slowdown. It will just be... down. So, there is a chance there wouldn't be an opportunity for RTSR to run and detect anything if the slowdown was really just a stop.

1 Like

Was at 60 seconds made it 20. :crossed_fingers:

Anyway to tell if it was a slow down, or "stop" ?

Not really. Only if the thing that crashed or stopped the hub had logging of its own. You can turn on logging on everything you can for a while to see if you can detect the last thing that logged and that might be the offender.

If it doesn't help you detect you get into the scenario where you have to do some disabling of apps and/or devices and make sure you're stable. Then you re-enable them one by one until you find the offender.