Basic UI - continually disconnects 'waiting for server to become available'

It is still pingable. This is all on a LAN with wired connections. I should also note this just started occurring in recent days as I upgraded through the MIlestone releases

I should also mention that when I have the openHAB app open on my phone I get frequent “server 500” errors rather than the disconnect messages. This all leads me to believe something is up with openHAB under the hood.

The 500 error are definitely caused by OH and you should see exceptions in openhab.log indicating what the error is.

1 Like

updated to the 2.5 snapshot and now everytime I have a disconnect I see this in the logs:

2018-12-20 19:43:16.072 [ERROR] [e.internal.WriterInterceptorExecutor] - MessageBodyWriter not found for media type=text/event-stream, type=class org.glassfish.jersey.media.sse.OutboundEvent, genericType=class org.glassfish.jersey.media.sse.OutboundEvent.
2018-12-20 19:43:27.385 [ERROR] [e.internal.WriterInterceptorExecutor] - MessageBodyWriter not found for media type=text/event-stream, type=class org.glassfish.jersey.media.sse.OutboundEvent, genericType=class org.glassfish.jersey.media.sse.OutboundEvent.

Does anyone have any idea of some sort of debugging I might be able to turn on to see more info about this? I’m on a LAN with a full fledged PC running this that is way above spec / I’ve also encountered this on a fresh empty install that I did on another older laptop. One is running ubuntu and one is running linux light. I’m on the latest snapshot and it is still doing this quite frequently.

Thank you!

There are a lot of hits when searching the forum for this, you may want to read those threads.

I guess I should clarify. That error message came on one specific build and no others. The others have just been timing out in Paper UI with no message as to why. I have tried searching the forums however I also have no error message in most builds so I don’t exactly have much to search. My guess is the build that had that error was a one off as often happens in the daily builds. What I’m asking most specifically is if I can turn on debug logging for Paper UI/the http server in openHAB.

Today I did some more looking around and it seems that when the app on my phone has the sitemap up i get an actual error message in the log at the same exact time the website on my computer does the ‘waiting for connection’ The message I get is below - though I’m not really sure that it provides any information .

openhab.log (11.3 KB)

I can confirm this since I noticed the same behaviour with my installation: every time the connection-message appears in the Basic UI, there is such a log entry.

Today I installed the ntp binding and now this error is additionally shown every time the ntp item gets updated:

2018-12-30 00:20:57.562 [vent.ItemStateChangedEvent] - ntp_local_time_string changed from 2018-12-30 00:19:57 CET to 2018-12-30 00:20:57 CET

2018-12-30 00:21:15.825 [ERROR] [e.internal.WriterInterceptorExecutor] - MessageBodyWriter not found for media type=text/event-stream, type=class org.glassfish.jersey.media.sse.OutboundEvent, genericType=class org.glassfish.jersey.media.sse.OutboundEvent.

So this exception seems to be independant of the Basic UI (and also independant of HABmin … there are some threads here in this forum that deal with this exception in connection to HABmin).

Does restarting openHAB fix it?

I’ve seen similar issues when a SSE related exception occurs at startup:

Sadly no - this persists restarts and upgrades. Started around 2.4 release (or a M7/8 I think I skipped some of the final milestones.) I’ve also noticed it on an independant fresh install that I was using on another pc for some testing.

In my case the restart had an effect: the exception is not shown in the log file furthermore … interesting. Thank you, @wborn for this hint!
Addendum: in my case the instance was not started the first time, but the first time after upgrading.

1 Like

I do also see the WARN messages a posted by @jfrank1845, see Here

I’m observing high CPU loads, delayed performed rules, UIs temporarily unavailable, items reacting late or not at all etc…

Does this relate to Github issue?

[Edit:] Solved by deleting : /var/lib/openhab2/config/org/openhab/addons.config

After some restarts /cleaning of cache and updating to the most recent snapshot I now always see a message when this interruption occurs. It is also now occurring every few seconds. :expressionless:

2018-12-30 11:46:20.787 [ERROR] [e.internal.WriterInterceptorExecutor] - MessageBodyWriter not found for media type=text/event-stream, type=class org.glassfish.jersey.media.sse.OutboundEvent, genericType=class org.glassfish.jersey.media.sse.OutboundEvent.

UPDATE: It looks like i’ve gotten this to all stop. I cleaned up some addons I wasn’t actively using as well as removed an extra comma before my persistence service (it was listed as “,mysql” for some reason) I also just did a flat out uninstall / reinstall back to 2.4 release stable and my issue seems to be gone. What was erroring out regularly is now staying stable with no issues! I can’t tell what exactly resolved it but very glad its gone.

/var/lib/openhab2/config/org/openhab/addons.config
WAS:
Binding=“samsungtv,http1,expire1,plex1,pioneeravr,ecobee1,serial1,mqtt1,astro,amazondashbutton,exec,gpstracker,mqtt”
NOW:
binding=“samsungtv,http1,plex1,pioneeravr,ecobee1,serial1,astro,exec,gpstracker,mqtt”

Did you also enable installation of legacy bindings? Otherwise you won’t be able to install the mqtt1 binding and it will generate a lot of load. E.g. by uncommenting in addons.cfg:

legacy = true

You can also enable it in Paper UI -> Configuration -> System -> Add-on Management -> Include Legacy 1.x Bindings

Hopefully PR #459 is merged and it logs an error message when addon installation fails. There’s a comment in an issue that describes the same disconnecting issue you’re having.

1 Like

My addons.cfg has nothing in it - that include legacy 1.x is disabled. I’m honestly not sure how that mqtt1 got in there.

Experienced similar behavior when updated to 2.5 Snapshot #1501. BasicUI complained about server being offline. This line showed up in the logs always when the page was refreshed.

2019-01-16 08:33:16.520 [ERROR] [e.internal.WriterInterceptorExecutor] - MessageBodyWriter not found for media type=text/event-stream, type=class org.glassfish.jersey.media.sse.OutboundEvent, genericType=class org.glassfish.jersey.media.sse.OutboundEvent.

I didn’t do a restart after upgrading and noticed this some time after the upgrade process. Can’t say if solely a restart would have done the job but I stopped oh, deleted /var/lib/openhab2/config/org/openhab/addons.config and started oh again. Problem solved.

1 Like

This worked for me, too! Thanks!

1 Like

Happened to me too after upgrade from 2.5.7 to 2.5.8.

First I had this error all the time and the Basic UI was not usable, after clearing the cache and several restarts it is nearly working. It sill shows the offline thing when a state on the Basic UI changes (intended by clicking there or a real button).

Only thing I saw is that there is always an error coming up when it is showing offline:
[ERROR] [ge.internal.WriterInterceptorExecutor] - MessageBodyWriter not found for media type=text/event-stream, type=class org.glassfish.jersey.med ia.sse.OutboundEvent, genericType=class org.glassfish.jersey.media.sse.OutboundE vent.

You should open a new thread rather than reopening a two year old thread. Any problem and therefore solution in this thread is highly unlikely to apply to a two year newer version of OH. As a case in point, I’m not certain OH even used SSE two years ago.