xefil
(X3fil)
June 12, 2018, 10:27am
1
Platform information:
Hardware: armv7l/1G/16GB SD
OS: Armbian Debian GNU/Linux 9 (stretch)
Java Runtime Environment: openjdk version “1.8.0_152”
openHAB version: 2.3.0-1
Hello to all,
After updating my little linux box, OenHAB stopped to work.
If I try to start it in debug:
root@oh:/usr/share/openhab2# ./start_debug.sh
Launching the openHAB runtime...
Listening for transport dt_socket at address: 5005
No other logs are generated.
The process is there:
# ps -edaf | grep openhab
root 3457 3338 2 12:18 pts/2 00:00:10 /usr/bin/java -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005 -Dopenhab.home=/usr/share/openhab2 -Dopenhab.conf=/etc/openhab2 -Dopenhab.runtime=/usr/share/openhab2/runtime -Dopenhab.userdata=/var/lib/openhab2 -Dopenhab.logdir=/var/log/openhab2 -Dfelix.cm.dir=/var/lib/openhab2/config -Djetty.host=0.0.0.0 -Djetty.http.compliance=RFC2616 -Dorg.ops4j.pax.web.listening.addresses=0.0.0.0 -Dorg.osgi.service.http.port=8080 -Dorg.osgi.service.http.port.secure=8443 -Djava.awt.headless=true -Djava.endorsed.dirs=/usr/lib/jvm/zulu-embedded-8-armhf/jre/lib/endorsed:/usr/lib/jvm/zulu-embedded-8-armhf/lib/endorsed:/usr/share/openhab2/runtime/lib/endorsed -Djava.ext.dirs=/usr/lib/jvm/zulu-embedded-8-armhf/jre/lib/ext:/usr/lib/jvm/zulu-embedded-8-armhf/lib/ext:/usr/share/openhab2/runtime/lib/ext -Dkaraf.instances=/var/lib/openhab2/tmp/instances -Dkaraf.home=/usr/share/openhab2/runtime -Dkaraf.base=/var/lib/openhab2 -Dkaraf.data=/var/lib/openhab2 -Dkaraf.etc=/var/lib/openhab2/etc -Dkaraf.logs=/var/log/openhab2 -Dkaraf.restart.jvm.supported=true -Djava.io.tmpdir=/var/lib/openhab2/tmp -Djava.util.logging.config.file=/var/lib/openhab2/etc/java.util.logging.properties -Dkaraf.startLocalConsole=true -Dkaraf.startRemoteShell=true -classpath /usr/share/openhab2/runtime/lib/boot/org.apache.karaf.diagnostic.boot-4.1.5.jar:/usr/share/openhab2/runtime/lib/boot/org.apache.karaf.jaas.boot-4.1.5.jar:/usr/share/openhab2/runtime/lib/boot/org.apache.karaf.main-4.1.5.jar:/usr/share/openhab2/runtime/lib/boot/org.osgi.core-6.0.0.jar org.apache.karaf.main.Main
root 3553 2033 0 12:25 pts/1 00:00:00 grep openhab
What could I check?
Thanks,
Simon
Which version did you come from?
xefil
(X3fil)
June 13, 2018, 8:17am
3
Hello @Udo_Hartmann !
Previous version was 2.2.
Strange is, no logs at all. So I have no idea how/where to start with.
Thanks, Simon
rlkoshak
(Rich Koshak)
June 13, 2018, 5:12pm
4
Check th permissions on /var/log/openhab2 and make sure the openhab user has permission to write to that folder. I think OH will still come up as the openhab user when using start_debug.sh.
Hmm…
My first idea was this Openhabian no logs issue, but as you came from OH2.2…
I would recommend to do
sudo apt remove openhab2
sudo apt install openhab2
(Maybe backup your config first just in case…)
xefil
(X3fil)
June 14, 2018, 8:31am
6
@rlkoshak permissions are ok.
I’ve deleted the openhab log, restarted, and an empty openhab.log
is created.
@Udo_Hartmann , I’ll try to remove OH2 and reinstall.
Of course, I’ll make a OH backup following the doc/thread here:
1. Intro
This tutorial is based on an apt-get installation of OH2 in Linux and is for advanced/manual configuration of OpenHab 2 and for troubleshooting purposes. The normal way of working with OpenHab 2 configurations is via the Paper UI and the config files in /etc/openhab2.
2. Basics
OpenHab 2 is based on the Eclipse SmartHome framework and is fully written in Java. It uses the Apache Karaf (a lightweight and modular container, powered by OSGi) to store many information, including all t…
Note: The information in this post is old, as of version 2.2.0 (and it’s snapshots) openHAB is now distributed with backup and restore scripts! See here for more details.
openHAB 2.x currently has two different ways of setting up things: Either through textual configuration or through the user interface which saves to a “jsonDB” database. If you’re looking to backup openHAB then you should look to backing up both the textual configuration files and the database folders.
Locations
I will be ta…
I’ll let you know!
Simon
xefil
(X3fil)
June 14, 2018, 11:28am
7
Hello,
I’ve made a backup, removed packages and cleaned the installation (–purge), then installed again.
Restore of the configuration, now seems to work correctly
Thanks!!
Simon
didder26
(Thomas)
June 15, 2018, 5:54am
8
Hello everyone,
My platform information:
Hardware: Raspberry PI 3
OS: Raspbian (stretch)
openHAB version: 2.3.0-1
Yesterday I updated my OH2 via apt from version 2.2 --> 2.3
sudo apt update
sudo apt upgrade
After that I got the same problem. OH2 does not come up after restarting the service or reboot the PI3. There are no logs written to
/var/log/openhab2/openhab2.log
The service itself seems to run. I checked that with
sudo systemctl status openhab2.services
I also can log in into the karaf console. So it is running…?
What I did then:
I made a backup as described by @xefil . (./usr/share/openhab2/runtime/bin/backup)
Removed openhab2 via apt remove openhab2 and apt purge openhab2
Then reinstalled OH2 via apt install openhab2
Check wether I can reach PaperUI on the new installation… Works fine!
Restore the backup
But after that procedure the behaviour was the same again as I described above.
No reachable OH2
No logs in …/openhab2.log
Are there any new ideas?
What can I do?
Thanks,
Thomas
xefil
(X3fil)
June 15, 2018, 8:37am
9
Hello @didder26 ,
Have you backed-up only those two folders?
cp -arv /etc/openhab2 /backup/...
cp -arv /var/lib/openhab2 /backup/...
Seems like something from the old config (program files?) is stopping the startup process.
Maybe someone could suggest you which files from var-lib-openhab could be skipped from backup which could cause some conflicts… I dunno :-/
Johan_F
(Johan F)
June 15, 2018, 11:42am
10
I have had this problem several times and for me it has allways been the same thing:
I have openhab run by root by changing this file:
/usr/lib/systemd/system/openhab2.service
After an upgrade the file is restored to the original settings and the system cannot write to the nessecary files any more… I dont know if its the same for you, but I would guess something with file permissions…
xefil
(X3fil)
June 15, 2018, 2:12pm
11
Thanks @Johan_F , good to know for the next time (hope isn’t needed anyway )
Cheers, Simon
didder26
(Thomas)
June 15, 2018, 6:33pm
12
Thanks for your support
@xefil I used the Backup and Restore Script from OH2 described here to backup and restore my config. I have to take a look in that generated zip first.
@Johan_F Sorry, but I don’t understand what you have changed about that mentioned file :-/. Do you mean setting the permissions to that file like e.g.
sudo chmod 666 /usr/lib/systemd/system/openhab2.service
Regards,
Thomas
didder26
(Thomas)
June 16, 2018, 7:38am
13
Hey everybody,
I got my OH2 installation running again with version 2.3.0-1.
Thanks @xefil for your hint to old config files in /var/lib/openhab2
What I did to restore my previously made backup manually:
Remove all OH2 instances (-purge)
Install OH2 in the current version 2.3.0-1 (sudo apt install openhab2)
Extract my “Backup.zip” (made by the OH2 Backup-Skript before) to my Home-folder
Copy the whole “conf” folder into /etc/openhab2/
Change the Owner of all these files to “openhab:openhab”
Copy from “userdata” (Backup.zip) only the two folders “config” and “jsondb” to /var/lib/openhab2/
Change the Owner of all the copied files to “openhab:openhab”
Start OH2 (sudo systemctl start openhab2)
Login to PaperUI and check all functions
It works!
So I guess there might have been a problem within the folder “userdata/etc” within the Backup.zip, which causes my problem.
Thanks for everybodys help
Thomas
1 Like
xefil
(X3fil)
June 18, 2018, 7:36am
14
Great @didder26 !
It’s funny to notice how much I’m used to use OpenHAB for my daily activities… util it stopped to work and I need to open manually my car gate every day
I wish you all a great week!
Simon
aart
(Aart)
August 22, 2018, 1:25pm
15
I have the same problem here. After upgrade to OH2.3, the service is running, but no logs and unable to connect to the webUI. After reinstalling OH and restoring a backup still the same problem. After following your instructions I’ve got is to work again.
Thanks!
RiotMode
(Philipp)
November 19, 2018, 5:46pm
16
today i rebooted my Raspb. with OH 2.3 and it didnt start too…
i stopped OH and cleared Cache/TMP and it started again luckily
sudo /etc/init.d/openhab2 stop
sudo rm -rf /var/lib/openhab2/cache/*
sudo rm -rf /var/lib/openhab2/tmp/*
sudo /etc/init.d/openhab2 start