OH2 "fresh" install failing

Trying to install OH2, moving from OH1. I did have an earlier snapshot of OH2 running on the system, but upgrading it failed to start. I then tried to do a compoletely “clean” install (removed the existing snapshot and all openhab2 directories. Even tried the beta5 release. No matter what I try, I end up with this error in syslog, and a constantly restarting service:

Dec 27 00:06:54 raspberrypiOH start.sh[18632]: Launching the openHAB runtime...
Dec 27 00:06:57 raspberrypiOH start.sh[18632]: /var/lib/openhab2/etc/custom.properties (No such file or directory)
Dec 27 00:06:57 raspberrypiOH start.sh[18632]: Error occurred shutting down framework: java.io.FileNotFoundException: /var/lib/openhab2/etc/custom.properties (No such file or directory)
Dec 27 00:06:57 raspberrypiOH start.sh[18632]: java.io.FileNotFoundException: /var/lib/openhab2/etc/custom.properties (No such file or directory)
Dec 27 00:06:57 raspberrypiOH start.sh[18632]: at java.io.FileInputStream.open0(Native Method)
Dec 27 00:06:57 raspberrypiOH start.sh[18632]: at java.io.FileInputStream.open(FileInputStream.java:195)
Dec 27 00:06:57 raspberrypiOH start.sh[18632]: at java.io.FileInputStream.<init>(FileInputStream.java:138)
Dec 27 00:06:57 raspberrypiOH start.sh[18632]: at java.io.FileInputStream.<init>(FileInputStream.java:93)
Dec 27 00:06:57 raspberrypiOH start.sh[18632]: at sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:90)
Dec 27 00:06:57 raspberrypiOH start.sh[18632]: at sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:188)
Dec 27 00:06:57 raspberrypiOH start.sh[18632]: at org.apache.karaf.util.config.PropertiesLoader.loadPropertiesFile(PropertiesLoader.java:150)
Dec 27 00:06:57 raspberrypiOH start.sh[18632]: at org.apache.karaf.util.config.PropertiesLoader.loadIncludes(PropertiesLoader.java:190)
Dec 27 00:06:57 raspberrypiOH start.sh[18632]: at org.apache.karaf.util.config.PropertiesLoader.loadPropertiesFile(PropertiesLoader.java:173)
Dec 27 00:06:57 raspberrypiOH start.sh[18632]: at org.apache.karaf.util.config.PropertiesLoader.loadConfigProperties(PropertiesLoader.java:71)
Dec 27 00:06:57 raspberrypiOH start.sh[18632]: at org.apache.karaf.main.ConfigProperties.<init>(ConfigProperties.java:205)
Dec 27 00:06:57 raspberrypiOH start.sh[18632]: at org.apache.karaf.main.Main.updateInstancePidAfterShutdown(Main.java:226)
Dec 27 00:06:57 raspberrypiOH start.sh[18632]: at org.apache.karaf.main.Main.main(Main.java:191)
Dec 27 00:06:57 raspberrypiOH systemd[1]: openhab2.service: main process exited, code=exited, status=254/n/a

I even went as far as copying the custom.properties file from cloudbees into the folder where it’s missing, but then the service gets through this step and appears to hang after a “Startlevel changed” message. No http server on port 8080 even after 15+ minutes, no error messages in syslog, and no logs in /var/log/openhab2 (openhab.log never gets created).

Does anyone have any idea what could be wrong, or how I could further “clean” my system before reinstalling OH2? I’m sure it’s some leftover of the OH1 install or the OH2 snapshot I had running prior…

My next step would be to try openhabian from scratch, but I don’t want to lose the other configs I have on this RPI2.

Hopefully, you are not experiencing SD Card corruption… :slight_smile:

Did you try to purge first the openHAB 2 installation ? (apt-get purge openhab2-online). Warning: This will delete all openHAB folders, including user created files contained within them… so make sure you create a backup (especially of /etc/openhab2)

Then, you can follow the Snapshot installation instructions from here: http://docs.openhab.org/installation/linux.html

Well, I’ve had SD card issues in the past, so I’m actually running my rootfs off a USB key (I burned through 2 SD cards before that).

So, small step forward. I didn’t realize the .service file had been copied to dpkg-old by a previous install, and the new file was failing to install. So, I deleted both and reinstalled. Now, I get “Started LSB: openHAB2 server” in syslog, and no errors in systemctl status…but, still no http connection to the server, and still no log files generated in /var/log/openhab2…tired of this for tonight, will try again tomorrow…

you may want to look at openHABian. it automates the install of most core components and resolves any dependencies.

Good timing, exactly what I ended up doing last night! What a treat? I let it do its work, and it was ready to go in a couple hours without any input from me. Fantastic!

I still have issues with MQTT (broker configuration appears to be screwed up, with multiple instances of broker connections attempting to connect and failing), but I’ve seen other threads pertaining to this, I’ll take a look at that tonight.