openHAB installed, started, but no webinterface

  • Platform information:
    • Hardware: Intel® Atom™ CPU D410 @ 1.66GHz, 2 cores
    • OS: debian 8
    • Java Runtime Environment: 8
    • openHAB version: 2.4
  • Issue of the topic: I’m new to openHAB and recently installed openHABian on my debian 8. I had some issues with python and java when installing, but these seem to have been fixed.
    When I however want to access the webviewer on port 8080, I don’t get a web connection.

Here is some output that demonstrates current configuration:

java -version

openjdk version “1.8.0_202”
OpenJDK Runtime Environment (Zulu 8.36.0.1-CA-linux64) (build 1.8.0_202-b05)
OpenJDK 64-Bit Server VM (Zulu 8.36.0.1-CA-linux64) (build 25.202-b05, mixed mode)

journalctl -u openhab2.service -b

– Logs begin at Fri 2019-03-15 15:59:17 CET, end at Fri 2019-03-15 16:38:14 CET. –
Mar 15 15:59:26 lovemydebian systemd[1]: Starting openHAB 2 - empowering the smart home…
Mar 15 15:59:27 lovemydebian systemd[1]: Started openHAB 2 - empowering the smart home.
Mar 15 16:02:44 lovemydebian systemd[1]: Stopping openHAB 2 - empowering the smart home…
Mar 15 16:03:03 lovemydebian systemd[1]: Starting openHAB 2 - empowering the smart home…
Mar 15 16:03:03 lovemydebian systemd[1]: Started openHAB 2 - empowering the smart home.

ps -aux | grep openhab

root 2273 0.0 0.2 12732 2328 pts/0 S+ 16:38 0:00 grep --color=auto openhab
openhab 3714 6.9 38.0 2931896 386324 ? Ssl 16:03 2:29 /usr/bin/java -Dopenhab.home=/usr/share/openhab2 -Dopenhab.conf=/etc/openhab2 -Dopenhab.runtime=/usr/share/openhab2/runtime -Dopenhab.userdata=/var/lib/openhab2 -Dopenhab.logdir=/var/log/openhab2 -Dfelix.cm.dir=/var/lib/openhab2/config -Djava.library.path=/var/lib/openhab2/tmp/lib -Djetty.host=0.0.0.0 -Djetty.http.compliance=RFC2616 -Dorg.ops4j.pax.web.listening.addresses=0.0.0.0 -Dorg.osgi.service.http.port=8080 -Dorg.osgi.service.http.port.secure=8443 -Djava.awt.headless=true -XX:+UseG1GC -Xms250m -Xmx350m -Djava.endorsed.dirs=/usr/lib/jvm/zulu-8-amd64/jre/jre/lib/endorsed:/usr/lib/jvm/zulu-8-amd64/jre/lib/endorsed:/usr/share/openhab2/runtime/lib/endorsed -Djava.ext.dirs=/usr/lib/jvm/zulu-8-amd64/jre/jre/lib/ext:/usr/lib/jvm/zulu-8-amd64/jre/lib/ext:/usr/share/openhab2/runtime/lib/ext -Dkaraf.instances=/var/lib/openhab2/tmp/instances -Dkaraf.home=/usr/share/openhab2/runtime -Dkaraf.base=/var/lib/openhab2 -Dkaraf.data=/var/lib/openhab2 -Dkaraf.etc=/var/lib/openhab2/etc -Dkaraf.logs=/var/log/openhab2 -Dkaraf.restart.jvm.supported=true -Djava.io.tmpdir=/var/lib/openhab2/tmp -Djava.util.logging.config.file=/var/lib/openhab2/etc/java.util.logging.properties -Dkaraf.startLocalConsole=false -Dkaraf.startRemoteShell=true -classpath /usr/share/openhab2/runtime/lib/boot/activation-1.1.1.jar:/usr/share/openhab2/runtime/lib/boot/jaxb-api-2.3.0.jar:/usr/share/openhab2/runtime/lib/boot/jaxb-core-2.2.11.jar:/usr/share/openhab2/runtime/lib/boot/jaxb-impl-2.2.11.jar:/usr/share/openhab2/runtime/lib/boot/org.apache.karaf.diagnostic.boot-4.2.1.jar:/usr/share/openhab2/runtime/lib/boot/org.apache.karaf.jaas.boot-4.2.1.jar:/usr/share/openhab2/runtime/lib/boot/org.apache.karaf.main-4.2.1.jar:/usr/share/openhab2/runtime/lib/boot/org.osgi.core-6.0.0.jar org.apache.karaf.main.Main
root 10068 0.0 0.3 25932 3248 pts/0 T 16:11 0:00 journalctl -u openhab2.service -b

netstat -anp | grep java

tcp6 0 0 127.0.0.1:8101 :::* LISTEN 3714/java
tcp6 0 0 127.0.0.1:60014 :::* LISTEN 3714/java
tcp6 0 0 :::5007 :::* LISTEN 3714/java
tcp6 0 0 :::8181 :::* LISTEN 3714/java
udp6 0 0 :::5353 :::* 3714/java
unix 3 [ ] STREAM CONNECTED 16885 3714/java
unix 3 [ ] STREAM CONNECTED 17595 3714/java
unix 3 [ ] STREAM CONNECTED 16877 3714/java
unix 3 [ ] STREAM CONNECTED 16888 3714/java
unix 3 [ ] STREAM CONNECTED 17603 3714/java
unix 3 [ ] STREAM CONNECTED 16889 3714/java
unix 3 [ ] STREAM CONNECTED 17600 3714/java
unix 3 [ ] STREAM CONNECTED 16824 3714/java
unix 2 [ ] STREAM CONNECTED 17590 3714/java
unix 3 [ ] STREAM CONNECTED 17602 3714/java
unix 2 [ ] STREAM CONNECTED 17583 3714/java
unix 3 [ ] STREAM CONNECTED 16878 3714/java
unix 3 [ ] STREAM CONNECTED 16886 3714/java
unix 3 [ ] STREAM CONNECTED 17596 3714/java
unix 3 [ ] STREAM CONNECTED 17601 3714/java

netstat -anp | grep 8080

The installation is completely default, so no ports have been changed or whatsoever. I however see from the netstat output that no java service seems to be listening on port 8080.

I had another service running which redirected traffic from port 8080 to 8443, so I killed that service. I tried disabling the host-based firewall rules completely.

Can somebody shed some light on this?

Is this the very first time of starting up?

It can take… A VERY long time to self configure.

Refresh the web browser occasionally

You’ll first see a Jetty error

Then the openHAB2 start page will begin to build

This is indeed the first time.

I re-installed yesterday and still don’t see a web page. It shouldn’t take that long?

Yeah, a day is probably too long.

Have you tried the https port / URL ?

What does…

systemctl status openhab2

give you?

I’m out of ideas now :frowning_face:

Check the log file for any exceptions and try to change the port. Seems like the java process cannot open that specific port on your host.

HTTPS port (8443) provides the same result.

systemctl status openhab2

â openhab2.service - openHAB 2 - empowering the smart home
Loaded: loaded (/usr/lib/systemd/system/openhab2.service; enabled)
Active: active (running) since Fri 2019-03-15 16:49:38 CET; 19h ago
Docs: https://www.openhab.org/docs/
https://community.openhab.org
Process: 11813 ExecStop=/usr/share/openhab2/runtime/bin/karaf stop (code=exited, status=0/SUCCESS)
Main PID: 12213 (java)
CGroup: /system.slice/openhab2.service
ââ12213 /usr/bin/java -Dopenhab.home=/usr/share/openhab2 -Dopenhab.conf=/etc/openhab2 -Dopenhab.runtime=/usr/share/openhab2/runtime -Dopenhab.userdata=/var/lib/openhab2 -Dopenhab.logdir=/var/log/openhab2 -Dfelix.cm.dir=/var…

Mar 15 16:49:38 xxx systemd[1]: Started openHAB 2 - empowering the smart home.

If I then do,

netstat -anp | grep 8070

Nothing comes back, same with 8433

In /etc/default/openhab2, I set:
OPENHAB_HTTP_PORT=8070
OPENHAB_HTTPS_PORT=8433

systemctl restart openhab2.service

[12:26:00] root@xxx:~# journalctl -u openhab2.service -b
– Logs begin at Fri 2019-03-15 15:59:17 CET, end at Sat 2019-03-16 12:27:10 CET. –
Mar 15 15:59:26 lovemydebian systemd[1]: Starting openHAB 2 - empowering the smart home…
Mar 15 15:59:27 lovemydebian systemd[1]: Started openHAB 2 - empowering the smart home.
Mar 15 16:02:44 lovemydebian systemd[1]: Stopping openHAB 2 - empowering the smart home…
Mar 15 16:03:03 lovemydebian systemd[1]: Starting openHAB 2 - empowering the smart home…
Mar 15 16:03:03 lovemydebian systemd[1]: Started openHAB 2 - empowering the smart home.
Mar 15 16:49:20 lovemydebian systemd[1]: Stopping openHAB 2 - empowering the smart home…
Mar 15 16:49:38 lovemydebian systemd[1]: Starting openHAB 2 - empowering the smart home…
Mar 15 16:49:38 lovemydebian systemd[1]: Started openHAB 2 - empowering the smart home.
Mar 16 12:25:40 lovemydebian systemd[1]: Stopping openHAB 2 - empowering the smart home…
Mar 16 12:26:00 lovemydebian systemd[1]: Starting openHAB 2 - empowering the smart home…
Mar 16 12:26:00 lovemydebian systemd[1]: Started openHAB 2 - empowering the smart home.

Both port 8070 (http) and 8433 (https) are having a problem loading the page.

I really am shooting in the dark here, as I’m very much a Velbus hardware chap, who is still learning openHAB2. (98% Velbus knowledge, 2% coding / software)

May I ask if you’re looking at the web server from the same machine, or over a network?

(I had a client who had terrible network issues that were blocking all kinds of things)

Much appreciated though!

I’m connecting through my internal network. An iptables rule has been made for 8080 and to be sure there is no iptables issue, I flushed the ruleset completely.

I however do see a (new?) error message in the log:

journalctl -u openhab2.service -b

– Logs begin at Fri 2019-03-15 15:59:17 CET, end at Sat 2019-03-16 15:15:03 CET. –
Mar 15 15:59:26 lovemydebian systemd[1]: Starting openHAB 2 - empowering the smart home…
Mar 15 15:59:27 lovemydebian systemd[1]: Started openHAB 2 - empowering the smart home.
Mar 15 16:02:44 lovemydebian systemd[1]: Stopping openHAB 2 - empowering the smart home…
Mar 15 16:03:03 lovemydebian systemd[1]: Starting openHAB 2 - empowering the smart home…
Mar 15 16:03:03 lovemydebian systemd[1]: Started openHAB 2 - empowering the smart home.
Mar 15 16:49:20 lovemydebian systemd[1]: Stopping openHAB 2 - empowering the smart home…
Mar 15 16:49:38 lovemydebian systemd[1]: Starting openHAB 2 - empowering the smart home…
Mar 15 16:49:38 lovemydebian systemd[1]: Started openHAB 2 - empowering the smart home.
Mar 16 12:25:40 lovemydebian systemd[1]: Stopping openHAB 2 - empowering the smart home…
Mar 16 12:26:00 lovemydebian systemd[1]: Starting openHAB 2 - empowering the smart home…
Mar 16 12:26:00 lovemydebian systemd[1]: Started openHAB 2 - empowering the smart home.
Mar 16 12:32:32 lovemydebian systemd[1]: Stopping openHAB 2 - empowering the smart home…
Mar 16 12:32:39 lovemydebian karaf[14090]: org.osgi.framework.BundleException: Unable to acquire the state change lock for the module: osgi.identity; type=“osgi.bundle”; version:Version=“3.12.100.v20180210-1608”; osgi.identity="org.eclip
Mar 16 12:32:39 lovemydebian karaf[14090]: at org.eclipse.osgi.container.Module.lockStateChange(Module.java:337)
Mar 16 12:32:40 lovemydebian karaf[14090]: at org.eclipse.osgi.internal.framework.EquinoxBundle$SystemBundle$EquinoxSystemModule.asyncStop(EquinoxBundle.java:156)
Mar 16 12:32:40 lovemydebian karaf[14090]: at org.eclipse.osgi.internal.framework.EquinoxBundle$SystemBundle.stop(EquinoxBundle.java:262)
Mar 16 12:32:40 lovemydebian karaf[14090]: at org.eclipse.osgi.internal.framework.EquinoxBundle$SystemBundle.stop(EquinoxBundle.java:267)
Mar 16 12:32:40 lovemydebian karaf[14090]: at org.eclipse.osgi.launch.Equinox.stop(Equinox.java:123)
Mar 16 12:32:40 lovemydebian karaf[14090]: at org.apache.karaf.main.Main$2.run(Main.java:354)
Mar 16 12:32:40 lovemydebian karaf[14090]: Caused by: java.util.concurrent.TimeoutException: Timeout after waiting 5 seconds to acquire the lock.
Mar 16 12:32:40 lovemydebian karaf[14090]: at org.eclipse.osgi.container.Module.lockStateChange(Module.java:334)
Mar 16 12:32:40 lovemydebian karaf[14090]: … 5 more
Mar 16 12:32:46 lovemydebian systemd[1]: Starting openHAB 2 - empowering the smart home…
Mar 16 12:32:46 lovemydebian systemd[1]: Started openHAB 2 - empowering the smart home.
Mar 16 15:09:21 lovemydebian systemd[1]: Stopping openHAB 2 - empowering the smart home…
Mar 16 15:09:28 lovemydebian karaf[20357]: org.osgi.framework.BundleException: Unable to acquire the state change lock for the module: osgi.identity; type=“osgi.bundle”; version:Version=“3.12.100.v20180210-1608”; osgi.identity="org.eclip
Mar 16 15:09:28 lovemydebian karaf[20357]: at org.eclipse.osgi.container.Module.lockStateChange(Module.java:337)
Mar 16 15:09:28 lovemydebian karaf[20357]: at org.eclipse.osgi.internal.framework.EquinoxBundle$SystemBundle$EquinoxSystemModule.asyncStop(EquinoxBundle.java:156)
Mar 16 15:09:28 lovemydebian karaf[20357]: at org.eclipse.osgi.internal.framework.EquinoxBundle$SystemBundle.stop(EquinoxBundle.java:262)
Mar 16 15:09:28 lovemydebian karaf[20357]: at org.eclipse.osgi.internal.framework.EquinoxBundle$SystemBundle.stop(EquinoxBundle.java:267)
Mar 16 15:09:28 lovemydebian karaf[20357]: at org.eclipse.osgi.launch.Equinox.stop(Equinox.java:123)
Mar 16 15:09:28 lovemydebian karaf[20357]: at org.apache.karaf.main.Main$2.run(Main.java:354)
Mar 16 15:09:28 lovemydebian karaf[20357]: Caused by: java.util.concurrent.TimeoutException: Timeout after waiting 5 seconds to acquire the lock.
Mar 16 15:09:28 lovemydebian karaf[20357]: at org.eclipse.osgi.container.Module.lockStateChange(Module.java:334)
Mar 16 15:09:28 lovemydebian karaf[20357]: … 5 more
Mar 16 15:09:35 lovemydebian systemd[1]: Starting openHAB 2 - empowering the smart home…
Mar 16 15:09:35 lovemydebian systemd[1]: Started openHAB 2 - empowering the smart home.

I didn’t see this before, is this something of a known issue (with Eclipse?)?

After some digging this seems to be a known issue in Eclipse, removing specific files (TableLock and fileTable) should fix this.

So I searched these:

locate -r eclipse | grep Table

/var/lib/openhab2/cache/org.eclipse.core.runtime/.manager/.fileTableLock
/var/lib/openhab2/cache/org.eclipse.osgi/.manager/.fileTable.3
/var/lib/openhab2/cache/org.eclipse.osgi/.manager/.fileTable.4
/var/lib/openhab2/cache/org.eclipse.osgi/.manager/.fileTableLock

Removed these files and restarted openhab.
Still no service listening on port 8080 (or another port that I tried).

Solved, I completely de-installed and now installed through linux apt-get method instead of hassle free openHabian and worked instantly…

1 Like