After upgrading to OH3 I cannot start frontail anymore. It looks like I have to adjust a path from /var/lib/openhab2 to /var/lib/openhab somewhere, but I have no idea where.
I have already corrected paths in frontail.service. Does someone have any idea?
Dec 22 21:58:23 NUC systemd[1]: Started Frontail.
Dec 22 21:58:25 NUC frontail[15601]: /usr/lib/node_modules/frontail/node_modules/configstore/index.js:65
Dec 22 21:58:25 NUC frontail[15601]: #011#011#011throw error;
Dec 22 21:58:25 NUC frontail[15601]: #011#011#011^
Dec 22 21:58:25 NUC frontail[15601]: Error: EACCES: permission denied, mkdir ‘/var/lib/openhab2’
Dec 22 21:58:25 NUC frontail[15601]: You don’t have access to this file.
Dec 22 21:58:25 NUC frontail[15601]: at Object.mkdirSync (fs.js:757:3)
Dec 22 21:58:25 NUC frontail[15601]: at make (/usr/lib/node_modules/frontail/node_modules/make-dir/index.js:61:12)
Dec 22 21:58:25 NUC frontail[15601]: at make (/usr/lib/node_modules/frontail/node_modules/make-dir/index.js:68:5)
Dec 22 21:58:25 NUC frontail[15601]: at make (/usr/lib/node_modules/frontail/node_modules/make-dir/index.js:68:5)
Dec 22 21:58:25 NUC frontail[15601]: at Function.module.exports.sync (/usr/lib/node_modules/frontail/node_modules/make-dir/index.js:84:9)
Dec 22 21:58:25 NUC frontail[15601]: at Configstore.set all [as all] (/usr/lib/node_modules/frontail/node_modules/configstore/index.js:56:12)
Dec 22 21:58:25 NUC frontail[15601]: at Configstore.set (/usr/lib/node_modules/frontail/node_modules/configstore/index.js:88:12)
Dec 22 21:58:25 NUC frontail[15601]: at new Stats (/usr/lib/node_modules/frontail/lib/stats.js:21:14)
Dec 22 21:58:25 NUC frontail[15601]: at module.exports (/usr/lib/node_modules/frontail/lib/stats.js:67:37)
Dec 22 21:58:25 NUC frontail[15601]: at Object. (/usr/lib/node_modules/frontail/index.js:29:15)
Dec 22 21:58:25 NUC systemd[1]: frontail.service: Main process exited, code=exited, status=1/FAILURE
Dec 22 21:58:25 NUC systemd[1]: frontail.service: Failed with result ‘exit-code’.
Dec 22 21:58:25 NUC systemd[1]: frontail.service: Scheduled restart job, restart counter is at 5.
Dec 22 21:58:25 NUC systemd[1]: Stopped Frontail.
Dec 22 21:58:25 NUC systemd[1]: frontail.service: Start request repeated too quickly.
Dec 22 21:58:25 NUC systemd[1]: frontail.service: Failed with result ‘exit-code’.
Dec 22 21:58:25 NUC systemd[1]: Failed to start Frontail.
@Confectrician, thank you for the description. I have tried these steps already several times, but it did not work. I still get the error message. Any other ideas, where this old path could be kept in the context of frontail/node-js?
Have you read the posted information:
You would have to change the path in /etc/systemd/system/frontail.service. In this file you replace two occurrences of “openhab2” with just “openhab”.
?
Should be ok.
I would suggest to search for files containing /var/lib/openhab2 then:
sudo find /etc /var/lib/ -type f -exec grep -l /var/lib/openhab2
this should print a list of files containing /var/lib/openhab2.
This could include binaries as well. So before editing the resulting files it is better to review which files are listed first.
A workaround could be to create a softlink /var/lib/openhab pointing to /var/lib/openhab2.
This may have other sideeffects so it’s better of course to find the root cause and solve that.
Thank you to all of you - finally it is working again. I followed your hints, and I have changed the path in /etc/passwd for user openhab (working dir??) and I confirmed access rights - I am not sure why, but it works …
Thanks for the solution. It causes the problem because Frontail tries to write some kind of hidden token file into the (now missing) /var/lib/openhab2 directory.
You can see this if you look at the Frontail service status output: