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

Thanks Adam. :+1:

1 Like

So.. my password has some dollar signs in it and I ma getting this error when editing the groovy file.

illegal string body character after dollar sign; solution: either escape a literal dollar sign "$5" or bracket the value expression "${5}" @ line 60, column 30.

Based on the error, the answer is there as well I'm just wanting to check what I did was correct.

"pa$$word" turns into "pa\ $ \ $ word" (without the spaces.. the \ was getting escaped in my post as well.

and no, that's not my password :crazy_face::stuck_out_tongue_closed_eyes:

You’ll have to URLencode your password, I think. I wasn’t sure if it it would handle that in its own or not—I guess we know, now.

%24 is $, I think :slight_smile:

Hey Adam, I'm noticing this error in the app log:

Any thoughts? Thanks!

Hmm. Which version of RT are you running? It looks like it’s trying to find a switch event that’s not there, which would come from an older version. If unschedule() isn’t declared in the initialize method, you should add it in there—I’d think that would solve it. If not, uninstall, then reinstall the app and its code :slight_smile:

1 Like

i thought i recently updated to the newest version, but i'll try reinstalling the code. thanks!

hmm, I think I did update the code but never set the new options that are available in the app. Wonder if that could've been it? Either way, I reinstalled and set those options up, I'm not seeing the error anymore. Thanks again!

1 Like

That could be it. I’ll see if I can replicate it. :slight_smile:
I’m glad you got it working!

1 Like

Hi Adam. Is this app suitable as a general reboot facility when the hub runs slowly, or just for the specific 500 error? From what I've read above it seems it provides general capability. I execute a regular reboot already but would prefer to reboot only when really needed. Thanks for some guidance.

I’m pretty sure, as of 1.18, there are some errors it won’t catch.

But it catches slow down very well :slight_smile: I’d set it to the least-sensitive setting (60s)

Ok thanks. Will give it a go.
Cheers.

1 Like

@adamkempenich

A quick thought. Since the app is "self-rebooting", why not just use the loopback address by default?

That's one less thing that can be messed up when the end-user edits lines 58-95.

So my hub rebooted sometime early this morning (yay!) - things seemed a little slow last night.

Question - apart from increasing the response time to database errors or other slowdowns, is it bad to increase the checkEveryNseconds time to 300 seconds?

Nope :slight_smile: feel free.

Great suggestion on the code. I’ll make that change.

1 Like

Oh, well that didn't go well. I installed your app. Made the edits. Hub was fine. Rebooted it manually today for another reason and now the soppy thing is in an endless loop of instant reboots. I had set reboots to 3 but it is already on its 5th reboot. And I'd set the initiation time to 10 mins. So I have no idea what's going on now. Sigh. What to do?

Oh no!! I’m really sorry to hear that. I’ll have to take a look and see if I can figure out why it isn’t catching that.

Boot into safe mode (an option under hubip:8081), or refresh /apps on your hub, click the settings cog, and uninstall the app before the hub shuts down. Usually a minute or two delay to do that. Once you’re in safe mode, you can uninstall the app.

Again, I’m terribly sorry this happened to you, and I’ll see to fixing it.

Edit: what was your test setting? 30s? 60? Was it taking 10 minutes before a reboot, or doing that right away?

Not possible. The hub is immediately rebooting. Just a handful of seconds and it loops again. Sh1t.

60 seconds, 10 minutes and maximum 3 reboots. I don't know if it was working properly because it didn't trigger. I did a manual reboot for another reason and then the loop started. It's been around 30 minutes now and it's still looping.

Here's one way to stop it. Your Hubitat has a statically assigned IP address by the DHCP server. Change the assigned IP address.

Rootin-Tootin' will not know the new address and therefore will not reboot it.

@adamkempenich - you think that'll work?

@Angus_M

Did that work?