Rpi 3 and OpenHAB install. Not successful

Hello all,

I wanted to see what this openHAB is all about. So I searched “openHAB download” on google which took me to the download site on openhab_org. I have downloaded the 32 bit version for the Rpi 3 and I installed it onto a 64GB sd card. I used the Rpi tool to burn the image onto the card.
Everything was a succes. But the installation is a total mess. The webinterface doesn’t work. I reinstalled openhab (sudo apt-get reinstall openhab), which gave me a prompt to install Java 11. So I also installed Java 11. Now it’s still not working:
systemctl status openhab
● openhab.service - openHAB - empowering the smart home
Loaded: loaded (/lib/systemd/system/openhab.service; enabled; vendor preset: enabled)
Active: activating (auto-restart) (Result: exit-code) since Fri 2022-11-18 20:35:16 CET; 1s ago
Docs: Introduction | openHAB
https://community_openhab_org
Process: 11406 ExecStart=/usr/share/openhab/runtime/bin/karaf ${OPENHAB_STARTMODE} (code=exited, status=255/EXCEPTION)
Main PID: 11406 (code=exited, status=255/EXCEPTION)
CPU: 15.963s

What is going on? Why does the install not work right after I burned the image? I successfully installed openHAB 2 before on this unit. Should I return to OpenHAB 2?
I own a Loxone at the moment, but I want to make my own hardware for openHAB. I don’t understand what goes wrong with the software, but I am a hardware design engineer. I have basic knowledge of linux (apt-get, etc).
I want to make MQTT devices. 1 device for 32 digital inputs (for hall sensors doors and windows) and 1 device for 16 SSR outputs. But first I want to get this openhab working. Communicate with the Tuya lamp first and experiment with some inputs.
But first I have to get openHAB working…Please help.
The webinterface doesn’t work also (#OPENHAB_HTTP_PORT=8080).
When the system asks to change the username for the first time, the system doesn’t accept that other name, so I cancelled that first username change. Second time I can change the username. It’s a total mess.
Sorry, but openHAB 2 install was MUCH easier.

Kind regards,
Mark

What is content of /var/log/openhab/openhab.log ?
What is output of sudo journalctl -u openhab ?

Nov 18 20:02:00 openhabian systemd[1]: Started openHAB - empowering the smart home.
Nov 18 20:02:00 openhabian karaf[1106]: mkdir: cannot create directory ‘/var/lib/openhab/tmp’: Permission denied
Nov 18 20:02:00 openhabian karaf[1093]: java command not found
Nov 18 20:02:00 openhabian systemd[1]: openhab.service: Main process exited, code=exited, status=1/FAILURE
Nov 18 20:02:00 openhabian systemd[1]: openhab.service: Failed with result ‘exit-code’.
Nov 18 20:02:05 openhabian systemd[1]: openhab.service: Scheduled restart job, restart counter is at 1.
Nov 18 20:02:05 openhabian systemd[1]: Stopped openHAB - empowering the smart home.
Nov 18 20:02:06 openhabian systemd[1]: Started openHAB - empowering the smart home.
Nov 18 20:02:06 openhabian karaf[1124]: mkdir: cannot create directory ‘/var/lib/openhab/tmp’: Permission denied
Nov 18 20:02:06 openhabian karaf[1111]: java command not found
Nov 18 20:02:06 openhabian systemd[1]: openhab.service: Main process exited, code=exited, status=1/FAILURE
Nov 18 20:02:06 openhabian systemd[1]: openhab.service: Failed with result ‘exit-code’.
Nov 18 20:02:11 openhabian systemd[1]: openhab.service: Scheduled restart job, restart counter is at 2.
Nov 18 20:02:11 openhabian systemd[1]: Stopped openHAB - empowering the smart home.
Nov 18 20:02:11 openhabian systemd[1]: Started openHAB - empowering the smart home.
Nov 18 20:02:11 openhabian karaf[1141]: mkdir: cannot create directory ‘/var/lib/openhab/tmp’: Permission denied
Nov 18 20:02:11 openhabian karaf[1128]: java command not found
Nov 18 20:02:11 openhabian systemd[1]: openhab.service: Main process exited, code=exited, status=1/FAILURE
Nov 18 20:02:11 openhabian systemd[1]: openhab.service: Failed with result ‘exit-code’.
Nov 18 20:02:16 openhabian systemd[1]: openhab.service: Scheduled restart job, restart counter is at 3.
Nov 18 20:02:16 openhabian systemd[1]: Stopped openHAB - empowering the smart home.
Nov 18 20:02:16 openhabian systemd[1]: Started openHAB - empowering the smart home.

I just want to burn an image that works. Asks for a new username and gives access to http://openhabian.local:8080

Permission of the directory tree

seems to be wrong.
Check it

Impossible to say with the current information. openHABian | openHAB has a pretty extensive trouble shooting section for what to do to collect logs and figure out what went wrong when something does go wrong. The way the image works is it starts with a stock Raspberry Pi OS and then installs and configures everything on that first boot. There’s a lot that can go wrong. without those logs :person_shrugging: .

But if you had to reinstall openHAB and it needed to install Java 11, your original assertion that everything was a success can not be true. If it was successful, Java 11 would have been installed. But the logs would tell us for sure.

What’s asking for the username? Cancelled how?

The first time you see pi. I typed a new name. It’s not accepted. Done this over and over again. In the bottom you see cancel.
After this cancel you see the enter new username again. This time you see not pi, but the field is already empty. I enter the new username and it is successful.

only ~.

What exactly did you download? openHAB or openHABian? It sounds like you are describing a standard Raspberry Pi OS install and not openHABian. openHABian creates an openhabian user be default. I don’t think it asks for a login user.

It is very unclear what you’ve installed and what you’ve done. We need more details and specifics.

It also points to the debug guide. Check that out.

As Rich said, can be anything we can’t tell without seeing the log so provide that please.
Anything else would be a solution approach based on wild random guessing, which is an extremely inefficient undertaking I won’t take part in.

You shouldn’t be asked to enter anything. But apparently you have not carefully read the installation instructions: they tell you must not attach any keyboard. So try again without one.

openhabian-pi-raspios32-202208151955-gitbe9d23e-crc075defd9.img.xz and I used the Raspberry pi imager to write the image to the SD card

I got this from download. Latest openHABian System Image. got the latest version

What is

normal permissions look like

ls -ld /var/lib/openhab/ /var/lib/openhab/tmp/
drwxrwxr-x 17 openhab openhab 4096 Aug  6 22:20 /var/lib/openhab/
drwxr-xr-x  8 openhab openhab 4096 Nov 15 19:55 /var/lib/openhab/tmp/

first I want to try to flash the correct image again. The image I burned doesn’t work at all.

OK, now we know you are dealing with openHABian, did you let it run with the keyboard attached? If so, try without. Either way, follow the debug and troubleshooting steps in the docs (well, follow all the instructions in the docs really, pay attention to details like not attaching a keyboard) to gather the logs so we can figure out what’s failing if it fails again.

@Wolfgang_S, based on the information gathered thus far, I think the only way to get to a sane state will be to try again fresh. Anything else will be playing wack-a-mole with no guarantee to ever get to a working state.

I will try some older versions. v1.6 for instance. I can use apt-get update and upgrade afterwards

Don’t, that’s a waste of time. Listen to and follow Rich’s advice.

On one recent install I followed the user ID creation prompts presented on the monitor and it seemed to cause issues with the install. Ignore the prompts and wait until you can do the inital config through the web interface. Or similarly just try doing the install headless. ie. reflash the sd card and start up the pi but don’t do any configuration through the pi direct (keyboard monitor). Wait until it joins your network and then look for :8080 and work through the config through the web gui first. Once this is done then ssh into the pi directly and do your additional setup through the openhabian-config utility.

Cheers