No UI on new OpenHAB 4 on Pi 4

  • Platform information:
    • Hardware: Pi 4/8GB RAM/500GB SSD USB, 128GB SDRAM
    • OS: Raspbian GNU/Linux 11 (bullseye)
    • Java Runtime Environment: openjdk version “17.0.7” 2023-04-18
    • openHAB version: 4
  • Issue of the topic: I created the Raspbian image using the Raspbian Pi imager and selected the latest OpenHAB 4 release. The install went well and I can connect to it via SSH without any issues. I can also run openhabian-config and make changes.

I cannot access the console at http://openhabian:8080 or via it’s IP address. I simply get " This site can’t be reached" in Chrome, and ‘Unable to connect’ in Firefox. I can ping ‘openhabian’ and the ip address.

I noted the following message when I logged in via SSH:
‘sed: can’t read /var/lib/openhab/etc/version.properties: No such file or directory’

I welcome any ideas on how I can diagnose this issue.

Thank you.

What’s the output of

sudo service openhab status

?

Hi Hans;

The output is: Unit openhab.service could not be found.

Marc

Hmm, this says that openHAB is not installed…

Look through the first_boot.log file for any errors or suspicious stuff.

When did you download the image. There was a bug in openHABian fixed less than a week ago.

Assuming everything looks good, you can run openhabian-config and install anything missing, though a clean first boot would probably be preferable.

Definitely read and follow the debugging and troubleshooting section of the openHABian docs.

I’ll look at the first_boot.log later today.

I did my first install a week or so ago and it did the same thing. I wiped everything clean and did it again yesterday with a fresh image with the same result.

I did run openhabian-config and asked it to update anything that needed it, but no change. Can’t view the logs through openhabian-config, so obviously something got missed during the install.

I’ll also look through the debugging and troubleshooting section as suggested.

Thanks…

If openHABian didn’t install OH in the first place, just opening openhabian-config isn’t going to install it. You’ll have to tell it to install it (don’t remember the menu option but it’s there).

I tried the option to install it from the menu and got the following error: (I had to remove references to http or https)

**There was an error or interruption during the execution of: “03 Install openHAB” *Please try again. If the error persists, please read /opt/openhabian/docs/openhabian-DEBUG.md or **://github.com/openhab/openhabian/blob/main/docs/openhabian-DEBUG.md how to proceed.

I also went through the firstboot.log file to see if I could see anything obvious. There were some errors (shown below):

+ java_install 17
+ openhab_is_running
+ openhab_is_installed
+ openhab2_is_installed
++ dpkg -s openhab2
++ grep Status
++ cut '-d ’ -f2
+ [[ ‘’ =~ ^(install|hold)$ ]]
+ return 1
+ openhab3_is_installed
++ dpkg -s openhab
++ grep -E ‘^Version’
++ cut -d . -f1
++ cut -d ’ ’ -f2
+ [[ ‘’ = 3 ]]
+ return 1
+ openhab4_is_installed
++ dpkg -s openhab
++ grep -E ‘^Version’
++ cut -d . -f1
++ cut -d ’ ’ -f2
+ [[ ‘’ = 4 ]]

dpkg: error processing package ca-certificates-java (–configure):
** installed ca-certificates-java package post-installation script subprocess returned error exit status 1**
dpkg: dependency problems prevent configuration of openjdk-17-jre-headless:armhf:
** openjdk-17-jre-headless:armhf depends on ca-certificates-java (>= 20190405~); however:**
** Package ca-certificates-java is not configured yet.**

dpkg: error processing package openjdk-17-jre-headless:armhf (–configure):
** dependency problems - leaving unconfigured**
Processing triggers for libc-bin (2.31-13+rpt2+rpi1+deb11u5) …
Processing triggers for man-db (2.9.4-2) …
Processing triggers for ca-certificates (20210119) …
Updating certificates in /etc/ssl/certs…
0 added, 0 removed; done.
Running hooks in /etc/ca-certificates/update.d…

/etc/ca-certificates/update.d/jks-keystore: 82: java: not found
E: /etc/ca-certificates/update.d/jks-keystore exited with code 1.
done.
Errors were encountered while processing:
** ca-certificates-java**
** openjdk-17-jre-headless:armhf**
**Updating FireMotD available updates count … **
E: Sub-process /usr/bin/dpkg returned an error code (1)
+ return 100
+ echo FAILED
FAILED

+ apt-get update
**Hit:1 **://davesteele.github.io/comitup/repo comitup InRelease
**Err:2 *://deb.nodesource.com/node_18.x bullseye InRelease
** Certificate verification failed: The certificate is NOT trusted. The certificate chain uses not yet valid certificate. Could not handshake: Error in the certificate verification. [IP: 23.219.155.185 443]

**Get:3 **://archive.raspberrypi.org/debian bullseye InRelease [23.6 kB]
**Get:4 **://raspbian.raspberrypi.org/raspbian bullseye InRelease [15.0 kB]
**Hit:5 ***://openhab.jfrog.io/artifactory/openhab-linuxpkg stable InRelease
Reading package lists…
**E: Release file for **://raspbian.raspberrypi.org/raspbian/dists/bullseye/InRelease is not valid yet (invalid for another 94d 5h 42min 12s). Updates for this repository will not be applied.
**E: Release file for **://archive.raspberrypi.org/debian/dists/bullseye/InRelease is not valid yet (invalid for another 94d 1h 1min 27s). Updates for this repository will not be applied.
**E: Release file for **://openhab.jfrog.io/artifactory/openhab-linuxpkg/dists/stable/InRelease is not valid yet (invalid for another 76d 5h 1min 58s). Updates for this repository will not be applied.
+ return 100
+ echo ‘FAILED (update apt lists)’
FAILED (update apt lists)
+ return 1
+ import_openhab_config
+ local initialConfig=/boot/initial.zip
+ local restoreFile=/boot/initial.zip
+ [[ -n ‘’ ]]
++ timestamp
++ printf ‘%(%F_%T_%Z)T\n’ -1
+ echo -n '2023-05-13_12:42:49_CEST [openHABian] Getting initial openHAB configuration… ’
2023-05-13_12:42:49_CEST [openHABian] Getting initial openHAB configuration… + [[ /boot/initial.zip =~ http: ]]

+ [[ -n 1 ]]
+ [[ -f /boot/initial.zip ]]
+ echo ‘SKIPPED (backup not found at /boot/initial.zip)’
SKIPPED (backup not found at /boot/initial.zip)

e[90;01m$ sed -i -e s|^#.sshHost = 0.0.0.0.$|org.apache.karaf.shell:sshHost = 0.0.0.0|g /etc/openhab/services/runtime.cfg e[39;49;00m
+ sed -i -e ‘s|^#.sshHost = 0.0.0.0.$|org.apache.karaf.shell:sshHost = 0.0.0.0|g’ /etc/openhab/services/runtime.cfg
sed: can’t read /etc/openhab/services/runtime.cfg: No such file or directory
+ return 2
+ echo ‘FAILED (sshHost)’
FAILED (sshHost)
+ return 1

e[90;01m$ nodejs_setup e[39;49;00m
+ nodejs_setup
+ node_is_installed
++ command -v npm
+ [[ -x ‘’ ]]
+ return 1
+ local keyName=nodejs
+ local link=*://nodejs.org/dist/v18.16.1/node-v18.16.1-linux-armv7l.tar.xz
+ local myDistro
+ local temp
++ lsb_release -sc
+ myDistro=bullseye
+ [[ bullseye == \n/\a ]]
++ mktemp /tmp/openhabian.XXXXX
+ temp=/tmp/openhabian.hDg1U
+ [[ -z ‘’ ]]
+ is_armv6l
+ [[ ‘’ == \a\r\m\v\6\l ]]
+ case “$(uname -m)” in
++ uname -m
+ return 1
+ [[ -z ‘’ ]]
**+ add_keys ***://deb.nodesource.com/gpgkey/nodesource.gpg.key nodejs
+ local repoKey=/usr/share/keyrings/nodejs.gpg
++ timestamp
++ printf ‘%(%F_%T_%Z)T\n’ -1
+ echo -n '2023-05-13_12:44:20_CEST [openHABian] Adding required keys to apt… ’
**2023-05-13_12:44:20_CEST [openHABian] Adding required keys to apt… + curl -fsSL ***://deb.nodesource.com/gpgkey/nodesource.gpg.key
+ gpg --dearmor
curl: (60) SSL certificate problem: certificate is not yet valid
**More details here: ***://curl.se/docs/sslcerts.html

curl failed to verify the legitimacy of the server and therefore could not
establish a secure connection to it. To learn more about this situation and
how to fix it, please visit the web page mentioned above.
gpg: no valid OpenPGP data found.
+ echo FAILED
FAILED
+ rm -f /usr/share/keyrings/nodejs.gpg
+ return 1
+ return 1
+ return 1
+ echo FAILED
FAILED
+ return 1
+ custom_frontail_log add ‘’
+ local frontailService=/etc/systemd/system/frontail.service
+ local addLog
+ local removeLog
+ local array
+ [[ -f /etc/systemd/system/frontail.service ]]
+ whiptail --title ‘Frontail not installed’ --msgbox ‘Frontail is not installed!\n\nCanceling operation!’ 9 80
Failed to open terminal.

In the end, it says it installed successfully:
+ rm -f /opt/openHABian-install-inprogress
+ touch /opt/openHABian-install-successful
++ timestamp
++ printf ‘%(%F_%T_%Z)T\n’ -1
+ echo ‘2023-05-13_12:44:31_CEST [openHABian] Execution of ‘'‘openhabian-config unattended’'’ completed.’
2023-05-13_12:44:31_CEST [openHABian] Execution of ‘openhabian-config unattended’ completed.
++ timestamp
++ printf ‘%(%F_%T_%Z)T\n’ -1
+ echo ‘2023-05-13_12:44:31_CEST [openHABian] First time setup successfully finished. Rebooting your system!’
2023-05-13_12:44:31_CEST [openHABian] First time setup successfully finished. Rebooting your system!
++ timestamp
++ printf ‘%(%F_%T_%Z)T\n’ -1
**+ echo '2023-05-13_12:44:31_CEST [openHABian] After rebooting the openHAB dashboard will be available at: **://openhabian:8080’
**2023-05-13_12:44:31_CEST [openHABian] After rebooting the openHAB dashboard will be available at: **://openhabian:8080
++ timestamp
++ printf ‘%(%F_%T_%Z)T\n’ -1
+ echo ‘2023-05-13_12:44:31_CEST [openHABian] After rebooting to gain access to a console, simply reconnect using ssh.’
2023-05-13_12:44:31_CEST [openHABian] After rebooting to gain access to a console, simply reconnect using ssh.
+ sleep 12
++ command -v python3
+ [[ -x /usr/bin/python3 ]]
+ bash /boot/webserver.bash inst_done
+ sleep 12
++ command -v python3
+ [[ -x /usr/bin/python3 ]]
+ bash /boot/webserver.bash cleanup
+ running_in_docker
+ [[ -n ‘’ ]]
+ grep -qs ‘docker|lxc’ /proc/1/cgroup
+ [[ -f /.dockerenv ]]
+ return 1
+ reboot

Please use code fences when posting code or logs.

```
code goes here
```

The best I can offer is to review and follow the debugging and trouble shooting section of the openHABian docs. The URL is conveniently provided in the error log.

In particular, pay attention to how to generate debug logs from openHABian so more information can be gathered.

But in general, any errors during openHABian setup are cause for concern and need to be addressed.

I think everything depends on the certificate package at the moment.
But why is there a date of 2023-05-13 being shown in the boot.log ?

RPis have no real time clock. So before it syncs time from inet it has to think of something. I think it’s the kernel build time or some such.

1 Like