OpenHAB won't start after fresh installation on new Raspberry PI 5

  • Platform information:
    • Hardware: RaspberryPI 5 8GB
    • OS: Linux raspberry trixie
    • Java Runtime Environment: eclips V25
    • openHAB version: 5.2.3
  • Issue of the topic: OpenHab wont start after installation.

During the installation, i get the below errors.

[main] ERROR org.openhab.core.storage.json.internal.JsonStorage - Error writing JsonDB to /var/lib/openhab/jsondb/org.openhab.core.tools.UpgradeTool.json. Cause /var/lib/openhab/jsondb/org.openhab.core.tools.UpgradeTool.json (No such file or directory).
[OH-JsonStorage-1] ERROR org.openhab.core.storage.json.internal.JsonStorage - Error writing JsonDB to /var/lib/openhab/jsondb/org.openhab.core.tools.UpgradeTool.json. Cause /var/lib/openhab/jsondb/org.openhab.core.tools.UpgradeTool.json (No such file or directory).
[main] ERROR org.openhab.core.storage.json.internal.JsonStorage - Error writing JsonDB to /var/lib/openhab/jsondb/org.openhab.core.tools.ohVersion.json. Cause /var/lib/openhab/jsondb/org.openhab.core.tools.ohVersion.json (No such file or directory).
[OH-JsonStorage-2] ERROR org.openhab.core.storage.json.internal.JsonStorage - Error writing JsonDB to /var/lib/openhab/jsondb/org.openhab.core.tools.ohVersion.json. Cause /var/lib/openhab/jsondb/org.openhab.core.tools.ohVersion.json (No such file or directory).
chown: cannot access ‘/var/lib/openhab/jsondb’: No such file or directory
[openHAB] WARNING: internal database upgrade tool failed.
[openHAB] please check the openHAB website (www.openhab.org) for upgrade requirements.
[openHAB] openHAB was not running so will not start after upgrade.

Any idea how to fix this issue?

java -version
openjdk version “25.0.5” 2026-10-20 LTS
OpenJDK Runtime Environment Temurin-25.0.5+8 (build 25.0.5+8-LTS)
OpenJDK 64-Bit Server VM Temurin-25.0.5+8 (build 25.0.5+8-LTS, mixed mode, sharing)

sudo systemctl status openhab.service
openhab.service - openHAB - empowering the smart home
Loaded: loaded (/usr/lib/systemd/system/openhab.service; enabled; preset: enabled)
Active: activating (auto-restart) (Result: exit-code) since Sat 2026-10-24 15:55:44 CEST; 3s ago
Invocation: 9da349e6615144ad8927abdf9b84144b
Docs: Introduction | openHAB
https://community.openhab.org
Process: 55177 ExecStart=/usr/share/openhab/runtime/bin/karaf ${OPENHAB_STARTMODE} (code=exited, status=1/FAILURE)
Main PID: 55177 (code=exited, status=1/FAILURE)
CPU: 182ms

I tried to downgrade to Java V21. It seemed to fix the problem. I got OpenHAB up and running now.

Why don’t you use openHABian?

Because I need to run other software on the Raspberry too. When I tried OpenHABian last, I couldn’t get it to work, but it worked straight away on a standard Raspberry image, with the OpenHAB packages on top. So did it this time, when I finally got OpenHAB to run.

I just find it odd, that the only error messages I got was about the JsonStorage. There were no error messages about the wrong Java version. OpenHAB just didn’t start at all, and it didn’t really seemed like it tried to start, except for a few messages in the syslog, but they didn’t give any hint either.

You should have checked the prerequisits beforehand

That’s honestly a stupid argument for not having ANY error messages when using the wrong Java version. And for the record. I did check the prereq. I just missed the version number when I installed Java, as I wasn’t aware that the latest version of OpenHAB needs a Java version that is more than 3 years old. A version, which was replaced with a newer version more than 1 year ago.

Nah, that’s an as-stupid response. You cannot blame a software or install docs writer that they don’t prepare for/take precaution for you not reading the install instructions properly and comprehensively. If you had fulfilled the prerequisites, your issue wouldn’t have happened.
If you pick a hammer to drill a screw, it’s not the hammer’s fault when you fail and not the hammer’s vendor’s fault that it didn’t come with a warning saying you mustn’t use it to drill screws.

If you had used openHABian as recommended, it wouldn’t have happened either as it is taking care of ensuring prerequisites (including Java) and proper OS parametrization even without you reading the docs.
(And yes, you do can install and get any other software to work on top, it’s just genuine Debian OS and not the culprit when you failed to get your software to work).

Glad you got it running after switching to Java 21. For anyone hitting the same JsonStorage errors on a fresh install, checking that the Java version matches the version required for the openHAB release is a good first step before digging into the storage files. Thanks for posting the fix back here, since that makes the thread much easier for the next person to follow.

So it’s stupid to ask for error codes when something won’t start? This time it was wrong Java version, but it could have been 1000 other issues.

And for the OpenHABian. It’s been a while since I tried it last, but back then OpenHAB 3 was just released, and I got a ton of errors and missing or wrong packages versions when I tried to install the additional software. I got zero of these when I installed OpenHAB and the other software on a clean Raspberry image. On top of that was OpenHAB preconfigured in a way that I didn’t like and with a lot of stuff I didn’t need.

This seems like such an easy mistake to make. You install the current LTS version of Java, and openHAB just won’t run. It doesn’t even give an error that points you in the right direction. The only messages are vague and will sent you send you off chasing permissions problems.

Instead of helping, the replies here amount to “RTFM.” Technically correct, but not very useful to someone who has already lost hours on this.

Do you really want an even lower adoption rate for openHAB by being this unhelpful? A simple Java version check in the startup script, with a “openHAB requires Java 21, found 25” message, would prevent this…

For what it’s worth, I run openHAB in a Docker container and have never looked back at openHABian or the other install methods. I ran into (re)installation trouble before too, and with Docker it just runs.

@geeek, that might be worth a look, since you want to run other software on your machine as well. The container ships with the right Java version, so this problem can’t happen.

I’d second the docker suggestion. I have done some PRs and need that flexibility (for easy switching-especially with different java needs) for testing, so might not be a typical OHer. Docker only uses about 50MB of ram (I don’t use a manager, just docker-compose.yml).

Rpi3 1G 64-bit trixie light image, docker, usbipd - HTOP RAM 0.155G

Rpi4 2G 64-bit trixie light image, docker, containers OH-remote/test, ZW-JS - HTOP RAM 0.86G

Rpi5 4G 64-bit trixie light image, docker, containers OH, ZW-JS, MQTT, MySql- HTOP RAM 1.88G

I appreciate the idea with docker, but I think it will just complicate things, and even with docker, I wouldn’t go with OpenHABian, as I don’t like the preconfiguration that comes with it. It might not be true anymore, but it was when I tried it with OpenHAB 3, and I don’t see any reason to try OpenHABian with OpenHAB 5. I don’t know whether there are any preconfiguration in the docker container, but I don’t really see a reason to check it out. It works fine without, now that I’m using the right Java version.

Beside that. Part of the additional software was used to turn the Raspberry into a bridge, so that all my smarthome devices can be connected directly to it, without the need for an external switch. But with the Raspberry Trixie OS image, the bridge functionality is now part of the base OS, so I don’t need that additional software anymore. But I do still need the DHCP server, DNS server NTP server, local desktop with browser etc.

openHAB already does check for the Java version and does give a proper error message.
I’m fairly sure your issue wasn’t the Java version alone. If wrong Java had been properly installed, you would have gotten a proper warning in the log output hence a hint what to look for.
Installing is also about setting permissions and env variables properly and some more so when you got no output, the reason for that was something else.
Proper installation also requires, you name it, to read and meet the prerequisites and install instructions. So we’re back to you doing that wrong in the first place and you cannot blame openHAB for that.

We already do check for some of the most easily made mistakes. You however - speaking genericly - are asking for openHAB to check in advance for an infinite number of possible reasons for openHAB not starting. That cannot work out. openHAB devs cannot think of everything wrong a user might come up with.
Like you said yourself: it could have been 1000 other issues. We cannot think of and check against all of them. Besides, it’s an ever-moving target (Java, OS, and packages keep changing all day - we cannot keep up with testing against each and every of them).

The only workable way to cope with that is what openHAB is providing you with: it defines the prerequisites you have to match. It even provides you with a bundle that takes care of it for you.
If you’re unwilling to use it, that’s not openHAB’s fault.

On openHABian, if you take experiences from the time with openHAB 3 as a proof it doesn’t work for you today, that’s crazily wrong. That’s a software that dated out about 4 years ago. It has absolutely no relevance how it performed back then because so much has changed since so it’s totally wrong to believe it still has the same issues (if at all it had them back then. Not so far off to assume you already back then made some mistake installing it).
As mentioned on several occasions, openHABian is basically just scripts on top of standard Raspi OS so barely openHABian’s fault if some package your 3rd party sw wanted was missing - you could have added it - or if it’s wrong as a result of a problem with the base OS. Even Debian dependency mistakes happen at times.

Which is absolutely the right hint because openHAB cannot write to its logfile that is.
That’s unrelated to the Java version and the error you have to fix first.

The openHAB start script already does check that. @geeek’s error had a different reason, likely permissions of the logfile or path there. If fixed he would have seen the error about using the wrong java version.

There were no error messages at all when I tried to start OpenHAB after the initial installation, and there were no warnings or error messages during the installation that Java were missing or wrong version. In the Trixie syslog the only indications that OpenHAB was installed at all, where the constant attempt to start the service. I tried to reboot a couple of times, but in the end, the only changes were the downgrade of Java, and when I rebooted after installing the correct Java version, OpenHAB came up straight away.

As for OpenHABian. I already wrote that part of the reason why I don’t go down that route is that it came with preconfigured UI’s etc, which I don’t like, and I doubt that has changes. I’m old school and like config files. It’s much faster to setup in complex smart house installations like mine, and it’s easy to backup and move to new installations. I don’t really see any reason to change this approach. Dealing with the web UI configuration of pages is punishment enough. If you would do anything good, you would make it possible to write the pages as config files like things and items.

But I doubt we will ever agree, so lets agree to disagree and move on.

I don’t know how you come to think and claim that. openHABian is only the OS and has nothing to do with openHAB and its config.
It just reliably pre-installs the very same openHAB package that you installed manually.
It does not bring or create any openHAB config whatsoever, let alone any UI.

This you can already do in openHAB 5.2. Put them in the /etc/openhab/yaml dir.