Myopenhab shows offline

I had similar issues… solved them by logging out from Myopenhab.org and log back in (website).
After this my myopenhab issues were solved.

Cheers

Just did that, also restarted openhab server, but no good still :confused:

Are you sure you used the new secret from /userdata/myopenhabcloud instead of the old secret ?

I have an myopenhab folder and not an myopenhabcloud folder.

On myopenhab he says I’m offline and somewhere it states taht I have open
hab 1, instead of 2.04

y

right now using OH2 and myopenhab I can access my sitemap remotely.
Also event logging is working flawlessly.
IFTTT is not working but I am not expecting this until Tuesday.

It should be userdata/openhabcloud as stated here.

I have/had the same issue but with 1.8.
I activated email and logged on fine and also used the new uuid and secret (but for 1.8)
It kept showing offline in both the sitemap and the account.

I logged on to the myopenhab.org site and re-entered the uuid and secret in the account settings and updated. It then managed to get online and after a few minutes started showing the sitemap.

The original UUID and secret were correct but it seemed to fix it. I was getting a different error to you though with unauthorised access. (Socket.IO error: not authorized)

Might help…
Josh

I don’t have Configuration->Services->IO->

I have the pine64 download. not the daily builds

does this mean I can’t work with myopenhab?

y

Yes, I made sure new secret at /var/lib/openhab2/openhabcloud is used. In fact I re-entered them to make sure, logged off and logged in, but still no fun.

I tried what joshpond80 did, entered new uuid and secret, logged off and on, but still no cure.

Btw: I have Base URL for the openHAB Cloud server as https://myopenhab.org/ in paper UI configurations.
Also tried “https://myopenhab.org/openhab.app” here. Is this correct?

I am having very similar problems. I have a new OpenHAB2 installation on a Synology RackStation. I have some basics up and working including HomeKit integration but I cannot get the cloud service working.

I have:

  1. Installed the OpenHAB Cloud service using paper UI
  2. Created an account at myopenhab.org
  3. Verified my email address
  4. Entered the UUID and secret on the website

After some reading I decided to regenerate the UUID and secret so I stopped OpenHAB2, deleted the files and restarted OpenHAB2. I entered the new UUID and secret. Still no joy

I have checked my Java version:
ash-4.3# java -version
openjdk version "1.8.0_101"
OpenJDK Runtime Environment (IcedTea 3.1.0) (linux-gnu build 1.8.0_101-b13)
OpenJDK 64-Bit Server VM (build 25.101-b13, mixed mode)

I don’t see much from the CloudClient in the log. I do see a lot of this very often:

2016-12-20 22:11:43.407 [DEBUG] [io.socket.client.Manager ] - opening <removed URL as I am a new user!>
2016-12-20 22:11:43.407 [DEBUG] [io.socket.client.Manager ] - connection attempt will timeout after 20000
2016-12-20 22:11:43.408 [DEBUG] [io.socket.engineio.client.Socket ] - creating transport 'polling’
2016-12-20 22:11:43.408 [DEBUG] [io.socket.engineio.client.Socket ] - setting transport polling
2016-12-20 22:11:43.408 [DEBUG] [t.engineio.client.transports.Polling] - polling
2016-12-20 22:11:43.408 [DEBUG] [ngineio.client.transports.PollingXHR] - xhr poll
2016-12-20 22:11:43.409 [DEBUG] [ngineio.client.transports.PollingXHR] - xhr open GET: https://myopenhab.org/socket.io/?EIO=3&transport=polling
2016-12-20 22:11:43.409 [DEBUG] [ngineio.client.transports.PollingXHR] - sending xhr with url https://myopenhab.org/socket.io/?EIO=3&transport=polling | data null
2016-12-20 22:11:43.461 [DEBUG] [io.socket.engineio.client.Socket ] - socket error io.socket.engineio.client.EngineIOException: xhr poll error
2016-12-20 22:11:43.461 [DEBUG] [io.socket.client.Manager ] - connect_error
2016-12-20 22:11:43.461 [DEBUG] [io.socket.client.Manager ] - cleanup
2016-12-20 22:11:43.463 [DEBUG] [io.socket.client.Manager ] - reconnect attempt error
2016-12-20 22:11:43.463 [DEBUG] [io.socket.client.Manager ] - will wait 5000ms before reconnect attempt
2016-12-20 22:11:43.465 [DEBUG] [io.socket.engineio.client.Socket ] - socket close with reason: transport error
2016-12-20 22:11:43.465 [DEBUG] [t.engineio.client.transports.Polling] - transport not open - deferring close

One point would be that OpenHAB expects the Oracle Java not the OpenJDK!

My system shows:

:~ $ java -version
java version “1.8.0_101”
Java™ SE Runtime Environment (build 1.8.0_101-b13)
Java HotSpot™ Client VM (build 25.101-b13, mixed mode)

Thanks. That has fixed it: I need to read more carefully (and not assume official Synology packages are the best). Removed Synology Java 1.8 and installed the Unofficial version that downloads from Oracle. Thanks

Re-installed openhab2-offline again and re-entered new UUID and secret. Installed openHAB Cloud Connector from PaperUI. Still myopenhab.org shows offline.

This is what my log looks like:

08:16:55.462 [DEBUG] [io.socket.client.Manager            ] - attempting reconnect
08:16:55.463 [DEBUG] [io.socket.client.Manager            ] - readyState CLOSED
08:16:55.464 [DEBUG] [io.socket.client.Manager            ] - opening https://myopenhab.org:443/
08:16:55.465 [DEBUG] [io.socket.client.Manager            ] - connection attempt will timeout after 20000
08:16:55.466 [DEBUG] [io.socket.engineio.client.Socket    ] - creating transport 'polling'
08:16:55.467 [DEBUG] [io.socket.engineio.client.Socket    ] - setting transport polling
08:16:55.467 [DEBUG] [t.engineio.client.transports.Polling] - polling
08:16:55.468 [DEBUG] [ngineio.client.transports.PollingXHR] - xhr poll
08:16:55.469 [DEBUG] [ngineio.client.transports.PollingXHR] - xhr open GET: https://myopenhab.org/socket.io/?EIO=3&transport=polling
08:16:55.471 [DEBUG] [ngineio.client.transports.PollingXHR] - sending xhr with url https://myopenhab.org/socket.io/?EIO=3&transport=polling | data null
08:16:55.954 [DEBUG] [io.socket.engineio.client.Socket    ] - socket error io.socket.engineio.client.EngineIOException: xhr poll error
08:16:55.954 [DEBUG] [io.socket.client.Manager            ] - connect_error
08:16:55.955 [DEBUG] [io.socket.client.Manager            ] - cleanup
08:16:55.956 [DEBUG] [io.socket.client.Manager            ] - reconnect attempt error
08:16:55.958 [DEBUG] [io.socket.client.Manager            ] - will wait 5000ms before reconnect attempt
08:16:55.959 [DEBUG] [io.socket.engineio.client.Socket    ] - socket close with reason: transport error
08:16:55.960 [DEBUG] [t.engineio.client.transports.Polling] - transport not open - deferring close

Btw I see following error in the top of the log:

2016-12-24 08:34:54.866 [ERROR] [ficate.internal.CertificateGenerator] - Failed to generate a new SSL Certificate.
java.security.cert.CertificateException: Failed to generate the new certificate.
        at org.openhab.io.jetty.certificate.internal.CertificateGenerator.generateCertificate(CertificateGenerator.java:202)[166:org.openhab.io.jetty.certificate:2.0.0.201612180944]
        at org.openhab.io.jetty.certificate.internal.CertificateGenerator.start(CertificateGenerator.java:84)[166:org.openhab.io.jetty.certificate:2.0.0.201612180944]
        at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:771)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:]
        at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:1)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:]
        at java.security.AccessController.doPrivileged(Native Method)[:1.8.0_101]
        at org.eclipse.osgi.internal.framework.BundleContextImpl.startActivator(BundleContextImpl.java:764)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:]
        at org.eclipse.osgi.internal.framework.BundleContextImpl.start(BundleContextImpl.java:721)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:]
        at org.eclipse.osgi.internal.framework.EquinoxBundle.startWorker0(EquinoxBundle.java:936)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:]
        at org.eclipse.osgi.internal.framework.EquinoxBundle$EquinoxModule.startWorker(EquinoxBundle.java:319)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:]
        at org.eclipse.osgi.container.Module.doStart(Module.java:571)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:]
        at org.eclipse.osgi.container.Module.start(Module.java:439)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:]
        at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1582)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:]
        at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1562)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:]
        at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1533)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:]
        at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1476)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:]
        at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:]
        at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:]
        at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:]
Caused by: java.security.NoSuchAlgorithmException: EC KeyPairGenerator not available
        at java.security.KeyPairGenerator.getInstance(KeyPairGenerator.java:218)[:1.8.0_101]
        at org.openhab.io.jetty.certificate.internal.CertificateGenerator.generateCertificate(CertificateGenerator.java:159)[166:org.openhab.io.jetty.certificate:2.0.0.201612180944]

Is this causing the myopenhab offline?

Problem resolved!!!

Please refer to the solution at https://community.openhab.org/t/failed-to-generate-a-new-ssl-certificate/19274

I still can’t figure out why mine is offline after reading so many of the solutions. I updated to a new router and changed everything over to the new IP it assigned. Internally everything works great. Most recent Java version and myopenHABcloud still gives me an offline. Getting really frustrated at the moment so just venting a little because with the cloud offline that means Alexa no longer works with it either, which we use religiously anymore. Tried uninstalling the cloud but it won’t through the Paper UI, to see if reinstalling would help. Just can’t see why everything else works remotely except OpenHAB, and yes I did port forwarding. First thing on my list with new router.

Check your Java version. Like me you may have a older version. Also make sure you have Oracle Java not OpenJDK

$ java -version
java version "1.8.0_65"
Java™ SE Runtime Environment (build 1.8.0_65-b17)
Java HotSpot™ Client VM (build 25.65-b01, mixed mode)

You need to have version 1.8.0_101 or later.

I struggled to get the java updated on my PI. I followed these instructions to get the update.

$ sudo apt-get purge openjdk*
$ sudo apt-key adv –recv-key –keyserver keyserver.ubuntu.com EEA14886
$ sudo vi /etc/apt/sources.list

Add these to the bottom. I removed them after the update.
deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main
deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main

$ sudo apt-get update
$ sudo apt-get install oracle-java8-installer
$ sudo apt-get install oracle-java8-set-default

$ java -version
java version "1.8.0_131"
Java™ SE Runtime Environment (build 1.8.0_131-b11)
Java HotSpot™ Client VM (build 25.131-b11, mixed mode)

After this update myopenhab was showing Online.

1 Like

Linux beginner here… just dug out that post searching for a solution to my offline hab…
Can someone explain me how to do the quoted stuff? Its viable for a Pi?

This is an explanation of the command given:

sudo vi /etc/apt/sources.list

You need to edit the file called “sources.list” in the folder “/etc/apt/”. To edit the file you will need to have root access so you need to use the “sudo” command to give your user root privileges. “vi” is the name of the text editor. The command will open “sources.list”. You need to add the lines below to this file. This can be done by moving your cursor to the last line. Press Ctrl+A. This will allow you to append to the end of the last line. Press Enter and copy the lines to the file. When done press Esc twice, then the “:” (colon) followed by “wq” (lower case). This will save the file and exit the editor.

deb Index of /webupd8team/java/ubuntu trusty main
deb-src Index of /webupd8team/java/ubuntu trusty main

Now run the other commands as shown in the previous posts and you should be good to go.

If you still struggle to follow I would suggest that you view a few Debian Linux beginners tutorials on Youtube. Best of luck yo you.

I was really struggling with this problem, but it turned out to be the Java-version. For my version @Manbearpig73’s solution didn’t work, instead I’ve used https://gist.github.com/ribasco/fff7d30b31807eb02b32bcf35164f11f and it worked like a charm.