The upgrade went just fine but now I can’t connect to my openHAB instance anymore.
It is not responding on HTTP port 8080, nor does it answer local SSH on port 8101.
If I do systemctl status openhab3, all I get in the log is this:
juil. 02 17:08:22 server systemd[1]: Started The openHAB 3 Home Automation Bus Solution.
and nothing after that, even if I leave it for 10 minutes.
I tried looking in /var/log/openhab3/openhab.log and /var/log/openhab3/events.log but there are no entries in there dated from after the update.
Where should I be looking for details? What can I try to solve the situation?
Thanks for the pointer, I had seen this thread but not quite this answer.
That being said, it does not help in my situation, I don’t have any message coming up at all.
I tried running this:
sudo -u openhab3 -g openhab3 /usr/share/openhab3/karaf_wrapper.sh debugs server
which gives this message on the console:
Listening for transport dt_socket at address: 5005
But apart from that nothing happens, no log, no listening on port 8080 or 8101 as it used to do with version 3.0.2
I’m not sure where the fault lies, I understand that “patching” the installation files to change the folders makes it fit in the ArchLinux ecosystem but it deviates from the original locations.
Ok, I download the zip archive and placed it inside /usr/src/openhab310.
Then, as indicated in the documentation, I started the following command line:
sudo su -s /bin/bash -c /usr/src/openhab310/runtime/bin/karaf openhab3
At first it gave me error messages but they got solved by exporting a valid value for JAVA_HOME
Now, I get the openHAB console and it answers on port 8080. Quite obviously though, all the configuration is lost.
I then tried to run the following similar command from the /usr/share/openhab3 folder as it is where the AUR package places the runtime folder
sudo su -s /bin/bash -c /usr/share/openhab3/runtime/bin/karaf openhab3
And while this starts a java process, it never displays the console nor does it answer on ports 8080 and 8101
I have tried using kdiff3 to compare the two architectures, but apart from folder name differences, I’m yet to find the culprit.
The lack of error messages does not help much here…
was your OH 3.0.2 installation provided by the same source ( Manjara Linux repository ) ?
the root cause then might be that the Manaja distro ( 3.1.0 ) looks into openhab3 folders while 3.0.2 looks into openhab folders
you could try to increase the debug level
wouldn’t it be a ( good ) alternative to use the original OH packages ?
Yes, I just did an update of the AUR package with trizen
I edited the log4j2.xml file inside the manual package userdata/etc and I could see lots of messages.
Doing the same in /var/lib/openhab3/etc led to no change at all in the outcome.
Well, sure, but how do I not lose the configuration I spent hours creating? Is it enough to store/retrieve the content of the jsondb folder? Or would it be better to backup the entire userdata folder?
which should be the one that is called from within openhab-cli.
This ( at least for OH3 that is provided by openhab.org ) creates a zip file containing all necessary files.
You can use 7z or another file that is able to read .zip files to check the content of the file ( it is a lowercase letter L ) :
7z l /path/to/backup-zip-file.zip
Most probably it used paths to openhab3 folders. So some finetunning would be required afterwards.
At least you should be able to use this file to restore the current status in case you would like to go back
did it help ?
userdata/etc and /var/lib/openhab3/etc would be the same in case OPENHAB_USERDATA is set to /var/lib/openhab3
Thanks for this, those details are very nice to have.
I thus created a backup, wiped clean the installation from the AUR package, redid the package installation, restored the backup and I’m back online.
Someone on the AUR package page added a comment saying they had to remove etc as well, so maybe that’s what I did by completely wiping the installation.