[SOLVED] Stuck on install after upgrade to OH2.5 M4

Hello everyone,

I had OH up and running in the office on a new Raspi 4B, up until 2.5 m3 all was fine.

Once i heard about 2.5 M4 i run sudo apt-get update + sudo apt-get upgrade and openhab wasn’t restarting (or rather was restarting and stopping about every 2-3 seconds, with spikes in cpu usage and disk activity)

I had a number of other things installed, i thought the upgade of some other program must have messed up my OH installation, also thought it was my fault for doing sucha generalist Update and Upgrade, so i decided to restart from scratch.

I usually install java following the guide

* sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 0xB1998361219BD9C9
* sudo su -
* echo 'deb http://repos.azulsystems.com/debian stable main' > /etc/apt/sources.list.d/zulu.list
* sudo apt-get update
* sudo apt-get install zulu-embedded-8
* sudo reboot

Then install openhabian-config, from there install all “needed and can’t be wrong packages”(point 11) and from Openhab Related at point 41 the verision of OH i wish to install.

So i did so on a “virgin” raspbian installation a dn to my surprise, the situation is identical - OH is in a constant restarting state.

I noticed that running

sudo systemctl statuys openhab2.service

i got the response

openhab2.service - openHAB 2 - empowering the smart home
   Loaded: loaded (/usr/lib/systemd/system/openhab2.service; enabled; vendor preset: enabled)
   Active: activating (auto-restart) (Result: exit-code) since Wed 2019-11-13 14:29:11 CET; 1s ago
     Docs: https://www.openhab.org/docs/
           https://community.openhab.org
  Process: 24316 ExecStart=/usr/share/openhab2/runtime/bin/karaf ${OPENHAB_STARTMODE} (code=exited, status=255/EXCEPTION)
 Main PID: 24316 (code=exited, status=255/EXCEPTION)

and running

sudo journalctl -u openhab2.service -b

the reponse just keep looping:

 -- Logs begin at Wed 2019-11-13 14:06:58 CET, end at Wed 2019-11-13 14:32:26 CET. --
 nov 13 14:07:02 brando systemd[1]: Started openHAB 2 - empowering the smart home.
 nov 13 14:07:05 brando karaf[449]: java.lang.RuntimeException: /var/log/openhab2/openhab.log (Permesso negato)
nov 13 14:07:05 brando karaf[449]:         at org.apache.karaf.main.util.BootstrapLogManager.getDefaultHandlerInternal(BootstrapLogManager.java:102)
nov 13 14:07:05 brando karaf[449]:         at org.apache.karaf.main.util.BootstrapLogManager.getDefaultHandlersInternal(BootstrapLogManager.java:137)
nov 13 14:07:05 brando karaf[449]:         at org.apache.karaf.main.util.BootstrapLogManager.getDefaultHandlers(BootstrapLogManager.java:70)
nov 13 14:07:05 brando karaf[449]:         at org.apache.karaf.main.util.BootstrapLogManager.configureLogger(BootstrapLogManager.java:75)
nov 13 14:07:05 brando karaf[449]:         at org.apache.karaf.main.Main.launch(Main.java:244)
nov 13 14:07:05 brando karaf[449]:         at org.apache.karaf.main.Main.main(Main.java:178)
nov 13 14:07:05 brando karaf[449]: Caused by: java.io.FileNotFoundException: /var/log/openhab2/openhab.log (Permesso negato)
nov 13 14:07:05 brando karaf[449]:         at java.io.FileOutputStream.open0(Native Method)
nov 13 14:07:05 brando karaf[449]:         at java.io.FileOutputStream.open(FileOutputStream.java:270)
nov 13 14:07:05 brando karaf[449]:         at java.io.FileOutputStream.<init>(FileOutputStream.java:213)
nov 13 14:07:05 brando karaf[449]:         at org.apache.karaf.main.util.BootstrapLogManager$SimpleFileHandler.open(BootstrapLogManager.java:193)
nov 13 14:07:05 brando karaf[449]:         at org.apache.karaf.main.util.BootstrapLogManager$SimpleFileHandler.<init>(BootstrapLogManager.java:182)
nov 13 14:07:05 brando karaf[449]:         at org.apache.karaf.main.util.BootstrapLogManager.getDefaultHandlerInternal(BootstrapLogManager.java:100)
nov 13 14:07:05 brando karaf[449]:         ... 5 more
nov 13 14:07:05 brando karaf[449]: !SESSION 2019-11-13 14:07:05.967 -----------------------------------------------
nov 13 14:07:05 brando karaf[449]: eclipse.buildId=unknown
nov 13 14:07:05 brando karaf[449]: java.version=1.8.0_222
nov 13 14:07:05 brando karaf[449]: java.vendor=Azul Systems, Inc.
nov 13 14:07:05 brando karaf[449]: BootLoader constants: OS=linux, ARCH=arm, WS=gtk, NL=it_IT
nov 13 14:07:05 brando karaf[449]: !ENTRY org.eclipse.osgi 4 0 2019-11-13 14:07:05.967
nov 13 14:07:05 brando karaf[449]: !MESSAGE Error reading configuration: Unable to create lock manager.
nov 13 14:07:05 brando karaf[449]: !STACK 0
nov 13 14:07:05 brando karaf[449]: java.io.IOException: Unable to create lock manager.
nov 13 14:07:05 brando karaf[449]:         at org.eclipse.osgi.storagemanager.StorageManager.open(StorageManager.java:698)
nov 13 14:07:05 brando karaf[449]:         at org.eclipse.osgi.storage.Storage.getChildStorageManager(Storage.java:1776)
nov 13 14:07:05 brando karaf[449]:         at org.eclipse.osgi.storage.Storage.getInfoInputStream(Storage.java:1793)
nov 13 14:07:05 brando karaf[449]:         at org.eclipse.osgi.storage.Storage.<init>(Storage.java:132)
nov 13 14:07:05 brando karaf[449]:         at org.eclipse.osgi.storage.Storage.createStorage(Storage.java:85)
nov 13 14:07:05 brando karaf[449]:         at org.eclipse.osgi.internal.framework.EquinoxContainer.<init>(EquinoxContainer.java:68)
nov 13 14:07:05 brando karaf[449]:         at org.eclipse.osgi.launch.Equinox.<init>(Equinox.java:31)
nov 13 14:07:05 brando karaf[449]:         at org.eclipse.osgi.launch.EquinoxFactory.newFramework(EquinoxFactory.java:24)
nov 13 14:07:05 brando karaf[449]:         at org.apache.karaf.main.Main.launch(Main.java:256)
nov 13 14:07:05 brando karaf[449]:         at org.apache.karaf.main.Main.main(Main.java:178)
nov 13 14:07:06 brando systemd[1]: openhab2.service: Main process exited, code=exited, status=255/EXCEPTION
nov 13 14:07:06 brando systemd[1]: openhab2.service: Failed with result 'exit-code'.
nov 13 14:07:11 brando systemd[1]: openhab2.service: Service RestartSec=5s expired, scheduling restart.
nov 13 14:07:11 brando systemd[1]: openhab2.service: Scheduled restart job, restart counter is at 1.
nov 13 14:07:11 brando systemd[1]: Stopped openHAB 2 - empowering the smart home.
nov 13 14:07:11 brando systemd[1]: Started openHAB 2 - empowering the smart home.
 nov 13 14:07:12 brando karaf[938]: java.lang.RuntimeException: /var/log/openhab2/openhab.log (Permesso negato)
nov 13 14:07:12 brando karaf[938]:         at org.apache.karaf.main.util.BootstrapLogManager.getDefaultHandlerInternal(BootstrapLogManager.java:102)
nov 13 14:07:12 brando karaf[938]:         at org.apache.karaf.main.util.BootstrapLogManager.getDefaultHandlersInternal(BootstrapLogManager.java:137)
nov 13 14:07:12 brando karaf[938]:         at org.apache.karaf.main.util.BootstrapLogManager.getDefaultHandlers(BootstrapLogManager.java:70)
nov 13 14:07:12 brando karaf[938]:         at org.apache.karaf.main.util.BootstrapLogManager.configureLogger(BootstrapLogManager.java:75)
nov 13 14:07:12 brando karaf[938]:         at org.apache.karaf.main.Main.launch(Main.java:244)
nov 13 14:07:12 brando karaf[938]:         at org.apache.karaf.main.Main.main(Main.java:178)
nov 13 14:07:12 brando karaf[938]: Caused by: java.io.FileNotFoundException: /var/log/openhab2/openhab.log (Permesso negato)
nov 13 14:07:12 brando karaf[938]:         at java.io.FileOutputStream.open0(Native Method)
nov 13 14:07:12 brando karaf[938]:         at java.io.FileOutputStream.open(FileOutputStream.java:270)
nov 13 14:07:12 brando karaf[938]:         at java.io.FileOutputStream.<init>(FileOutputStream.java:213)
nov 13 14:07:12 brando karaf[938]:         at org.apache.karaf.main.util.BootstrapLogManager$SimpleFileHandler.open(BootstrapLogManager.java:193)
nov 13 14:07:12 brando karaf[938]:         at org.apache.karaf.main.util.BootstrapLogManager$SimpleFileHandler.<init>(BootstrapLogManager.java:182)
nov 13 14:07:12 brando karaf[938]:         at org.apache.karaf.main.util.BootstrapLogManager.getDefaultHandlerInternal(BootstrapLogManager.java:100)
nov 13 14:07:12 brando karaf[938]: !SESSION 2019-11-13 14:07:12.883 -----------------------------------------------
nov 13 14:07:12 brando karaf[938]: eclipse.buildId=unknown
nov 13 14:07:12 brando karaf[938]: java.version=1.8.0_222
nov 13 14:07:12 brando karaf[938]: java.vendor=Azul Systems, Inc.
nov 13 14:07:12 brando karaf[938]: BootLoader constants: OS=linux, ARCH=arm, WS=gtk, NL=it_IT
nov 13 14:07:12 brando karaf[938]: !ENTRY org.eclipse.osgi 4 0 2019-11-13 14:07:12.883
nov 13 14:07:12 brando karaf[938]: !MESSAGE Error reading configuration: Unable to create lock manager.
nov 13 14:07:12 brando karaf[938]: !STACK 0
nov 13 14:07:12 brando karaf[938]: java.io.IOException: Unable to create lock manager.
nov 13 14:07:12 brando karaf[938]:         at org.eclipse.osgi.storagemanager.StorageManager.open(StorageManager.java:698)
nov 13 14:07:12 brando karaf[938]:         at org.eclipse.osgi.storage.Storage.getChildStorageManager(Storage.java:1776)
nov 13 14:07:12 brando karaf[938]:         at org.eclipse.osgi.storage.Storage.getInfoInputStream(Storage.java:1793)
nov 13 14:07:12 brando karaf[938]:         at org.eclipse.osgi.storage.Storage.<init>(Storage.java:132)
nov 13 14:07:12 brando karaf[938]:         at org.eclipse.osgi.storage.Storage.createStorage(Storage.java:85)
nov 13 14:07:12 brando karaf[938]:         at org.eclipse.osgi.internal.framework.EquinoxContainer.<init>(EquinoxContainer.java:68)
nov 13 14:07:12 brando karaf[938]:         at org.eclipse.osgi.launch.Equinox.<init>(Equinox.java:31)
nov 13 14:07:12 brando karaf[938]:         at org.eclipse.osgi.launch.EquinoxFactory.newFramework(EquinoxFactory.java:24)
nov 13 14:07:12 brando karaf[938]:         at org.apache.karaf.main.Main.launch(Main.java:256)
nov 13 14:07:12 brando karaf[938]:         at org.apache.karaf.main.Main.main(Main.java:178)
nov 13 14:07:13 brando systemd[1]: openhab2.service: Main process exited, code=exited, status=255/EXCEPTION
nov 13 14:07:13 brando systemd[1]: openhab2.service: Failed with result 'exit-code'.
nov 13 14:07:18 brando systemd[1]: openhab2.service: Service RestartSec=5s expired, scheduling restart.
nov 13 14:07:18 brando systemd[1]: openhab2.service: Scheduled restart job, restart counter is at 2.
nov 13 14:07:18 brando systemd[1]: Stopped openHAB 2 - empowering the smart home.
nov 13 14:07:18 brando systemd[1]: Started openHAB 2 - empowering the smart home.
nov 13 14:07:19 brando karaf[1111]: java.lang.RuntimeException: /var/log/openhab2/openhab.log (Permesso negato)

Two things i thought:

  1. there is that denied permission to /var/log/openhab2/openhab.log (in the last line, where I have cut the log)
  2. might be something related to java alternatives, but running
    sudo su -
    root@brando:~# sudo update-alternatives --config java

i get the response (loosely translated from Italian):

There is only one available alternative in the group java (which is supplied by /usr/bin/java): /opt/jdk/zulu8.40.0.178-ca-jdk1.8.0_222-linux_aarch32hf/bin/java
Nothing to configure.

How do i solve this?

thanks :slight_smile:

PS- the problem persists after another clean reainstall of raspbian, installing java from within openhabian-config>manual installation

Could be connected to

and

?
Any help is greatly appreciated

Find out why openhab (running as user “openhab”) has no permissions to write to the logfile or dir.
Try openhab-cli reset-ownership (I think, from memory).

2 Likes

it doesn’t get much better than a one line solution XD

Ty Markus
OH loaded and all is fine as soon as i reset ownership :slight_smile: