Repeated "xhr poll error" when trying to connect to my.openhab under openhab2

In trying to migrate from oh1 to oh2, I cannot seem to get my.openhab to work.

First, I tried updating the UUID and SECRET on the my.openhab website account settings to match those in my new openhab2 installation (/var/lib/openhab2/uuid and /var/lib.openhab2/myopenhab/secret).

I tried stopping and restarting the myopenhab feature, as well as uninstalling/installing the myopenhab feature.

I then tried deleting my old my.openhab account on the website, to start from scratch with the brand new (OH2) uuid/secret (though still using the old [deleted] account’s email/username).

None of these were able to switch my.openhab state to ONLINE.

When setting logs to DEBUG, I see (repeated every 5 seconds or so) the following set errors:

2016-08-11 19:06:06.265 [DEBUG] [io.socket.client.Manager            ] - attempting reconnect
2016-08-11 19:06:06.267 [DEBUG] [io.socket.client.Manager            ] - readyState CLOSED
2016-08-11 19:06:06.267 [DEBUG] [io.socket.client.Manager            ] - opening https://my.openhab.org:443/
2016-08-11 19:06:06.269 [DEBUG] [io.socket.client.Manager            ] - connection attempt will timeout after 20000
2016-08-11 19:06:06.272 [DEBUG] [io.socket.engineio.client.Socket    ] - creating transport 'polling'
2016-08-11 19:06:06.273 [DEBUG] [io.socket.engineio.client.Socket    ] - setting transport polling
2016-08-11 19:06:06.274 [DEBUG] [t.engineio.client.transports.Polling] - polling
2016-08-11 19:06:06.275 [DEBUG] [ngineio.client.transports.PollingXHR] - xhr poll
2016-08-11 19:06:06.277 [DEBUG] [ngineio.client.transports.PollingXHR] - xhr open GET: https://my.openhab.org/socket.io/?EIO=3&transport=polling
2016-08-11 19:06:06.279 [DEBUG] [ngineio.client.transports.PollingXHR] - sending xhr with url https://my.openhab.org/socket.io/?EIO=3&transport=polling | data null
2016-08-11 19:06:06.707 [DEBUG] [io.socket.engineio.client.Socket    ] - socket error io.socket.engineio.client.EngineIOException: xhr poll error
2016-08-11 19:06:06.708 [DEBUG] [io.socket.client.Manager            ] - connect_error
2016-08-11 19:06:06.711 [DEBUG] [io.socket.client.Manager            ] - reconnect attempt error
2016-08-11 19:06:06.714 [DEBUG] [io.socket.client.Manager            ] - will wait 5000ms before reconnect attempt
2016-08-11 19:06:06.716 [DEBUG] [io.socket.engineio.client.Socket    ] - socket close with reason: transport error
2016-08-11 19:06:06.717 [DEBUG] [t.engineio.client.transports.Polling] - transport not open - deferring close

Going to https://my.openhab.org/start/index says that “openHAB is offline”

Going to https://my.openhab.org shows the normal page, but still shows the following message:
You are using openHAB 1.x. To remotely access your openHAB's web interface go to https://my.openhab.org/openhab.app?sitemap=yoursitemapname

which does not seem correct, since I most certainly am running OH2.

Any idea(s) as to what I should try next?

Are you running at least Oracle Java 1.8.0_101?

I believe (but not certain) that there is an OH 2 native binding for my.openhab. Are using that or the OH 1.x binding?

Using openhab-misc-myopenhab version 2.0.0.b3.
Linux lists Oracle Java version 1.8.0_65
Running ubuntu linux on raspberry pi 3.

Thanks.

You must upgrade to at least 1.8.0_101. There was a recent update to the SSL cert on the my.openhab servers using a cert from letsencrypt.org but JREs prior to 101 do not include letsencrypt.org as a trusted certificate authority.

1 Like

Thank you. I did not realize that the SSL cert issue manifests itself in this way.
I had thought that this wasn’t a problem because my OH1 instance always showed “Online” using the 1.8.0_65 version of java, but it looks like I was mistaken.

Upgrading to 1.8.0_101 allowed myopenhab on OH2 come online.

For those on this thread that are like me and wondering how to ‘update’ your Java version, here’s a cross link since I found it many many hours after finding this thread.

I too had no log details to go by and was scratching my head, excpet for these repetitive XHR requests to ‘my.openhab’ url’s. But no errors indicating that the MyOpenHABClient was doing anything. Well, the root cause were the SSL issues solved by getting the correct version of Java. Once updated it magically worked and I was able to see significantly more logging outputs, which now include MyOpenHABClient outputs.

I had already installed Java 1.8 on my Raspberry Pi using Raspian via apt-get and it resulted in version 1.8.0_65; which is still the latest version if you use apt-get update as of today (08/17/2016).

To get the latest that will work with my.openhab I finally found this thread over here!.

Using those instructions, you can get the latest Java 1.8.0_101 which is needed to solve the SSL issues for my.openhab.

It worked like a charm!

1 Like