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

In Openhab 2.4 I now see continuous disconnects of my basic UI sitemaps with no error logs sent to the log. Anyone else experience this? What logging can I enable to perhaps see more info into this issue?

Thank you!

Well, Iā€™m not sure there are any logs that will show this. That message indicates that your web browser is not getting a response from the server and likely means the network connection between the two has failed. You wonā€™t see any errors in OH logs because as far as the OH logs are concerned nothing is wrong.

Look at your network. When it says ā€œwaiting for server to become availableā€ can you ping the OH server? If not then your network connectivity is spotty and you need to address that problem.

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