{"action":"created","issue":{"url":"https://api.github.com/repos/openhab/openhab-distro/issues/508","repository_url":"https://api.github.com/repos/openhab/openhab-distro","labels_url":"https://api.github.com/repos/openhab/openhab-distro/issues/508/labels{/name}","comments_url":"https://api.github.com/repos/openhab/openhab-distro/issues/508/comments","events_url":"https://api.github.com/repos/openhab/openhab-distro/issues/508/events","html_url":"https://github.com/openhab/openhab-distro/issues/508","id":248240474,"number":508,"title":"Starting openHAB service fails after upgrading to 2.1 / 2.2-SNAPSHORT","user":{"login":"markus7017","id":12601656,"avatar_url":"https://avatars2.githubusercontent.com/u/12601656?v=4","gravatar_id":"","url":"https://api.github.com/users/markus7017","html_url":"https://github.com/markus7017","followers_url":"https://api.github.com/users/markus7017/followers","following_url":"https://api.github.com/users/markus7017/following{/other_user}","gists_url":"https://api.github.com/users/markus7017/gists{/gist_id}","starred_url":"https://api.github.com/users/markus7017/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/markus7017/subscriptions","organizations_url":"https://api.github.com/users/markus7017/orgs","repos_url":"https://api.github.com/users/markus7017/repos","events_url":"https://api.github.com/users/markus7017/events{/privacy}","received_events_url":"https://api.github.com/users/markus7017/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2017-08-06T11:07:31Z","updated_at":"2017-08-06T14:10:58Z","closed_at":null,"body":"After upgrading my running 2.0 installation using the update script (\"runtime/bin update\") the openhab2 service doesn't start anymore properly. In an endless loop it tries starting, fails, tries starting etc.\r\n\r\nsyslog shows the following error:\r\nAug  6 13:03:40 raspi start.sh[16471]: Launching the openHAB runtime...\r\nAug  6 13:03:42 raspi start.sh[16471]: Unable to update instance pid: /usr/share/openhab2/runtime/instances/instance.properties (Permission denied)\r\nAug  6 13:03:42 raspi start.sh[16471]: /usr/share/openhab2/userdata/logs/openhab.log (Permission denied)\r\nAug  6 13:03:42 raspi start.sh[16471]: Unable to update instance pid: /usr/share/openhab2/runtime/instances/instance.properties (Permission denied)\r\nAug  6 13:03:42 raspi systemd[1]: openhab2.service: main process exited, code=exited, status=255/n/a\r\nAug  6 13:03:43 raspi stop[16631]: stop: Ignoring predefined value for KARAF_HOME\r\nAug  6 13:03:44 raspi stop[16631]: Can't connect to the container. The container is not running.\r\nAug  6 13:03:44 raspi systemd[1]: openhab2.service: control process exited, code=exited status=1\r\nAug  6 13:03:44 raspi systemd[1]: Unit openhab2.service entered failed state.\r\nAug  6 13:03:44 raspi systemd[1]: openhab2.service holdoff time over, scheduling restart.\r\nAug  6 13:03:44 raspi systemd[1]: Stopping openHAB 2 - empowering the smart home...\r\nAug  6 13:03:44 raspi systemd[1]: Starting openHAB 2 - empowering the smart home...\r\nAug  6 13:03:44 raspi systemd[1]: Started openHAB 2 - empowering the smart home.\r\nAug  6 13:03:44 raspi start.sh[16799]: Launching the openHAB runtime...\r\nAug  6 13:03:46 raspi start.sh[16799]: Unable to update instance pid: /usr/share/openhab2/runtime/instances/instance.properties (Permission denied)\r\nAug  6 13:03:46 raspi start.sh[16799]: /usr/share/openhab2/userdata/logs/openhab.log (Permission denied)\r\nAug  6 13:03:46 raspi start.sh[16799]: Unable to update instance pid: /usr/share/openhab2/runtime/instances/instance.properties (Permission denied)\r\n\r\nStarting manually with \"sudo ./start.sh\" works and brings up the console.\r\n\r\npi@raspi:/usr/share/openhab2 $ ls -l\r\ntotal 40\r\ndrwxr-xr-x 2 root root  4096 Aug  5 22:15 addons\r\ndrwxr-xr-x 5 root root  4096 Jul 29 22:18 bin\r\nlrwxrwxrwx 1 root root    14 Mar  4 01:38 conf -> /etc/openhab2/\r\n-rw-r--r-- 1 root root 11232 Jan 22  2017 LICENSE.TXT\r\nlrwxrwxrwx 1 root root    22 Aug  5 20:24 log -> /var/lib/openhab2/logs\r\ndrwxrwxr-x 7 root root  4096 Aug  6 12:31 runtime\r\n-rw-r--r-- 1 root root   121 Jan 20  2017 start.bat\r\n-rw-r--r-- 1 root root    72 Jan 20  2017 start_debug.bat\r\n-rwxr-xr-x 1 root root    73 Jan 22  2017 start_debug.sh\r\n-rwxr-xr-x 1 root root   116 Jan 22  2017 start.sh\r\nlrwxrwxrwx 1 root root    17 Mar  5 18:23 userdata -> /var/lib/openhab2\r\n\r\n-rw-r--r-- 1 root root 94 Aug  6 12:51 instance.properties\r\n\r\npi@raspi:/usr/share/openhab2/runtime/instances $ cat instance.properties \r\ncount = 1\r\nitem.0.name = main\r\nitem.0.loc = /var/lib/openhab2\r\nitem.0.pid = 0\r\nitem.0.root = true\r\n\r\npi@raspi:/usr/share/openhab2 $ systemctl status openhab2\r\n● openhab2.service - openHAB 2 - empowering the smart home\r\n   Loaded: loaded (/usr/lib/systemd/system/openhab2.service; enabled)\r\n   Active: deactivating (stop) (Result: exit-code) since Sun 2017-08-06 13:06:24 CEST; 1s ago\r\n     Docs: http://docs.openhab.org\r\n           https://community.openhab.org\r\n  Process: 30912 ExecStart=/usr/share/openhab2/start.sh server (code=exited, status=255)\r\n Main PID: 30912 (code=exited, status=255);         : 31072 (karaf)\r\n   CGroup: /system.slice/openhab2.service\r\n           └─control\r\n             ├─31072 /bin/bash /usr/share/openhab2/runtime/bin/karaf stop\r\n             └─31227 /usr/lib/jvm/java-8-oracle/jre/bin/java -Dopenhab.home=/usr/share/openhab2 -Dopenhab.conf=/usr/share/openhab2/conf -Dopenhab.runtime=/usr/share/openhab2/runtime -Dop...\r\n\r\n\r\nReboot doesn't fix it.\r\nSame happens with 2.2.0-SNAPSHOT from tonight.\r\nRunning OH2 on a Pi3 with Jessie."},"comment":{"url":"https://api.github.com/repos/openhab/openhab-distro/issues/comments/320509379","html_url":"https://github.com/openhab/openhab-distro/issues/508#issuecomment-320509379","issue_url":"https://api.github.com/repos/openhab/openhab-distro/issues/508","id":320509379,"user":{"login":"BClark09","id":8983584,"avatar_url":"https://avatars1.githubusercontent.com/u/8983584?v=4","gravatar_id":"","url":"https://api.github.com/users/BClark09","html_url":"https://github.com/BClark09","followers_url":"https://api.github.com/users/BClark09/followers","following_url":"https://api.github.com/users/BClark09/following{/other_user}","gists_url":"https://api.github.com/users/BClark09/gists{/gist_id}","starred_url":"https://api.github.com/users/BClark09/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BClark09/subscriptions","organizations_url":"https://api.github.com/users/BClark09/orgs","repos_url":"https://api.github.com/users/BClark09/repos","events_url":"https://api.github.com/users/BClark09/events{/privacy}","received_events_url":"https://api.github.com/users/BClark09/received_events","type":"User","site_admin":false},"created_at":"2017-08-06T14:10:58Z","updated_at":"2017-08-06T14:10:58Z","body":"For the standard install, /var/log/openhab2 should always be the log directory.\r\n\r\nGlad it's somewhat working now. I sent the instruction for snapshot because that was the last version you mentioned. Although it shouldn't be a problem to go back to 2.1.0. We just need to change to the stable repo and tell apt that you want to go to a specific version (from [the docs](http://docs.openhab.org/installation/linux.html#changing-versions)).\r\n\r\n```\r\necho 'deb https://openhab.jfrog.io/openhab/openhab-linuxpkg stable main' | sudo tee /etc/apt/sources.list.d/openhab2.list\r\nsudo apt-get update\r\nsudo apt-get install openhab2=2.1.0-1\r\n```\r\n\r\nHope that helps."}}
{"actor":{"display_login":"BClark09"}}