Openhab2 doesn't start anymore

Hi,

after sever months of running fine my openhab2 @ raspbian just doesn’t start anymore. No idea what might have changed :frowning: (Bad thing is that I recognized it after the weekly backup has been done and overwritten the working backup)
I’ve tried to apt-get udate & upgrade without luck.
Also nothing is writen in the openhab2.log even service status is active and processes are running.

Below the details (Please note the start date of the service and the last log date!). Please any one can help?
Thank you!

pi@rpi2:/usr/share/openhab2 $ sudo service openhab2 status
● openhab2.service - openHAB 2 - empowering the smart home
   Loaded: loaded (/usr/lib/systemd/system/openhab2.service; enabled)
   Active: active (running) since **Do 2017-09-28 19:43:24** CEST; 25min ago
     Docs: http://docs.openhab.org
           https://community.openhab.org
  Process: 29744 ExecStop=/usr/share/openhab2/runtime/bin/stop (code=exited, status=0/SUCCESS)
 Main PID: 29956 (karaf)
   CGroup: /system.slice/openhab2.service
           ├─29956 /bin/bash /usr/share/openhab2/runtime/bin/karaf server
           └─30101 /usr/bin/java -Dopenhab.home=/usr/share/openhab2 -Dopenhab.conf=/etc/openhab2 -Dopenhab.runtime=/usr/share/openhab2/runtime -Dopenhab.userdata=/var/lib/openhab2 ...

Sep 28 19:43:24 rpi2a systemd[1]: Started openHAB 2 - empowering the smart home.
Sep 28 19:43:24 rpi2a start.sh[29956]: Launching the openHAB runtime...
pi@rpi2:/usr/share/openhab2 $
pi@rpi2:/usr/share/openhab2 $ tail -f /var/log/openhab2/openhab.log -f /var/log/openhab2/events.log
==> /var/log/openhab2/openhab.log <==
2017-09-23 21:58:41.320 [INFO ] [basic.internal.servlet.WebAppServlet] - Stopped Basic UI
2017-09-23 21:58:52.406 [INFO ] [penhab.io.transport.mqtt.MqttService] - Stopping broker connection 'sonoff'
2017-09-23 21:58:52.525 [INFO ] [penhab.io.transport.mqtt.MqttService] - Stopping broker connection 'router'
2017-09-23 21:58:52.843 [INFO ] [ternal.scheduler.WeatherJobScheduler] - Deleting weatherJob-home
2017-09-23 21:58:52.932 [INFO ] [io.openhabcloud.internal.CloudClient] - Shutting down openHAB Cloud service connection
2017-09-23 21:58:53.284 [INFO ] [ui.habmin.internal.servlet.HABminApp] - Stopped HABmin servlet
2017-09-23 21:58:53.318 [INFO ] [assic.internal.servlet.WebAppServlet] - Stopped Classic UI
2017-09-23 21:58:54.609 [INFO ] [arthome.ui.paper.internal.PaperUIApp] - Stopped Paper UI
2017-09-23 21:58:54.636 [INFO ] [panel.internal.HABPanelDashboardTile] - Stopped HABPanel
**2017-09-23** 21:58:54.659 [INFO ] [.dashboard.internal.DashboardService] - Stopped dashboard

==> /var/log/openhab2/events.log <==
2017-09-23 21:57:05.589 [ItemStateChangedEvent     ] - ntp_ntp_4471690e_string changed from 2017-09-23 21:56:05 MESZ to 2017-09-23 21:57:05 MESZ
2017-09-23 21:58:05.545 [ItemStateChangedEvent     ] - Date changed from 2017-09-23T21:57:05.522+0200 to 2017-09-23T21:58:05.522+0200
2017-09-23 21:58:05.560 [ItemStateChangedEvent     ] - ntp_ntp_4471690e_dateTime changed from 2017-09-23T21:57:05.522+0200 to 2017-09-23T21:58:05.522+0200
2017-09-23 21:58:05.577 [ItemStateChangedEvent     ] - ntp_ntp_4471690e_string changed from 2017-09-23 21:57:05 MESZ to 2017-09-23 21:58:05 MESZ
2017-09-23 21:58:52.080 [hingStatusInfoChangedEvent] - 'ntp:ntp:4471690e' changed from ONLINE to UNINITIALIZED
2017-09-23 21:58:52.097 [hingStatusInfoChangedEvent] - 'ntp:ntp:4471690e' changed from UNINITIALIZED to UNINITIALIZED (HANDLER_MISSING_ERROR)
2017-09-23 21:58:53.625 [temChannelLinkRemovedEvent] - Link 'Date => ntp:ntp:4471690e:dateTime' has been removed.
2017-09-23 21:58:53.770 [temChannelLinkRemovedEvent] - Link 'ntp_ntp_4471690e_string => ntp:ntp:4471690e:string' has been removed.
2017-09-23 21:58:53.774 [temChannelLinkRemovedEvent] - Link 'ntp_ntp_4471690e_dateTime => ntp:ntp:4471690e:dateTime' has been removed.
**2017-09-23** 21:58:53.840 [ThingRemovedEvent         ] - Thing 'ntp:ntp:4471690e' has been removed.

Not sure if this helps, but I have on and off a similar effect and resolve it by stopping the service and deleting the /var/lib/openhab2/tmp and /var/lib/openhab2/cache folders. then restart OH2.
Good luck

2 Likes

Ha indeed this made it start again (after a while). Many many thanks!

1 Like

Awesome, kudos! It took a long time to start up but now works like a charm again. Thanks!!!

Just came across this same issue myself, completely explainable, happened after I stopped the service. This solution also worked for me BUT once i deleted /var/lib/openhab2/tmp it threw errors about the folder no longer existing while the cache folder was automatically recreated the tmp folder was not.

I had to recreate the folder using

mkdir tmp

Then change the user permissions using

chown openhab: tmp

You can see the folder permissions to confirm it worked using

ls -l

I created an account just to say your fix worked for me.

I had run the start for the first time before java finished installing, and no matter what I changed, it wouldn’t run.

Deleting those folders let it know to start new again and it worked!

1 Like