Web Interface of openHab 3 not reachable

Today I’ve upgraded from OH 2.5.11 to 3.0.0 via the openhab-config tool. The upgrade went smoothly. After a reboot I checked with “openhab-cli status” and it looks like openhab is running. But the web interface is not reachable and the openhab.log is empty.

Any ideas what the problem might be?

How long did you wait the webpage to come up after reboot ? A few users replied that they were not waiting long enough when they had similar problem.
You may run the command

sudo netstat -tulpn | grep java

this should list several listening ports. The port that openhab is running on in your installation needs to be listed there.

1 Like

That’s the output:

tcp6 0 0 127.0.0.1:41007 :::* LISTEN 599/java
tcp6 0 0 :::8880 :::* LISTEN 1022/java
tcp6 0 0 :::8080 :::* LISTEN 1022/java
tcp6 0 0 :::8443 :::* LISTEN 1022/java
tcp6 0 0 :::6789 :::* LISTEN 1022/java
tcp6 0 0 :::8843 :::* LISTEN 1022/java
udp6 0 0 :::10001 :::* 1022/java
udp6 0 0 10.1.30.1:58642 :::* 1022/java
udp6 0 0 10.1.20.13:49988 :::* 1022/java
udp6 0 0 :::3478 :::* 1022/java

Openhab should be on port 8053, its not listet there. What might the problem be?

That’s the output of “openhab-cli info”:

URLs: http://10.1.20.13:8080
https://10.1.20.13:8053

You may want to check to make sure your custom port config is still in place. Another user had a similar problem when upgrading via openHABian.

Does the http port work as expected ?
In that case it is a matter of the https customized port as ae_0017 wrote.

After the update the https port was reset to 8443. But I changed that in /etc/default/openhab back to

OPENHAB_HTTPS_PORT=8053

But when I try to connect to https://10.1.20.13:8053 I get an error message.

Did you edit the right file.
In case of an upgrade you may have a file /etc/default/openhab and /etc/default/openhab2.
After editing the file you did a restart of the openhab service ?

The http port does work as expected ?

What do you mean by that? I think I’ve edited the right file (“openhab.cli info” shows the http ports I’ve configured). But when I try to open the UI at the port, I get the message that the site cannot be reached.

The command

sudo netstat -tulpn | grep java

does NOT show the ports I’ve configured.

http is not equal https
try once the http port, this one is listed in the netstat output
http://10.1.20.13:8080/

I’ve tried that. On that port I can reach my unifi wifi access point controller :slight_smile:

As http port for openhab I configured 8088. Whe I try to access that, I also get the error message that the site cannot be reached.

  • login to your openhab system as non root user and execute:
    env | grep OPENHAB_HTTP

  • does this show your customized ports for http and https ?

  • do

sudo grep -l -R 8080 ${OPENHAB_CONF} /etc/default ${OPENHAB_HOME} ${OPENHAB_USERDATA}

this will show files containing the port number 8080. That should be normal at least for a subset of them. Which files are listed ?
In case you would like to see the content that is found run

sudo grep -R 8080 ${OPENHAB_CONF} /etc/default ${OPENHAB_HOME}

Could it be that the port 8080 from Unify controller and port 8080 from OH are conflicting resulting in not finishing the webUI. Maybe the change of the port I’m OH was not successful.

1 Like

Result is:

OPENHAB_HTTPS_PORT=8053
OPENHAB_HTTP_PORT=8088

Result is:

/etc/openhab/html/index.html
/etc/openhab/html/readme.txt
/etc/openhab/services/addons.cfg.dpkg-old
/etc/default/openhab2
/usr/share/openhab/runtime/bin/setenv
/var/lib/openhab/etc/org.ops4j.pax.web.cfg
/var/lib/openhab/Californium.properties
/var/lib/openhab/tmp/heapdump4693445095200484336.hprof

Now I should look through this file and check if I find an 8080?

I’ll try to shut down the unify controller and restart OH. If a conflict is the problem this way should work then?

What is also strange is that /val/log/openhab/openhab.log is empty. Is this possible?

I did that but OH web interface is still not reachable (tried http ports 8080, 8088 and https ports 8443, 8053) … :frowning:

I’ve found another thing: if I run

sudo openhab-cli console

I get

Logging in as openhab
Failed to get the session.

This is also not correct, is it?

systemctl status openhab

says:

openhab.service - openHAB - empowering the smart home
Loaded: loaded (/usr/lib/systemd/system/openhab.service; enabled; vendor preset: enabled)
Active: active (running) since Sat 2021-01-16 17:52:13 CET; 5min ago
Docs: https://www.openhab.org/docs/
https://community.openhab.org
Process: 28301 ExecStop=/usr/share/openhab/runtime/bin/karaf stop (code=exited, status=0/SUCCESS)
Main PID: 28422 (java)
Tasks: 29 (limit: 4915)
CGroup: /system.slice/openhab.service
       └─28422 /usr/bin/java -XX:-UsePerfData -Dopenhab.home=/usr/share/openhab -Dopenhab.conf=/etc/openhab -Dopenhab.runtime=/usr/share/openhab/runtime -Dopenhab.userdata=/var/lib/openhab -Dopenhab.l
Jan 16 17:52:13 Archimedes systemd[1]: Started openHAB - empowering the smart home.

The service for the (karaf) console is running under port 8101.
You can check if the port is in use by checking which ports are used with:

netstat -tulpn | grep java

The status command says that the openhab service is running since 5 minutes.
It could be that this is not long enough that all parts are up and running yet.

The files that you reported to contain port 8080 should be ok.

Is there differnt output of “systemctl status openhab” if you execute it about 30 minutes or later after service start ?

1 Like

After 15 hours it looks like this:

openhab.service - openHAB - empowering the smart home
Loaded: loaded (/usr/lib/systemd/system/openhab.service; enabled; vendor preset: enabled)
Active: active (running) since Sat 2021-01-16 18:01:22 CET; 15h ago
Docs: https://www.openhab.org/docs/
       https://community.openhab.org
Main PID: 563 (java)
Tasks: 29 (limit: 4915)
CGroup: /system.slice/openhab.service
       └─563 /usr/bin/java -XX:-UsePerfData -Dopenhab.home=/usr/share/openhab -Dopenhab.conf=/etc/openhab -Dopenhab.runtime=/usr/share/openhab/runtime -Dopenhab.userdata=/var/lib/openhab -Dopenhab.log
Jan 16 18:01:22 Archimedes systemd[1]: Started openHAB - empowering the smart home.

The output of “netstat -tulpn | grep java” is (the two ports I have configured 8088/8053 are not included):

tcp6       0      0 :::6789                 :::*                    LISTEN      991/java            
tcp6       0      0 :::8843                 :::*                    LISTEN      991/java            
tcp6       0      0 :::8880                 :::*                    LISTEN      991/java            
tcp6       0      0 :::8080                 :::*                    LISTEN      991/java            
tcp6       0      0 :::8443                 :::*                    LISTEN      991/java            
tcp6       0      0 127.0.0.1:34815         :::*                    LISTEN      563/java
udp6       0      0 :::10001                :::*                                991/java            
udp6       0      0 10.1.30.1:41749         :::*                                991/java            
udp6       0      0 :::3478                 :::*                                991/java            
udp6       0      0 10.1.20.13:48259        :::*                                991/java

When I upgraded OH java was updated from 8 to 11. Can this be an issue?

could you share the openhab.log ?

that upgrade is expected. So that should be fine.
You may check if java 11 is the default which has to be the case by running:

java -version

The output of netstat shows that port 8080 and 8443 are in use by the same process with the process id ( PID ) 961 which is java. So that should be the openhab process. You can check that by running

ps -ef |grep 961

Keep in mind after a restart of the service or reboot of the system the PID might change.

The search for files containing the old port numbers found the file

which belongs to the OH2 instance. As you did an upgrade it could be the case that still this file is in use to define ports for your OH3 service.
So could you just check and also change the port numbers in the openhab2 file and do a restart of the openhab.service ?
It is not required to wait 15h. I think after 30 minutes to max. of 1h ( which I assume is more than required ) should be enough to wait.
Redo the netstat command please to check which port numbers are in use then.