Today I decided to look at OpenHab2. I’m quite impressed so I decided to install it on my Ubuntu machine.
I installed it with:
apt-get install openhab2-online and then I tried to start the service, which failed. After running
/usr/share/openhab2/start.sh I get the following error:
Launching the openHAB runtime...
karaf: KARAF_BASE is not valid: /usr/share/openhab2/userdata
I can change the error by creating the folder, but in the end it starts asking for a configuration file. I guess I can’t just make an empty file.
So my question is, how to solve this?
Thanks in advance.
I was having a similar problem with a fresh install of Ubuntu 16.04.1 using either install method of OpenHab. In either case OpenHab would hang without any error message that I could find.
I got it to work by changing versions of Java with the command
sudo update-alternatives --config java
- Java reports version as: openjdk version 1.8.0_111)
did not work:
- Java reports version as: openjdk version 9-internal
I may have selected the “wrong” version of java when fetching it with apt.
Interesting. We should add this information to the documentation (I’m on it… done. Will be merged soon).
The last I read in regards to that topic: https://launchpad.net/~webupd8team/+archive/ubuntu/java
Important!!! For now, you should continue to use Java 8 because Oracle Java 9 is available as an early access release (it should be released in 2016)! You should only use Oracle Java 9 if you explicitly need it, because it may contain bugs and it might not include the latest security patches! Also, some Java options were removed in JDK9, so you may encounter issues with various Java apps. More information and installation instructions (Ubuntu / Linux Mint / Debian): http://www.webupd8.org/2015/02/install-oracle-java-9-in-ubuntu-linux.html
Thanks for the reply. I saw your reference after I got OH working again. I guess I really should use the real Java instead of JDK.