Issues - Server Always Offline

I am trying to set up with with my OH2. I have ensured that I have the right UUID and secret, but still says that my server is offline. I have exposed a single item and I am pointing to, so that appears to be correct.

I have seen threads mentioning Java being the problem, but I am running Java 8 on a Pi, and this is the version that I have loaded:

java version "1.8.0"
Java™ SE Runtime Environment (build 1.8.0-b132)

I don’t see anything useful in openhab2.log, other than the following when I stop the openhab2 service:

[INFO ] [io.openhabcloud.internal.CloudClient] - Shutting down openHAB Cloud service connection

I am sure I am missing something easy, but I can’t seem to figure out what. I am a console novice so I am not sure if I should be able to use the console to tell why it is failing.

There is nothing like

[INFO ] [io.openhabcloud.internal.CloudClient] - Connected to the openHAB Cloud service (UUID = xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx, base URL = http://localhost:8080)

after start or restart in the log?

No, the INFO log is the only one I see. I also noticed that the same log entry is generated when I make changes to the Service in PaperUI. For exanmple, if I go add a new item to expose, I see the same log entry about “Shutting down the openHAB Cloud service connection”.

It makes me think that it isn’t able to connect, but I don’t see any messages that indicate that. I also ensured that I am able to reach

Do you get a result when you do


or an error message like

curl: (6) Could not resolve host:

Curl connects fine and I get the content.

Also, fwiw, I deleted the uuid and secret file and allowed OH to rebuild them, which it did (as expected) and those new values don’t change the behavior.

Seems like your openHAB Cloud Connector add-on is not running. Did you uninstall and reinstall it?

I did, but I am thinking of trying it again. When I look at bundle:list and the status in the console, it shows it is active, but obviously something is wrong. I will try removing it again and see if that helps.

I reinstalled with the same results. I set the logging to debug and captured the following, which I believe shows the error. It looks like I misunderstood the Java requirements, and I am running the wrong version after all. I am updating to 1.8.0_121 and expect it to work based on what I have seen elsewhere.

4:41:29.929 [DEBUG] [io.socket.client.IO ] - ignoring socket cache for 14:41:29.937 [DEBUG] [io.socket.client.Manager ] - readyState CLOSED 14:41:29.939 [DEBUG] [io.socket.client.Manager ] - opening 14:41:29.942 [DEBUG] [io.socket.client.Manager ] - connection attempt will timeout after 20000 14:41:29.950 [DEBUG] [io.socket.engineio.client.Socket ] - creating transport 'polling' 14:41:29.953 [DEBUG] [io.socket.engineio.client.Socket ] - setting transport polling 14:41:29.955 [DEBUG] [t.engineio.client.transports.Polling] - polling 14:41:29.956 [DEBUG] [ngineio.client.transports.PollingXHR] - xhr poll 14:41:29.959 [DEBUG] [ngineio.client.transports.PollingXHR] - xhr open GET: 14:41:29.962 [DEBUG] [ngineio.client.transports.PollingXHR] - sending xhr with url | data null 14:41:29.994 [DEBUG] [] - Ignore incorrect info null provided by bundle 14:41:30.024 [DEBUG] [e.osgi.LoggingCommandSessionListener] - Command: 'bundle:start 213' returned 'null' 14:41:30.028 [DEBUG] [] - Send SSH_MSG_CHANNEL_DATA on channel 0 14:41:30.037 [DEBUG] [] - Writing 68 bytes 14:41:30.052 [DEBUG] [] - Finished writing 14:41:30.404 [DEBUG] [io.socket.engineio.client.Socket ] - socket error io.socket.engineio.client.EngineIOException: xhr poll error 14:41:30.406 [DEBUG] [io.socket.client.Manager ] - connect_error 14:41:30.408 [DEBUG] [io.socket.client.Manager ] - cleanup 14:41:30.412 [DEBUG] [io.socket.client.Manager ] - will wait 1190ms before reconnect attempt 14:41:30.415 [DEBUG] [io.socket.engineio.client.Socket ] - socket close with reason: transport error 14:41:30.416 [DEBUG] [t.engineio.client.transports.Polling] - transport not open - deferring close

That was the issue. I didn’t understand how Java version numbering worked so I was using a version that wasn’t new enough.

Maybe you need to install addons openhabcloud on Paper UI or you can configure this on addons.service file.

My java version is also 1.8.0_121. That’s why it worked. Nice to know