Beginner: Linux Install does not start

  • Platform information:
    • Hardware: Intel based, Virtual Box VM
    • OS: Ubuntu 17.11
    • Java Runtime Environment: Zulu 9, latest version
    • openHAB version: 2
  • Issue of the topic: I have installed Openhab using this guide:

I have gotten to the part where I used these commands:

sudo systemctl start openhab2.service
sudo systemctl status openhab2.service

sudo systemctl daemon-reload
sudo systemctl enable openhab2.service

It seemed like the service was trying to start, but it just never finished. The guide says it could take up to 15 minutes, but I am sure I waited for an hour. Then I decided to restart the machine, and if I check the status of the service with the status command, it says Loaded, but inactive. If I try to start the service it fails.

This is my first time using Linux as well, so I am not quite sure were to look for the problem, so I would appreciate any advice.

Thanks.

I think ubuntu also uses journalctl so heres a command I took from another topic to view system logs if theres some hints why OH won’t start.

journalctl -u openhab2.service -b

-u openhab2.service is to show only log entries made by OH and -b is to show only entries after last boot.

Here’s the link to the topic I picked the command from. Openhab2 not starting after apt-get update = solved

1 Like

Try to downgrade to Zulu JDK 8 to see if this solves the issue.
If yes, please report back with the following info:

uname -a
java -version

and the exact openHAB 2.x build (2.0 or 2.1 or 2.2 snapshot #)
so we can see which combo is problematic and update the docs

http://docs.openhab.org/installation/index.html#prerequisites

1 Like

Thanks for the input guys.

I tried running your commands. This is the Java install:

Running the journalctl command, I get a line that says “Java 1.8 or higher required, aborting launch”. So it seems my installed Java version does not work?

Hi again. I see that it is like you said, the guide says to not use Java 9 yet. So, a Linux question then. How do I downgrade Java?

Ok, next update. I installed Zulu 8. Now I have both 8 and 9 installed. I then found this command:

sudo update-alternatives --config java

This allowed me to change to version 8. Now Openhab starts, so this solved the problem. Thanks a lot. But, how do I change so that version 8 will start in auto? Because now it says 9 is auto and 8 is manual. I suspect if I reboot the machine, it will start with version 9 again.

Here’s a link to azul installation guide in pdf.
Think you have read it because you have java allready running. https://www.google.fi/url?sa=t&source=web&rct=j&url=https://www.azul.com/files/zulu_8.9_install.pdf&ved=0ahUKEwiyhaH_pcXXAhXMCOwKHY1_CFoQFggjMAA&usg=AOvVaw27sTICADvWRlyTQS28uR0r

Just follow this guide first unsinstalling and after that installing the right version. Ofcourse theres possibilty to have both versions installed. You can switch between them. You can find these instructions allso in the pdf.

Edit I was too slow :smile:

1 Like

I’m not sure but if you change your enviroment variable JAVA_HOME to zulu-8 instead of 9 that should do it.

Excuse me for my ignorance, but how do I do that? I’m just beginning both openHab and Linux at the same time :slight_smile:

Edit: Google found it for me it seems, so I will try this. https://askubuntu.com/questions/692203/java-alternatives-change-auto-mode

Edit 2: That worked. On with the OpenHAB installation. Thanks again guys. I bet I will be frequenting this forum from now on :slight_smile:

3 Likes