Hub error 500

Something to be aware of that has caught me out before, is that when you restore a backup the Mode will become the one that was active when the backup was taken. So if it's the standard overnight backup you use from 3am ish, in most cases that will set the Mode to Night when you restore. That may explain why some rules were not running when they should or vice versa. It will only correct itself when the Mode would next change by time or whatever. The first thing I do after a restore is to make sure I put the mode to the correct one.

5 Likes

Excellent observation regarding the mode, hadn't crossed my mind

However in my case, I don't use modes at all. That being said, someone might benefit from your astuteness :slight_smile:

Rick

1 Like

Yes, as @stephack mentioned, that is @ogiewo’s HTTP driver.

1 Like

Here we go again: The dreaded Error 500.
By looking at my logs, it appears that my database is also screwed up!

Now... which backup do I restore from????
When did this nonsense start????
As the person who started this thread said, this is not acceptable in a consumer product, and should be dealt with on a priority basis by the support team. They've been very good in the past about addressing issues like this, I hope they will continue to do so.
(Yes, I've also sent a note to support, and yes, I've rebooted. I'm just considering when to restore from!)

Restore from you latest backup.
The the backup contains the content of the database, not the database itself. So it will rebuild the databases (clean database) and insert the content that is in your backup into these clean databases

2 Likes

what is device 1045? click the error and see where it takes you.

1 Like

All of a sudden I started to get this again today. No changes to my system all week since I'm on road trip.

I have node-red push a notification to pushover anytime there is an SQL error.

Hubitat Watchdog: app:4175 2019-07-24 19:14:18.872 ML: Kitchen Motion Light ERROR org.h2.jdbc.JdbcSQLException: The database has been closed [90098-197] (offDisable)

I'm not sure why I suddenly got it either.
I'm speculating, maybe it's because when I moved my Hub close to the door (to re-pair a zwave plus door lock), maybe I didn't do a hub shutdown first. Maybe just pulling out the power screwed up the database. (I'm NEVER) doing that again!
I recovered from a backup, and everything seems OK.
Lesson learned: Always shutdown the hub for a graceful end, before moving it!

1 Like

I don't suppose you published that flow, or posted the details in another thread? I just started using node-red to push data INTO HE, it is on my to-do list to setup some flows to pull it out,. Seems like it should be pretty straight forward.

The thread above has a few examples of how to tap into HE websockets and then different ways of using that data. If you simply want to get the raw data and then setup your own customized flows then it's very simple. There are 2 types, event socket and log socket. Just configure a websocket in node for one or both of these.

1 Like

If you want a more targeted flow. You can also setup a tcp in node on a specific port and have HE do a http request to you node red appliance on that port.

Edit:
The above is a little inaccurate. I use the tcp in node to capture data pushed from a WemosD1.

For an http request you would probably be better served using the http in node.

Thanks, that makes sense to me.

I am mainly looking for system diagnostic tracking, so will likely just go the web socket route.

That is an interesting point on using http requests for some data, though, which is also easy enough to do in node-red. I'll have to keep that in mind as well, if there is some targeted data I want.

1 Like

I've been having random error 500 for a while now and keep flirting with factor resetting the whole thing. I don't have so many automations that it would kill me to do.

What I dont understand is why a virtual switch would be causing these errors at all. Device 353 is a virtual RGB light using the Magic Home driver.

dev:342019-10-05 02:37:26.908 pm infoUpstairs Hallway Motion is inactive
dev:342019-10-05 02:37:09.815 pm infoUpstairs Hallway Motion is active
dev:972019-10-05 02:36:00.215 pm infoProjector Lift power is 0W
dev:342019-10-05 02:33:31.280 pm infoUpstairs Hallway Motion is active
dev:342019-10-05 02:32:56.944 pm infoUpstairs Hallway Motion is inactive
dev:342019-10-05 02:32:39.864 pm infoUpstairs Hallway Motion is active
dev:972019-10-05 02:30:59.704 pm infoProjector Lift power is 0W
dev:972019-10-05 02:25:58.765 pm infoProjector Lift powerHigh is 26843545.6W
dev:972019-10-05 02:25:58.604 pm infoProjector Lift power is 26843545.6W
dev:5472019-10-05 02:24:17.565 pm errororg.h2.jdbc.JdbcSQLException: General error: "java.lang.IllegalStateException: This map is closed [1.4.197/4]" [50000-197] (parse)
dev:3532019-10-05 02:23:24.979 pm errororg.quartz.JobPersistenceException: Couldn't obtain job names: The database has been closed [90098-197] on line 524 (socketStatus)
dev:3532019-10-05 02:23:24.967 pm errororg.quartz.JobPersistenceException: Couldn't obtain job names: The database has been closed [90098-197] on line 524 (socketStatus)
dev:3532019-10-05 02:23:24.881 pm errororg.quartz.JobPersistenceException: Couldn't obtain job names: The database has been closed [90098-197] on line 524 (socketStatus)
dev:3532019-10-05 02:23:24.785 pm errororg.quartz.JobPersistenceException: Couldn't obtain job names: The database has been closed [90098-197] on line 524 (socketStatus)
dev:3532019-10-05 02:23:24.642 pm errororg.quartz.JobPersistenceException: Couldn't obtain job names: The database has been closed [90098-197] on line 524 (connectDevice)
dev:3532019-10-05 02:23:24.637 pm errororg.quartz.JobPersistenceException: Couldn't obtain job names: The database has been closed [90098-197] on line 524 (socketStatus)
dev:3532019-10-05 02:23:24.605 pm errororg.quartz.JobPersistenceException: Couldn't obtain job names: The database has been closed [90098-197] on line 524 (socketStatus)
dev:3532019-10-05 02:23:24.418 pm errororg.quartz.JobPersistenceException: Couldn't obtain job names: The database has been closed [90098-197] on line 524 (connectDevice)
dev:3532019-10-05 02:23:24.401 pm errororg.quartz.JobPersistenceException: Couldn't obtain job names: The database has been closed [90098-197] on line 524 (connectDevice)
dev:3532019-10-05 02:23:24.388 pm errororg.quartz.JobPersistenceException: Couldn't obtain job names: The database has been closed [90098-197] on line 524 (socketStatus)
dev:3532019-10-05 02:23:20.623 pm errororg.quartz.JobPersistenceException: Couldn't store job: The object is already closed; SQL statement:
INSERT INTO QRTZ_JOB_DETAILS (SCHED_NAME, JOB_NAME, JOB_GROUP, DESCRIPTION, JOB_CLASS_NAME, IS_DURABLE, IS_NONCONCURRENT, IS_UPDATE_DATA, REQUESTS_RECOVERY, JOB_DATA) VALUES('QuartzScheduler', ?, ?, ?, ?, ?, ?, ?, ?, ?) [90007-197] on line 487 (socketStatus)
dev:972019-10-05 02:20:58.503 pm infoProjector Lift power is 0W
app:5822019-10-05 02:20:47.978 pm infoBasement Stairs Lights turned on
dev:122019-10-05 02:20:47.882 pm infoBasement Stairs Lights was turned on[digital]

The Magic Home driver controls communications to a real device. I would imagine things could get confusing if there isn't a real device associated with the driver. There is a virtual RGB Light driver in the list of drivers, if that is what you need.

3 Likes

Woke up this morning to an Error 500. Latest firmware too.

Have to agree... Never use a physical device driver for a virtual device. It can (and almost certainly will) cause odd things to happen. Especially if it is a wifi device driver.

I'm not saying that is the users problem for certain, but it is definitely bad practice regardless.

3 Likes

Great suggestions. I was using the virtual device as a trigger for the real device. I was having google home issues (that I now suspect were related to the Chromecast beta and not Google home) and I haven't gone back to fix everything.

I'm still not quite clear on how you add a WiFi device to HE. Had lots of confusion between the guy who wrote the driver and some other community members.

Thanks @bjcowles and @JasonJoel

Oh okay. So I was just confused by the terminology used. You have an actual Magic Home wifi device? If so, then the logs you posted demonstrate a communication problem with the device. Whether that is because the device wasn't actually paired correctly or there are larger issues with your hub, I don't know.

I use Magic Home RGB controllers/strips in my house. Setting them up is fairly straight forward. You begin the process of adding by creating a virtual device. Then you choose the appropriate Magic Home driver. Click save. Enter the device's IP address under preferences. Click 'Save preferences'. Then you may or may not need to click the 'initialize' command button (I can't remember).

It's also a good practice to reserve the devices IP address in your router. If its ever issued a new one, you'd lose control of it.

1 Like

I get it now. If you are talking to a real Magic Homer device, then you likely did it correctly. I got tripped up in the terminology.

While you made a virtual device initially, as soon as you changed it to the Magic Home driver and configured it to talk to an end device, it was no longer virtual any more.

Because, as you already know, on many wifi devices the steps are:

  1. Create virtual device
  2. Select (or change to, if already created) the correct driver for the physical device.
  3. Configure device parameters, click save
1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.