Web Interface of openHab 3 not reachable

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.

openhab.log, audit.log, and events.log are empty (all have 0 byte).

This check says (seems to be right):

openjdk version "11.0.9" 2020-10-20 LTS

Good idea, I’ll do that (remark: the port 8080 and 8443 are used by a unifi controller, thats the reason why I configured OH to use 8088 and 8053) …

… I did that but it didn’t change anything. I think I’ll do a clean install of OH3 on another Raspi.

I never succeeded in changing ports for OH3 on docker for one reason or another. My use case was on a synology with also a unifi controller. I changed the unifi ports and openhab worked on the standard ports. So i kept it that way…

1 Like

Not really right Java version.
We strongly recommend Zulu 11, not OpenJDK.

1 Like

Same thing happened to me today. I’ve been working two days building up everythng with OH3. During this time I have occasionally being having problems with the web interface - the content didn’t load. Now I can’t see anything. The browser just tries to update the page. Frontail doesn’t show any errors in the logs. I have been waiting for about hour now. This is very frustrating, since there’s still a lot to do. If this is just too early version…

2 Likes

I didn’t install that manually, that was what openhabian-config installed automatically … the full version info looks like this:

openjdk version "11.0.9" 2020-10-20 LTS
OpenJDK Runtime Environment Zulu11.43+88-CA (build 11.0.9+11-LTS)
OpenJDK Client VM Zulu11.43+88-CA (build 11.0.9+11-LTS, mixed mode)

Is this the right one?

Yes, the complete version string shows correct version installed.

1 Like

I want to state that this is some sort of browser issue. With another computer the web pages worked fine, but with this computer the pages are still trying to open… Refreshing the page with Ctrl+F5 doesn’t help.
Microsoft Edge on both computers.
I’m using a separate browser (Edge) when setting up the OH3. It is easier to switch between browsers since the icon looks different :smiley:

I am having bit of a similar issue, i m in windows 10.

  1. I installed OH3 in windows 10 (basically set java home download and extract)

  2. run OH3 and confirm it was working fine

  3. updated the \runtime\bin\setenv.bat HTTP_PORT=8099

  4. Confirm the web ui was available in new port. All working good.

  5. Then i decided to make OH3 as a service and did the steps in documentation to make OH3 service again all good.

But if i start OH3 as service the web ui port is 8080 not 8099 as set in the setenv.bat (and in setenv) file.
But if i stop the service and start OH3 via command prompt the http port configured in setenv is being used as 8099.

Now i am scratching my head how do i make sure my OH3 as service uses the port configured in setenv.
Can some one please help.

P.S i have i don’t have any \etc\default\ folder.

Have you followed these instructions and changed the port here ?

wrapper.java.additional.14=-Dorg.osgi.service.http.port=8080
wrapper.java.additional.15=-Dorg.osgi.service.http.port.secure=8443
1 Like

Sorry for the reply. I totally missed that config ( should have tried the search function in the config file as well than skimming it visually).
Long story short i changed it and the OH3 as service is starting 8099 port.

Thanks for the help

Unfortunately I ran into the same problem auf upgrading from 3.4.2 to 4.0.1 :frowning:

openhab-cli info says:
Version: 4.0.1 (Build)

User: openhab (Active Process 692)
User Groups: openhab tty dialout audio bluetooth gpio

Directories: Folder Name | Path | User:Group
----------- | ---- | ----------
OPENHAB_HOME | /usr/share/openhab | openhab:openhab
OPENHAB_RUNTIME | /usr/share/openhab/runtime | openhab:openhab
OPENHAB_USERDATA | /var/lib/openhab | openhab:openhab
OPENHAB_CONF | /etc/openhab | openhab:openhab
OPENHAB_LOGDIR | /var/log/openhab | openhab:openhab
OPENHAB_BACKUPS | /var/lib/openhab/backups | root:root

URLs: http://192.168.178.98:8080
https://192.168.178.98:8443

But these 2 links don’t open the web interface. „Site can not be opened“ and iOS app doesn’t work aswell. Any ideas?

Edit: after
sudo apt-get install openhab=3.4.5-1
and
sudo apt-get install openhab-addons=3.4.5-1
everything looks good again. Web interface perfectly reachable.

Why does it not work with 4.0.1?

Did you install Java version 17 when you switched to 4.0.X ?
Based on the steps / information you provided I would assume that this is not the case.

You were right. Java 17 was not installed.
Now:
openjdk 17.0.7 2023-04-18
OpenJDK Runtime Environment (build 17.0.7+7-Raspbian-1deb11u1rpt1)
OpenJDK Client VM (build 17.0.7+7-Raspbian-1deb11u1rpt1, mixed mode, emulated-client)

But web interface doesn’t show up again. :frowning:

Edit: Solution in my case:
Stop openHAB service, clear cache and reboot.
Too simple… :wink:

1 Like