Web Interface Not Coming Up - iPhone app also can't find openHab install

  • Platform information:
    • Hardware: Pi 4
    • OS: OpenHabian
    • Java Runtime Environment: default for OpenHabian
    • openHAB version: Just downloaded
  • Issue of the topic: please be detailed explaining your issue

I’m using the latest version of openHab from an image for the Pi, on a Pi4. I put it in my Pi and started it up about 90-120 minutes ago. I know it can take time for oH to download updated packages and install and configure them, but from what I’ve read, that should be 20-45 minutes - however, lately, I’ve had download issues. I’ve restarted using sudo shutdown -r now and waited for an hour after it came back up. Still no web interface.

I can ssh in on the default “pi” user account. In /usr/share/openhab, there are no logs, but there is the addons directory.

  • What can I do to find out what oH is doing and whether it’s still setting things up or if it’s stuck or something went wrong?
  • I’ve seen posts and information that the default oH user (via ssh) is openhabian. I can confirm that because I see the directory /home/openhabian. I’ve seen a post or page that said the password was “habopen.” Others have said the password is “habianopen.” What is the password here?
  • Even though I see /homes/openhabian, when I try to su to the user openhabian, I get this error:
    su: user openhabian does not exist or the user entry does not contain all the required fields

I used Raspberry Pi Imager to put the image on an SD card I put into my Pi. Normally I specify my password for the default user pi. Is this a problem? Would OpenHabian normally have set openhabian as the default user and could this be why the web interface is not starting after so long?

According to administration-user during the installation of openhabian the user pi is renamed to use openhabian. As you still have the user pi I would assume that something went wrong.

According to did-my-installation-succeed-what-to-do-in-case-of-a-problem you should find /boot/first-boot.log. This already may give a hint with regard to the root cause.

Does the user openhabian exist ? You can do that with

grep openhabian /etc/passwd

If the user exists you will see the current entry in the passwd file. If it does not exist an empty row will be returned.

I’m looking through both links now, but have to set it aside for a few hours for some other work.

But I think this is worth noting: I’ve tried setup several times - image one, while waiting for the other to start, do another, just in case. When I put a new image in and start the Pi, I have a monitor on and keyboard attached. I’m using Raspberry Pi Imager to write the images. When I modify the settings in Imager to create a password for the user pi, I find that it boots up. (I can’t remember if it automatically logs that user in or not.) If I don’t specify the user pi and a password, then when it boots, on the monitor, it asks me for my keyboard info and to specify a username (I use pi) and a password, then logs me in.

I’m wondering, since oH is designed to be run headless, if that’s the issue - that I do ANYTHING with the user. But, on the other hand, when Debian (isn’t OpenHabian based on Debian?) asks for setup info, I don’t know if other services are already running and if oH can continue with that prompt showing. (I suspect this isn’t an issue. I’m just mentioning it in case it becomes an issue later.)

While openhabian shows up as a directory in /home, it does not show in /etc/passwd. (I made an assumption - if the directory is there, I assumed the user was fully created.)

My guess is that the thing to do now is to use a clean image and boot and just step away from the keyboard and give it time to see what it does if I don’t mess with the user info. I can give it time and, after 10-20 minutes (the user should be created by then), see if I can ssh under openhab in to see what’s going on.

Here’s /boot/first-boot.log, at the bottom of the post. A number of items failed. I’m wondering if that could be because I messed with the user pi and it didn’t get to change it to openhab.

I’m going to take a fresh image and put it in to boot while I have to go fix a lock at the office. That’ll take a few hours and that should allow enough time, if it’s working properly (and if I don’t interfere) for the web interface to be up and running.

2022-04-04_15:41:56_BST [openHABian] Starting the openHABian initial setup.
2022-04-04_15:41:56_BST [openHABian] Storing configuration... OK
2022-04-04_15:41:57_BST [openHABian] Starting webserver with installation log... OK
2022-09-07_18:00:10_BST [openHABian] Changing default username and password... OK
2022-09-07_18:00:10_BST [openHABian] Setting up Ethernet connection... OK
2022-09-07_18:00:11_BST [openHABian] Ensuring network connectivity... OK
2022-09-07_18:00:11_BST [openHABian] Waiting for dpkg/apt to get ready... OK
2022-09-07_18:00:18_BST [openHABian] Updating repositories and upgrading installed packages... OK
2022-09-07_18:00:42_BST [openHABian] Installing git package... FAILED
2022-09-07_18:00:43_BST [openHABian] Updating myself from https://github.com/openhab/openhabian, openHAB3 branch... OK
2022-09-07_18:00:43_BST [openHABian] Starting execution of 'openhabian-config unattended'... OK
2022-09-07_18:00:43_BST [openHABian] Checking for root privileges... OK
2022-09-07_18:00:45_BST [openHABian] Updating Linux package information... \ ESC[2D| ESC[2D/ ESC[2D- ESC[2D\ ESC[2D| ESC[2D/ ESC[2D- ESC[2D\ ESC[2DOK
2022-09-07_18:00:50_BST [openHABian] Loading configuration file '/etc/openhabian.conf'... OK
2022-09-07_18:00:50_BST [openHABian] Adjusting swap size to 7588 MB... OK (reboot required)
2022-09-07_18:00:50_BST [openHABian] Setting timezone based on openhabian.conf... OK (Europe/Berlin)
2022-09-07_19:00:50_CEST [openHABian] Enabling time synchronization using NTP... OK
2022-09-07_19:00:50_CEST [openHABian] Setting locale based on openhabian.conf... FAILED (reconfigure locales)
2022-09-07_19:01:10_CEST [openHABian] Setting hostname of the base system based on openhabian.conf... OK
2022-09-07_19:01:10_CEST [openHABian] Setting the GPU memory split down to 16MB for headless system... OK
2022-09-07_19:01:10_CEST [openHABian] Enabling Audio output... OK
2022-09-07_19:01:10_CEST [openHABian] Installing basic can't-be-wrong packages (screen, vim, ...)... FAILED (remove raspi-config)
2022-09-07_19:01:11_CEST [openHABian] Installing additional needed packages... FAILED
2022-09-07_19:01:13_CEST [openHABian] Adding slightly tuned bash configuration files to system... OK
2022-09-07_19:01:13_CEST [openHABian] Adding slightly tuned vim configuration file to system... OK
2022-09-07_19:01:13_CEST [openHABian] tailscale VPN installation... SKIPPED (no preauthkey defined)
2022-09-07_19:01:13_CEST [openHABian] Applying miscellaneous system settings... OK
2022-09-07_19:01:13_CEST [openHABian] Installing FireMotD required packages (bc, sysstat, jq, moreutils)... FAILED
2022-09-07_19:01:14_CEST [openHABian] Fetching OpenJDK 11... FAILED
2022-09-07_19:01:16_CEST [openHABian] Installing OpenJDK 11... FAILED
2022-09-07_19:01:17_CEST [openHABian] Beginning install of latest openhab release (stable)... OK
2022-09-07_19:01:17_CEST [openHABian] Adding required keys to apt... OK
2022-09-07_19:01:18_CEST [openHABian] Installing selected openHAB3 version... FAILED
2022-09-07_19:01:23_CEST [openHABian] Getting initial openHAB configuration... SKIPPED (backup not found at /boot/initial.zip)
2022-09-07_19:01:23_CEST [openHABian] Activating the openHAB console on all interfaces... FAILED (sshHost)
2022-09-07_19:01:23_CEST [openHABian] Adding openHAB syntax to vim editor... OK
2022-09-07_19:01:25_CEST [openHABian] Adding openHAB syntax to nano editor... OK
2022-09-07_19:01:26_CEST [openHABian] Adding openHAB scheme to multitail... FAILED (remove default configuration)
2022-09-07_19:01:26_CEST [openHABian] Preparing openHAB folder mounts under '/srv/openhab-*'... OK
2022-09-07_19:01:29_CEST [openHABian] Installing Samba... FAILED
2022-09-07_19:01:30_CEST [openHABian] Installing Frontail prerequsites (NodeJS)... FAILED
Failed to open terminal.ESC[1;24rESC[4lESC)0ESC[m^OESC[37mESC[40mESC[1;24rESC[HESC[JESC[1;1HESC[35mESC[K

There is a list of packages that couldn’t be installed - at the end OH was not installed either.
Could be a problem with your network connection.

Follow the troubleshooting instructions .

EDIT: Adding one point that seems contradictory but important: /opt/openHABian-install-successful does exist on the unit, even with the logs as presented below. From my understanding of how this works, it seems to me the next step is to delete that file and restart or run /opt/openhabian/openhabian-setup.sh and see if it works when going through this a 2nd time.

This is frustrating. Yes, could be network issues. We’re in a rural area and have had some really bad connection issues in the past. Currently we’re using Starlink, which is pretty good, but it’s satellite. So even if it’s LEO and most often a great connection, last night when I was working, AFTER I had started the install, we had a really heavy storm that cut off service for a while. I gave up and went to bed, but I figured anything it tried to download during that storm would fail. I restarted the system this morning, but I don’t know how good the setup is about starting a 2nd time and recovering from the original set of failures. (I would think it would have to be rather fault tolerant and would restart, see it’s not all set up and do it all again, but I don’t know.)

I put a clean image in and started it, then walked away. While I wasn’t away as long as I thought, I still gave it a good length of time to get going. When I came back, on the monitor was still the configuration screen for the keyboard. (It would ask for the keyboard ID info, then for me to give it a username and tell it what to use as a password.) I see NO status info on the web page where I’m supposed to be able to get to it. Checked and Apache isn’t running. (I’m guessing that’s what oH uses, since, on my other, working oH system, it has Apache running.) The /boot/first-boot.log looks about the same.

I’m going to go through the troubleshooting instructions now and see what’s up. I know the Pi is connected to the LAN, because I can get to it and I know this afternoon we’ve had a good external internet connection, so I’m wondering if there’s another issue. The logs here look about the same, but here’s the current log:

2022-04-04_15:41:56_BST [openHABian] Starting the openHABian initial setup.
2022-04-04_15:41:57_BST [openHABian] Storing configuration... OK
2022-04-04_15:41:58_BST [openHABian] Starting webserver with installation log... OK
2022-09-07_19:46:24_BST [openHABian] Changing default username and password... OK
2022-09-07_19:46:26_BST [openHABian] Setting up Ethernet connection... OK
2022-09-07_19:46:26_BST [openHABian] Ensuring network connectivity... OK
2022-09-07_19:46:26_BST [openHABian] Waiting for dpkg/apt to get ready... OK
2022-09-07_19:46:33_BST [openHABian] Updating repositories and upgrading installed packages... OK
2022-09-07_19:46:58_BST [openHABian] Installing git package... FAILED
2022-09-07_19:46:59_BST [openHABian] Updating myself from https://github.com/openhab/openhabian, openHAB3 branch... OK
2022-09-07_19:46:59_BST [openHABian] Starting execution of 'openhabian-config unattended'... OK
2022-09-07_19:46:59_BST [openHABian] Checking for root privileges... OK
2022-09-07_19:47:00_BST [openHABian] Updating Linux package information... \ ESC[2D| ESC[2D/ ESC[2D- ESC[2D\ ESC[2D| ESC[2D/ ESC[2D- ESC[2D\ ESC[2D| ESC[2D/ ESC[2DOK
2022-09-07_19:47:06_BST [openHABian] Loading configuration file '/etc/openhabian.conf'... OK
2022-09-07_19:47:06_BST [openHABian] Adjusting swap size to 7588 MB... OK (reboot required)
2022-09-07_19:47:06_BST [openHABian] Setting timezone based on openhabian.conf... OK (Europe/Berlin)
2022-09-07_20:47:06_CEST [openHABian] Enabling time synchronization using NTP... OK
2022-09-07_20:47:06_CEST [openHABian] Setting locale based on openhabian.conf... FAILED (reconfigure locales)
2022-09-07_20:47:26_CEST [openHABian] Setting hostname of the base system based on openhabian.conf... OK
2022-09-07_20:47:26_CEST [openHABian] Setting the GPU memory split down to 16MB for headless system... OK
2022-09-07_20:47:27_CEST [openHABian] Enabling Audio output... OK
2022-09-07_20:47:27_CEST [openHABian] Installing basic can't-be-wrong packages (screen, vim, ...)... FAILED (remove raspi-config)
2022-09-07_20:47:28_CEST [openHABian] Installing additional needed packages... FAILED
2022-09-07_20:47:30_CEST [openHABian] Adding slightly tuned bash configuration files to system... OK
2022-09-07_20:47:30_CEST [openHABian] Adding slightly tuned vim configuration file to system... OK
2022-09-07_20:47:30_CEST [openHABian] tailscale VPN installation... SKIPPED (no preauthkey defined)
2022-09-07_20:47:30_CEST [openHABian] Applying miscellaneous system settings... OK
2022-09-07_20:47:30_CEST [openHABian] Installing FireMotD required packages (bc, sysstat, jq, moreutils)... FAILED
2022-09-07_20:47:34_CEST [openHABian] Fetching OpenJDK 11... FAILED
2022-09-07_20:47:35_CEST [openHABian] Installing OpenJDK 11... FAILED
2022-09-07_20:47:36_CEST [openHABian] Beginning install of latest openhab release (stable)... OK
2022-09-07_20:47:36_CEST [openHABian] Adding required keys to apt... OK
2022-09-07_20:47:37_CEST [openHABian] Installing selected openHAB3 version... FAILED
2022-09-07_20:47:42_CEST [openHABian] Getting initial openHAB configuration... SKIPPED (backup not found at /boot/initial.zip)
2022-09-07_20:47:42_CEST [openHABian] Activating the openHAB console on all interfaces... FAILED (sshHost)
2022-09-07_20:47:42_CEST [openHABian] Adding openHAB syntax to vim editor... OK
2022-09-07_20:47:44_CEST [openHABian] Adding openHAB syntax to nano editor... OK
2022-09-07_20:47:46_CEST [openHABian] Adding openHAB scheme to multitail... FAILED (remove default configuration)
2022-09-07_20:47:46_CEST [openHABian] Preparing openHAB folder mounts under '/srv/openhab-*'... OK
2022-09-07_20:47:49_CEST [openHABian] Installing Samba... FAILED
2022-09-07_20:47:51_CEST [openHABian] Installing Frontail prerequsites (NodeJS)... FAILED
Failed to open terminal.

No. apache is not required for the basic installation.
OH is based, build on java. There should be a running java process once OH is started.
As it looks like JDK is not installed I would assume that OH cannot be started.
The debug guide explains how to set debugging to a higher level. This will generate an output that shows more about root causes for the individual failing steps.

Yes, I’m going to have to do that. I deleted the “finished” file and ran the setup and it didn’t complete. I’m getting the same results every time I try. I’ve made several images now without changing anything in Raspberry Pi Imager and all of them do the same thing. It’s a normal Pi 4, which was running Home Assistant previously.

Frustratingly, today was supposed to be a day I could focus on this and a few other computer issues. Instead it got assimilated by dealing with maintenance stuff for our new business. So it’ll take a few days to go through debugging. (Plus I’ll have to work on a Pi3 for a while, since I need to get Home Assistant back up and running on that Pi4.) I’ll report what I find and any solution.

What’s puzzling is this is happening with EVERY new image I write! That makes it sound like it’s an external issue, so I’m wondering if I’m having connection issues I didn’t know about.

My one current question: What does oH use, during install to update the system and install packages? Just apt? or apt-get? In the past I’ve been told that there’s a difference in which command is used, but I think that was back when aptitude was still part of the system. Since installing packages is always a problem, I want to test using exactly the same method the oH setup is using.

What follows are details. Just documenting what’s going on. A lot of this does not make sense to me and makes me wonder what crazy thing I’m doing to get something like this.

I have now done this with multiple images. I downloaded a new oH Raspberry Pi image, which was the same version of the one I was using. I made sure I made no changes in Imager before writing it to my SD card. Then I put it in and booted the Pi.

I get the same behavior every single time and on my Pi 4 as well as a Pi 3 I started testing on. While I haven’t checked line by line, the /boot/first-boot.log file seems to be the same from system to system.

I’ve changed the debug level to maximum and rebooted and the log was the same - and when I checked the config file the debug level wa set back to off. And every time, the file in /opt to signal a complete install has been created. This makes no sense. While I don’t know the oH system, something is going on here that makes no sense.

In the past I’ve used a USB memory stick as the main drive on a Pi and on this, I’m using an SD card. I’m wondering if that could have anything to do with the issue. (I doubt it, but I’m wonderinging.) I thought maybe I could set the debug level before the first boot so, on one try, I used a Linux system to read the SD card after I put an image on it, but /etc/openhabian.conf didn’t exist yet on that system.

I’m getting the same thing over and over. I did try, on one failed attempt, to use apt to install git and got error messages. Then I had to use the failed install switch - sorry, I had it copied and lost it. That fixed things and after that apt worked, so I tried to reboot and, even with debug=maximum, I get the same first-boot.log as always. It doesn’t change.

So I’m finding that, on each attempt:

  • It fails to install packages
  • Even with the failures, it creates the file in /opt to say it completed the install.
  • I delete the “completed” file and create the failed file, change debug to maximum and restart
  • After that restart (well, reboot), I get the SAME things in first-boot.log. No extra details.

I’m wondering - my ISP uses CGNAT. Could that be part of the issue? If so, it’s something that should be looked into, since it’s Starlink and more and more people will be using it.

apt-get is being used in openhabian-config.
You can go to /opt/openhabian/functions directory. There you find all the scripts that are being used.

Have you tried to set debug level right after writing the image as described in openHABian | openHAB ?

If all this fails you may try to install Raspberry Pi OS Lite from https://www.raspberrypi.com/software/operating-systems/. Once it is instaled install openhabian-config from git.

I missed that. Sorry - trying to comb through all this and I guess I miss a thing or two. I did try changing it after writing the image by looking for /etc/openhabian.conf, but it wasn’t there. Good to have instructions to use. I’ll try again.

oH doesn’t do anything unusual with internet access, right? It’s just using apt-get and pulling down packages or connecting with a website, isn’t it? So if I’m on an ISP that uses CGNAT, it shouldn’t be an issue, should it?

I hate to ask this, but since I’m seeing the same things and this is a newer image, is it possible that, in the past month, others have been having issues and there’s a glitch in the RPi image? I doubt it, but figure I might as well ask.

@Wolfgang_S : I started a new topic to include everything I’ve worked out at this point. While I kept doing this over and over and, at some point, was confusing what I had done on different install attempts, I did take a break and go through it again, noting what I did. Since I set up a system a few months ago, I’m convinced that one of the following is happening:

  1. The new oH image for Pis has glitches. (I need to find an older one and install it to see how it works.)
  2. My new ISP uses CGNAT and maybe that’s creating a problem.
  3. The new firewall I added with my new ISP might be an issue. But I’ve been on the new ISP with the new firewall for a while and not one device has had issues. The only thing I can’t do now that I could before is to reach my LAN from outside because of the CGNAT situation.

I can screw up, but I don’t see how it can be something I’m doing, since, a number of times, I’ve just written the image, put it in the Pi, and booted to see what happened.

for all of them the highest debug level should help as it provides more information about the failing reason.
OH / openhabian doesn’t do any unusual with internet access.
highest debug level prints out the commands that are being executed while openhabian-config commands are executed. You also can review the content of these scripts.

I have it working now - got a suggestion that helped in the thread I linked to.

It turns out that the docs referenced openhabian.conf, but didn’t specify the directory. I found that file in 2 places - but not in /boot, and that’s the instance where it should be edited.

But the big issue was the keyboard. I’ve been working with headless systems since 2005 or before - well before the RPi. Whenever a device had a video and keyboard connection, I’d plug them in to watch setup and so I could check on a few things when it finished. (Like finding the IP address, maybe turning on ssh, checking the file structure to be sure things were where they should be - stuff like that.) So it’s a 17 year habit to check or monitor a setup like that even on a headless system.

It turns out, with openHABian, if the keyboard is connected, it messes up the install. Even more, I use a wireless keyboard/mouse combo. They connect to a USB dongle. If I have the keyboard off (and I turn it off when I’m not actually using it), then it’s always been undetected. But even off, the USB dongle was recognized as a keyboard during setup!

Once I pulled out the dongle, it worked fine. That was a test system and, yes, the debug level was quite detailed! So once that one came up, I took an image on an SD card and put it in the Pi already hooked up to an Insteon and Z-Wave controller so I can replace my old Home Assistant system.

1 Like