[basicUI] "Offline: waiting for connection to become available" Message triggered by item update

Here is a new thread for continuing a part of this one:
Sorry for the repost, but the old title didn’t match anymore.
https://community.openhab.org/t/solved-by-itself-unknown-error-when-changing-a-number-item/30760

It seems the error only occours when an item, which is visible in the sitemap, gets updated.
And it does not matter if the update is triggered by the user in the basicUI or by an automated update.
My example with the NTP binding:

DateTime CurrentDate   "Datum [%1$tA, %1$td.%1$tm.%1$tY %1$tH:%1$tM]" <calendar>  {channel="ntp:ntp:local:dateTime"}

sitemap:

Text item=CurrentDate

Log:

11:25:40.373 [INFO ] [smarthome.event.ItemStateChangedEvent] - CurrentDate changed from 2017-12-01T11:25:15.362+0100 to 2017-12-01T11:25:40.365+0100
11:25:40.379 [ERROR] [ge.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.

11:26:05.386 [INFO ] [smarthome.event.ItemStateChangedEvent] - CurrentDate changed from 2017-12-01T11:25:40.365+0100 to 2017-12-01T11:26:05.372+0100
11:26:05.396 [ERROR] [ge.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.

In BasicUI i get the message “Offline: waiting for connection to become available” everytime the error is logged.

After removing the sitemap element:

11:33:35.434 [INFO ] [smarthome.event.ItemStateChangedEvent] - CurrentDate changed from 2017-12-01T11:33:10.420+0100 to 2017-12-01T11:33:35.422+0100
11:34:00.488 [INFO ] [smarthome.event.ItemStateChangedEvent] - CurrentDate changed from 2017-12-01T11:33:35.422+0100 to 2017-12-01T11:34:00.479+0100
11:34:25.493 [INFO ] [smarthome.event.ItemStateChangedEvent] - CurrentDate changed from 2017-12-01T11:34:00.479+0100 to 2017-12-01T11:34:25.481+0100
11:34:50.492 [INFO ] [smarthome.event.ItemStateChangedEvent] - CurrentDate changed from 2017-12-01T11:34:25.481+0100 to 2017-12-01T11:34:50.484+0100

But as expected I still get the error, when other items which are still in the sitemap are getting updated.

Any ideas what to do?

I’m running the OH2 snapshot #1098

UPDATE:
i just figuered out, that when i close the browser, the errors in the log are gone.
Even opening an subpage (group) in the basicui results in no more errors.
After returning to the mainpage the errors are back again.
I tested this in Chrome and Firefox

I’ve no explanation. Looks like a bug. The issue should be filed on the ESH repo.

1 Like

Yes, please file an issue! The “MessageBodyWriter not found” error looks definitely like a bug.

I have some more news…
In the last time i often did a sudo reboot, and then there is the described behaviour.
When i restart the openhab service after a reboot, the errors are totally gone, even with an open tab of the basicui.

After reboot i see a lot of errors at startup. Also these errors are gone when i clear the log and restart the openhab service:
log.css (75.8 KB)
I changed the file extension from .txt to .css to be able to upload the file…

Please see:

ESH repo = https://github.com/eclipse/smarthome

Thanks, I was on my phone and had to stop posting, I dind’t have time to grab the URL.

Hi there,

I have the same ISSUE since yesterday. The main change I did was on the ITEM files, when I added groups to the file. Before adding groups to my items, I did not have any of this issues.

The error show up every time I switch something.

2018-09-01 23:12:24.120 [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.

EDIT:
I remember that I delete some logs files to clean and I clean the caché, nothing else.
When I added groups, it started the errors to show up, at the begining worked fine, but then not. Now is working fine, but I get this errors, and the UI page show the Offline message.

My tests.

  • Disable the groups from ITEMS and Switachbles tag for Alexa.
  • I have stopped OH, clean the CACHÉ again, START OH again, and error disapperas. No more errors… so far.

I will add again, Groups and Switchables for Alexa, and we will see.

I have been plagued by this ‘Offline issue’ for some time, so I decided to do a little test and created a very simple sitemap with just a few entries from my full sitemap:

sitemap default label="Thuis" {
    Frame label="Test" {
        Text item=Current_DateTime label="Datum [%1$tA, %1$td.%1$tm.%1$tY]" icon="sun_clouds"
        Text item=Sunset_Time icon="sunset" visibility=[Sun_Elevation>=0]
        Text item=Sun_Elevation icon="sun" visibility=[Sun_Elevation>=0]
        Text item=Sun_Direction icon="sun" visibility=[Sun_Elevation>=0]
    }
}

Whenever the Astro binding updates the Current_DateTime item, the message Offline: waiting for connection to become available appears. There are no errors in the log file (although with a more extensive sitemap, I’ve seen many Jetty related errors).
There is a long standing open issue on the ESH repo related to this, and a recent issue suggesting there is a fix.
I understand this OH forum is not the place to ask for a solution, but I just wanted to inform others.

BTW, the Edge browser does not show this behaviour. However, since Microsoft will turn Edge into a Chromium based browser, I’m afraid soon all browsers will have this annoying behaviour…

Has this issue been resolved at all? I am seeing this in the latest snapshot of openhabinapi…
Site map constantly has error saying offline… Comes back online… Then offline again…

`

> 2019-04-01 20:51:08.422 [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 started experiencing it recently… not sure whats changed

restart seems to have solved it