OH 3.3.0 Frontail not Starting after fresh installation

I did temporary solution of WolfgangSn and work for me.
install the modules in the /opt/frontail directory ( npm install; npm update )

I’ve added that fix to latest openHABian, let me know if it still happens when installing from scratch.

i did a fresh install with openhabian-pi-raspios32-202208151955-gitbe9d23e-crc075defd9.img.xz but it is still not working.

Check /boot/first-boot.log for “cookie” if it executed cookie module install

sorry, i didn`t activate “maxDebug” here is what i got.

2022-08-21_21:27:05_BST [openHABian] Starting the openHABian initial setup.
2022-08-21_21:27:08_BST [openHABian] Storing configuration... OK
2022-08-21_21:27:09_BST [openHABian] Starting webserver with installation log... OK
2022-08-21_21:27:23_BST [openHABian] Changing default username and password... OK
2022-08-21_21:27:23_BST [openHABian] Setting up Ethernet connection... OK
2022-08-21_21:27:24_BST [openHABian] Ensuring network connectivity... OK
2022-08-21_21:27:24_BST [openHABian] Waiting for dpkg/apt to get ready... OK
2022-08-21_21:27:41_BST [openHABian] Updating repositories and upgrading installed packages... OK
2022-08-21_21:27:52_BST [openHABian] Installing git package... OK
2022-08-21_21:28:10_BST [openHABian] Updating myself from https://github.com/openhab/openhabian, openHAB3 branch... OK
2022-08-21_21:28:12_BST [openHABian] Starting execution of 'openhabian-config unattended'... OK
2022-08-21_21:28:12_BST [openHABian] Checking for root privileges... OK
2022-08-21_21:28:13_BST [openHABian] Updating Linux package information... \ e[2D| e[2D/ e[2D- e[2D\ e[2D| e[2D/ e[2D- e[2D\ e[2D| e[2D/ e[2D- e[2D\ e[2D| e[2DOK
2022-08-21_21:28:20_BST [openHABian] Loading configuration file '/etc/openhabian.conf'... OK
2022-08-21_21:28:20_BST [openHABian] Adjusting swap size to 1844 MB... OK (reboot required)
2022-08-21_21:28:20_BST [openHABian] Setting timezone based on openhabian.conf... OK (Europe/Berlin)
2022-08-21_22:28:21_CEST [openHABian] Enabling time synchronization using NTP... OK
2022-08-21_22:28:21_CEST [openHABian] Setting locale based on openhabian.conf... OK (reboot required)
2022-08-21_22:29:39_CEST [openHABian] Setting hostname of the base system based on openhabian.conf... OK
2022-08-21_22:29:39_CEST [openHABian] Setting the GPU memory split down to 16MB for headless system... OK
2022-08-21_22:29:40_CEST [openHABian] Enabling Audio output... OK
2022-08-21_22:29:40_CEST [openHABian] Installing basic can't-be-wrong packages (screen, vim, ...)... OK
2022-08-21_22:30:42_CEST [openHABian] Installing additional needed packages... OK
2022-08-21_22:31:25_CEST [openHABian] Installing python3 serial package... OK
2022-08-21_22:31:36_CEST [openHABian] Installing pigpio package... OK
2022-08-21_22:31:45_CEST [openHABian] Installing additional bluetooth packages... OK
2022-08-21_22:31:52_CEST [openHABian] Adding slightly tuned bash configuration files to system... OK
2022-08-21_22:31:52_CEST [openHABian] Adding slightly tuned vim configuration file to system... OK
2022-08-21_22:31:52_CEST [openHABian] tailscale VPN installation... SKIPPED (no preauthkey defined)
2022-08-21_22:31:52_CEST [openHABian] Applying miscellaneous system settings... OK
2022-08-21_22:31:52_CEST [openHABian] Downloading FireMotD... OK
2022-08-21_22:31:54_CEST [openHABian] Installing FireMotD... OK
2022-08-21_22:31:54_CEST [openHABian] Generating FireMotD theme... OK
2022-08-21_22:32:42_CEST [openHABian] Setting up FireMotD apt updates count service... OK
2022-08-21_22:33:00_CEST [openHABian] Fetching OpenJDK 11... OK
2022-08-21_22:33:02_CEST [openHABian] Installing OpenJDK 11... OK
2022-08-21_22:33:59_CEST [openHABian] Beginning install of latest openhab release (stable)... OK
2022-08-21_22:33:59_CEST [openHABian] Adding required keys to apt... OK
2022-08-21_22:34:00_CEST [openHABian] Installing selected openHAB3 version... OK
2022-08-21_22:35:47_CEST [openHABian] Setting up openHAB service... OK
2022-08-21_22:35:48_CEST [openHABian] Optimizing openHAB to run on low memory single board computers... OK
2022-08-21_22:35:48_CEST [openHABian] Setting openHAB HTTP/HTTPS ports... OK
2022-08-21_22:35:48_CEST [openHABian] Creating dependencies to jointly start services that depend on each other... OK
2022-08-21_22:35:49_CEST [openHABian] Adding an openHAB dashboard tile for 'openhabiandocs'... OK
2022-08-21_22:35:49_CEST [openHABian] Restarting openHAB service to play it safe... OK
2022-08-21_22:35:49_CEST [openHABian] Getting initial openHAB configuration... SKIPPED (backup not found at /boot/initial.zip)
2022-08-21_22:35:49_CEST [openHABian] Activating the openHAB console on all interfaces... OK
2022-08-21_22:35:49_CEST [openHABian] Adding openHAB syntax to vim editor... OK
2022-08-21_22:35:51_CEST [openHABian] Adding openHAB syntax to nano editor... OK
2022-08-21_22:35:51_CEST [openHABian] Adding openHAB scheme to multitail... OK
2022-08-21_22:35:51_CEST [openHABian] Preparing openHAB folder mounts under '/srv/openhab-*'... OK
2022-08-21_22:36:00_CEST [openHABian] Installing Samba... OK
2022-08-21_22:38:03_CEST [openHABian] Setting up Samba network shares... OK
2022-08-21_22:38:04_CEST [openHABian] Setting up Samba service... OK
2022-08-21_22:38:09_CEST [openHABian] Installing Frontail prerequsites (NodeJS)... OK
2022-08-21_22:39:52_CEST [openHABian] Installing openHAB Log Viewer (frontail)... OK
2022-08-21_22:40:23_CEST [openHABian] Setting up openHAB Log Viewer (frontail) service... OK
2022-08-21_22:40:26_CEST [openHABian] Adding an openHAB dashboard tile for 'frontail'... OK
2022-08-21_22:40:26_CEST [openHABian] Installing zram... OK
2022-08-21_22:40:34_CEST [openHABian] Beginning Mail Transfer Agent setup... SKIPPED (no configuration provided)
2022-08-21_22:40:34_CEST [openHABian] Applying file permissions recommendations... OK
2022-08-21_22:40:39_CEST [openHABian] Setting up automated SD mirroring and backup... SKIPPED (no configuration provided)
2022-08-21_22:40:39_CEST [openHABian] Cleaning up... OK
2022-08-21_22:41:25_CEST [openHABian] Execution of 'openhabian-config unattended' completed.
2022-08-21_22:41:25_CEST [openHABian] First time setup successfully finished. Rebooting your system!
2022-08-21_22:41:25_CEST [openHABian] After rebooting the openHAB dashboard will be available at: http://openhabian:8080
2022-08-21_22:41:25_CEST [openHABian] After rebooting to gain access to a console, simply reconnect using ssh.

today i did another trie but this time with debugmode=maximum.

frontail is still not working and what i got in the logs is:


e[90;01m$ npm install --force -g e[39;49;00m
+ npm install --force -g
npm WARN using --force Recommended protections disabled.

added 1 package, and audited 3 packages in 2s

found 0 vulnerabilities
npm notice 
npm notice New minor version of npm available! 8.15.0 -> 8.18.0
npm notice Changelog: <https://github.com/npm/cli/releases/tag/v8.18.0>
npm notice Run `npm install -g npm@8.18.0` to update!
npm notice 
+ return 0
+ cond_redirect npm install --force -g cookie
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ npm install --force -g cookie \033[39;49;00m'

e[90;01m$ npm install --force -g cookie e[39;49;00m
+ npm install --force -g cookie
npm WARN using --force Recommended protections disabled.

added 1 package, and audited 2 packages in 2s

found 0 vulnerabilities
+ return 0
+ cond_redirect npm update --force -g
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ npm update --force -g \033[39;49;00m'

e[90;01m$ npm update --force -g e[39;49;00m
+ npm update --force -g
npm WARN using --force Recommended protections disabled.

changed 38 packages, and audited 210 packages in 16s

11 packages are looking for funding
  run `npm fund` for details

Then frontail should at least not be failing because of themissing cookie module, should it.

strangely it is …

openhabian@openhabian:~ $ sudo journalctl -u frontail

We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:

    #1) Respect the privacy of others.
    #2) Think before you type.
    #3) With great power comes great responsibility.

[sudo] password for openhabian:
-- Journal begins at Mon 2022-08-22 15:05:36 CEST, ends at Mon 2022-08-22 20:12:40 CEST. --
Aug 22 15:18:58 openhabian systemd[1]: Started Frontail openHAB instance, reachable at http://openhabian:9001.
Aug 22 15:18:58 openhabian systemd[1]: Stopping Frontail openHAB instance, reachable at http://openhabian:9001>
Aug 22 15:18:58 openhabian systemd[1]: frontail.service: Succeeded.
Aug 22 15:18:58 openhabian systemd[1]: Stopped Frontail openHAB instance, reachable at http://openhabian:9001.
Aug 22 15:18:58 openhabian systemd[1]: Started Frontail openHAB instance, reachable at http://openhabian:9001.
Aug 22 15:18:59 openhabian frontail[12548]: node:internal/modules/cjs/loader:959
Aug 22 15:18:59 openhabian frontail[12548]:   throw err;
Aug 22 15:18:59 openhabian frontail[12548]:   ^
Aug 22 15:18:59 openhabian frontail[12548]: Error: Cannot find module 'cookie'
Aug 22 15:18:59 openhabian frontail[12548]: Require stack:
Aug 22 15:18:59 openhabian frontail[12548]: - /opt/frontail/index.js
Aug 22 15:18:59 openhabian frontail[12548]: - /opt/frontail/bin/frontail
Aug 22 15:18:59 openhabian frontail[12548]:     at Function.Module._resolveFilename (node:internal/modules/cjs>
Aug 22 15:18:59 openhabian frontail[12548]:     at Function.Module._load (node:internal/modules/cjs/loader:804>
Aug 22 15:18:59 openhabian frontail[12548]:     at Module.require (node:internal/modules/cjs/loader:1028:19)
Aug 22 15:18:59 openhabian frontail[12548]:     at require (node:internal/modules/cjs/helpers:102:18)
Aug 22 15:18:59 openhabian frontail[12548]:     at Object.<anonymous> (/opt/frontail/index.js:3:16)
Aug 22 15:18:59 openhabian frontail[12548]:     at Module._compile (node:internal/modules/cjs/loader:1126:14)
Aug 22 15:18:59 openhabian frontail[12548]:     at Object.Module._extensions..js (node:internal/modules/cjs/lo>
Aug 22 15:18:59 openhabian frontail[12548]:     at Module.load (node:internal/modules/cjs/loader:1004:32)
Aug 22 15:18:59 openhabian frontail[12548]:     at Function.Module._load (node:internal/modules/cjs/loader:839>
Aug 22 15:18:59 openhabian frontail[12548]:     at Module.require (node:internal/modules/cjs/loader:1028:19) {
Aug 22 15:18:59 openhabian frontail[12548]:   code: 'MODULE_NOT_FOUND',
Aug 22 15:18:59 openhabian frontail[12548]:   requireStack: [ '/opt/frontail/index.js', '/opt/frontail/bin/fro>
Aug 22 15:18:59 openhabian frontail[12548]: }
Aug 22 15:18:59 openhabian systemd[1]: frontail.service: Main process exited, code=exited, status=1/FAILURE
Aug 22 15:18:59 openhabian systemd[1]: frontail.service: Failed with result 'exit-code'.
Aug 22 15:18:59 openhabian systemd[1]: frontail.service: Scheduled restart job, restart counter is at 1.
Aug 22 15:19:00 openhabian systemd[1]: Stopped Frontail openHAB instance, reachable at http://openhabian:9001.
Aug 22 15:19:00 openhabian systemd[1]: Started Frontail openHAB instance, reachable at http://openhabian:9001.
Aug 22 15:19:00 openhabian frontail[12616]: node:internal/modules/cjs/loader:959
Aug 22 15:19:00 openhabian frontail[12616]:   throw err;
Aug 22 15:19:00 openhabian frontail[12616]:   ^
Aug 22 15:19:00 openhabian frontail[12616]: Error: Cannot find module 'cookie'
Aug 22 15:19:00 openhabian frontail[12616]: Require stack:
Aug 22 15:19:00 openhabian frontail[12616]: - /opt/frontail/index.js
Aug 22 15:19:00 openhabian frontail[12616]: - /opt/frontail/bin/frontail
Aug 22 15:19:00 openhabian frontail[12616]:     at Function.Module._resolveFilename (node:internal/modules/cjs>
Aug 22 15:19:00 openhabian frontail[12616]:     at Function.Module._load (node:internal/modules/cjs/loader:804>
Aug 22 15:19:00 openhabian frontail[12616]:     at Module.require (node:internal/modules/cjs/loader:1028:19)
Aug 22 15:19:00 openhabian frontail[12616]:     at require (node:internal/modules/cjs/helpers:102:18)
Aug 22 15:19:00 openhabian frontail[12616]:     at Object.<anonymous> (/opt/frontail/index.js:3:16)
Aug 22 15:19:00 openhabian frontail[12616]:     at Module._compile (node:internal/modules/cjs/loader:1126:14)
Aug 22 15:19:00 openhabian frontail[12616]:     at Object.Module._extensions..js (node:internal/modules/cjs/lo>
Aug 22 15:19:00 openhabian frontail[12616]:     at Module.load (node:internal/modules/cjs/loader:1004:32)
Aug 22 15:19:00 openhabian frontail[12616]:     at Function.Module._load (node:internal/modules/cjs/loader:839>
Aug 22 15:19:00 openhabian frontail[12616]:     at Module.require (node:internal/modules/cjs/loader:1028:19) {
Aug 22 15:19:00 openhabian frontail[12616]:   code: 'MODULE_NOT_FOUND',
Aug 22 15:19:00 openhabian frontail[12616]:   requireStack: [ '/opt/frontail/index.js', '/opt/frontail/bin/fro>
Aug 22 15:19:00 openhabian frontail[12616]: }
Aug 22 15:19:00 openhabian systemd[1]: frontail.service: Main process exited, code=exited, status=1/FAILURE
Aug 22 15:19:00 openhabian systemd[1]: frontail.service: Failed with result 'exit-code'.
Aug 22 15:19:00 openhabian systemd[1]: frontail.service: Scheduled restart job, restart counter is at 2.
Aug 22 15:19:01 openhabian systemd[1]: Stopped Frontail openHAB instance, reachable at http://openhabian:9001.
Aug 22 15:19:01 openhabian systemd[1]: Started Frontail openHAB instance, reachable at http://openhabian:9001.
Aug 22 15:19:01 openhabian frontail[12631]: node:internal/modules/cjs/loader:959
Aug 22 15:19:01 openhabian frontail[12631]:   throw err;
Aug 22 15:19:01 openhabian frontail[12631]:   ^
Aug 22 15:19:01 openhabian frontail[12631]: Error: Cannot find module 'cookie'
Aug 22 15:19:01 openhabian frontail[12631]: Require stack:
Aug 22 15:19:01 openhabian frontail[12631]: - /opt/frontail/index.js
Aug 22 15:19:01 openhabian frontail[12631]: - /opt/frontail/bin/frontail
Aug 22 15:19:01 openhabian frontail[12631]:     at Function.Module._resolveFilename (node:internal/modules/cjs>
Aug 22 15:19:01 openhabian frontail[12631]:     at Function.Module._load (node:internal/modules/cjs/loader:804>
Aug 22 15:19:01 openhabian frontail[12631]:     at Module.require (node:internal/modules/cjs/loader:1028:19)
Aug 22 15:19:01 openhabian frontail[12631]:     at require (node:internal/modules/cjs/helpers:102:18)
Aug 22 15:19:01 openhabian frontail[12631]:     at Object.<anonymous> (/opt/frontail/index.js:3:16)
Aug 22 15:19:01 openhabian frontail[12631]:     at Module._compile (node:internal/modules/cjs/loader:1126:14)
Aug 22 15:19:01 openhabian frontail[12631]:     at Object.Module._extensions..js (node:internal/modules/cjs/lo>
Aug 22 15:19:01 openhabian frontail[12631]:     at Module.load (node:internal/modules/cjs/loader:1004:32)
Aug 22 15:19:01 openhabian frontail[12631]:     at Function.Module._load (node:internal/modules/cjs/loader:839>
Aug 22 15:19:01 openhabian frontail[12631]:     at Module.require (node:internal/modules/cjs/loader:1028:19) {
Aug 22 15:19:01 openhabian frontail[12631]:   code: 'MODULE_NOT_FOUND',
Aug 22 15:19:01 openhabian frontail[12631]:   requireStack: [ '/opt/frontail/index.js', '/opt/frontail/bin/fro>
Aug 22 15:19:01 openhabian frontail[12631]: }
Aug 22 15:19:01 openhabian systemd[1]: frontail.service: Main process exited, code=exited, status=1/FAILURE
Aug 22 15:19:01 openhabian systemd[1]: frontail.service: Failed with result 'exit-code'.
Aug 22 15:19:01 openhabian systemd[1]: frontail.service: Scheduled restart job, restart counter is at 3.
Aug 22 15:19:02 openhabian systemd[1]: Stopped Frontail openHAB instance, reachable at http://openhabian:9001.
Aug 22 15:19:02 openhabian systemd[1]: Started Frontail openHAB instance, reachable at http://openhabian:9001.
Aug 22 15:19:02 openhabian frontail[12648]: node:internal/modules/cjs/loader:959
Aug 22 15:19:02 openhabian frontail[12648]:   throw err;
Aug 22 15:19:02 openhabian frontail[12648]:   ^
Aug 22 15:19:02 openhabian frontail[12648]: Error: Cannot find module 'cookie'
Aug 22 15:19:02 openhabian frontail[12648]: Require stack:
Aug 22 15:19:02 openhabian frontail[12648]: - /opt/frontail/index.js
Aug 22 15:19:02 openhabian frontail[12648]: - /opt/frontail/bin/frontail
Aug 22 15:19:02 openhabian frontail[12648]:     at Function.Module._resolveFilename (node:internal/modules/cjs>
Aug 22 15:19:02 openhabian frontail[12648]:     at Function.Module._load (node:internal/modules/cjs/loader:804>
Aug 22 15:19:02 openhabian frontail[12648]:     at Module.require (node:internal/modules/cjs/loader:1028:19)
Aug 22 15:19:02 openhabian frontail[12648]:     at require (node:internal/modules/cjs/helpers:102:18)
Aug 22 15:19:02 openhabian frontail[12648]:     at Object.<anonymous> (/opt/frontail/index.js:3:16)
Aug 22 15:19:02 openhabian frontail[12648]:     at Module._compile (node:internal/modules/cjs/loader:1126:14)
Aug 22 15:19:02 openhabian frontail[12648]:     at Object.Module._extensions..js (node:internal/modules/cjs/lo>
Aug 22 15:19:02 openhabian frontail[12648]:     at Module.load (node:internal/modules/cjs/loader:1004:32)
Aug 22 15:19:02 openhabian frontail[12648]:     at Function.Module._load (node:internal/modules/cjs/loader:839>
Aug 22 15:19:02 openhabian frontail[12648]:     at Module.require (node:internal/modules/cjs/loader:1028:19) {
Aug 22 15:19:02 openhabian frontail[12648]:   code: 'MODULE_NOT_FOUND',
Aug 22 15:19:02 openhabian frontail[12648]:   requireStack: [ '/opt/frontail/index.js', '/opt/frontail/bin/fro>
Aug 22 15:19:02 openhabian frontail[12648]: }
Aug 22 15:19:02 openhabian systemd[1]: frontail.service: Main process exited, code=exited, status=1/FAILURE
Aug 22 15:19:02 openhabian systemd[1]: frontail.service: Failed with result 'exit-code'.
Aug 22 15:19:02 openhabian systemd[1]: frontail.service: Scheduled restart job, restart counter is at 4.
Aug 22 15:19:03 openhabian systemd[1]: Stopped Frontail openHAB instance, reachable at http://openhabian:9001.
Aug 22 15:19:03 openhabian systemd[1]: frontail.service: Start request repeated too quickly.
Aug 22 15:19:03 openhabian systemd[1]: frontail.service: Failed with result 'exit-code'.
Aug 22 15:19:03 openhabian systemd[1]: Failed to start Frontail openHAB instance, reachable at http://openhabi>
Aug 22 15:19:48 openhabian frontail[13346]: node:internal/modules/cjs/loader:959
Aug 22 15:19:48 openhabian frontail[13346]:   throw err;
Aug 22 15:19:48 openhabian frontail[13346]:   ^
Aug 22 15:19:48 openhabian frontail[13346]: Error: Cannot find module 'cookie'


On my fresh install, it works so wonder what’s wrong with yours.

Stop the service and try starting manually (see ExecStart line in /etc/systemd/system/frontail.service).
Experiment with NODE_PATH environment (like export NODE_PATH=/opt/frontail until you have manual start working, then
eventually add setting it to frontail.service (do not forget systemctl daemon-reload).

it is still not working for me.

i downloaded the latest Openhab Image from Release openHABian v1.7.4b · openhab/openhabian · GitHub
wrote it with balena etcher on a sd-card.
waited until the first login page on myip:8080 is available. but stillnothing on myip:9001.

I am experiencing exactly the same problem as @DaDen with a fresh install on my raspberry pi 3 v2. The frontail service fails to start with the same errors in the log as in the previous messages.

The image name is openhabian-pi-raspios32-202208151955-gitbe9d23e-crc075defd9.img

The relevant part of the log of the first boot of openhabian with DEBUG=maximum is appended here (I removed thre parts of the log containgn image data I think that made the mesage too long) .

EDIT: I also tried to switch branch from openhabian-config from OPENHAB3 to main and install again frontail (option 21) but the journalctl error remain the same.

+ echo -n '2022-08-24_10:33:59_CEST [openHABian] Installing Frontail prerequsites (NodeJS)... '
2022-08-24_10:33:59_CEST [openHABian] Installing Frontail prerequsites (NodeJS)... + cond_redirect nodejs_setup
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ nodejs_setup \033[39;49;00m'

e[90;01m$ nodejs_setup e[39;49;00m
+ nodejs_setup
+ node_is_installed
++ command -v npm
+ [[ -x '' ]]
+ return 1
+ local keyName=nodejs
+ local link=https://unofficial-builds.nodejs.org/download/release/v14.18.2/node-v14.18.2-linux-armv6l.tar.xz
+ local myDistro
+ local temp
++ lsb_release -sc
+ myDistro=bullseye
+ [[ bullseye == \n\/\a ]]
++ mktemp /tmp/openhabian.XXXXX
+ temp=/tmp/openhabian.zY1ls
+ [[ -z '' ]]
+ is_armv6l
+ [[ '' == \a\r\m\v\6\l ]]
+ case "$(uname -m)" in
++ uname -m
+ return 1
+ [[ -z '' ]]
+ add_keys https://deb.nodesource.com/gpgkey/nodesource.gpg.key nodejs
+ local repoKey=/usr/share/keyrings/nodejs.gpg
++ timestamp
++ printf '%(%F_%T_%Z)T\n' -1
+ echo -n '2022-08-24_10:33:59_CEST [openHABian] Adding required keys to apt... '
2022-08-24_10:33:59_CEST [openHABian] Adding required keys to apt... + gpg --dearmor
+ curl -fsSL https://deb.nodesource.com/gpgkey/nodesource.gpg.key
+ echo OK
OK
++ timestamp
++ printf '%(%F_%T_%Z)T\n' -1
+ echo -n '2022-08-24_10:34:00_CEST [openHABian] Adding NodeSource repository to apt... '
2022-08-24_10:34:00_CEST [openHABian] Adding NodeSource repository to apt... + echo 'deb [signed-by=/usr/share/keyrings/nodejs.gpg] https://deb.nodesource.com/node_16.x bullseye main'
+ echo 'deb-src [signed-by=/usr/share/keyrings/nodejs.gpg] https://deb.nodesource.com/node_16.x bullseye main'
+ [[ -n '' ]]
+ cond_redirect apt-get update
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ apt-get update \033[39;49;00m'

e[90;01m$ apt-get update e[39;49;00m
+ apt-get update
Hit:1 http://archive.raspberrypi.org/debian bullseye InRelease
Hit:2 http://raspbian.raspberrypi.org/raspbian bullseye InRelease
Hit:3 http://davesteele.github.io/comitup/repo comitup InRelease
Hit:4 https://deb.nodesource.com/node_16.x bullseye InRelease
Hit:5 https://openhab.jfrog.io/artifactory/openhab-linuxpkg stable InRelease
Reading package lists...
+ return 0
+ echo OK
OK
++ timestamp
++ printf '%(%F_%T_%Z)T\n' -1
+ echo -n '2022-08-24_10:34:23_CEST [openHABian] Installing NodeJS... '
2022-08-24_10:34:23_CEST [openHABian] Installing NodeJS... + [[ -n '' ]]
+ cond_redirect apt-get install --yes nodejs
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ apt-get install --yes nodejs \033[39;49;00m'

e[90;01m$ apt-get install --yes nodejs e[39;49;00m
+ apt-get install --yes nodejs
Reading package lists...
Building dependency tree...
Reading state information...
The following package was automatically installed and is no longer required:
  triggerhappy
Use 'apt autoremove' to remove it.
The following NEW packages will be installed:
  nodejs
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 24.1 MB of archives.
After this operation, 119 MB of additional disk space will be used.
Get:1 https://deb.nodesource.com/node_16.x bullseye/main armhf nodejs armhf 16.17.0-deb-1nodesource1 [24.1 MB]
Fetched 24.1 MB in 7s (3,461 kB/s)
Selecting previously unselected package nodejs.
(Reading database ... 
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 50586 files and directories currently installed.)
Preparing to unpack .../nodejs_16.17.0-deb-1nodesource1_armhf.deb ...
Unpacking nodejs (16.17.0-deb-1nodesource1) ...
Setting up nodejs (16.17.0-deb-1nodesource1) ...
Processing triggers for man-db (2.9.4-2) ...
Updating FireMotD available updates count ... 
+ return 0
+ echo OK
OK
+ return 0
+ echo OK
OK
++ npm list -g
++ head -n 1
+ frontailBase=/usr/lib/node_modules/frontail
+ id -u frontail
+ cond_redirect useradd --groups openhabian,openhab -s /bin/bash -d /var/tmp frontail
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ useradd --groups openhabian,openhab -s /bin/bash -d /var/tmp frontail \033[39;49;00m'

e[90;01m$ useradd --groups openhabian,openhab -s /bin/bash -d /var/tmp frontail e[39;49;00m
+ useradd --groups openhabian,openhab -s /bin/bash -d /var/tmp frontail
+ return 0
++ timestamp
++ printf '%(%F_%T_%Z)T\n' -1
+ echo -n '2022-08-24_10:35:37_CEST [openHABian] Installing openHAB Log Viewer (frontail)... '
2022-08-24_10:35:37_CEST [openHABian] Installing openHAB Log Viewer (frontail)... + [[ -d /usr/lib/node_modules/frontail ]]
+ cond_redirect frontail_download /opt
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ frontail_download /opt \033[39;49;00m'

e[90;01m$ frontail_download /opt e[39;49;00m
+ frontail_download /opt
++ timestamp
++ printf '%(%F_%T_%Z)T\n' -1
+ echo -n '2022-08-24_10:35:37_CEST [openHABian] Downloading frontail... '
2022-08-24_10:35:37_CEST [openHABian] Downloading frontail... + [[ -d /opt/frontail ]]
+ cond_echo '\nUpdate... '
+ [[ -z '' ]]
+ echo -e '\033[33;01m\nUpdate... \033[39;49;00m'
e[33;01m
Update... e[39;49;00m
+ cond_redirect update_git_repo /opt/frontail master
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ update_git_repo /opt/frontail master \033[39;49;00m'

e[90;01m$ update_git_repo /opt/frontail master e[39;49;00m
+ update_git_repo /opt/frontail master
+ local branch
+ local path
+ branch=master
+ path=/opt/frontail
++ timestamp
++ printf '%(%F_%T_%Z)T\n' -1
++ basename /opt/frontail
+ echo -n '2022-08-24_10:35:37_CEST [openHABian] Updating frontail, master branch from git... '
2022-08-24_10:35:37_CEST [openHABian] Updating frontail, master branch from git... + cond_redirect git -C /opt/frontail fetch origin
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ git -C /opt/frontail fetch origin \033[39;49;00m'

e[90;01m$ git -C /opt/frontail fetch origin e[39;49;00m
+ git -C /opt/frontail fetch origin
+ return 0
+ cond_redirect git -C /opt/frontail fetch --tags --force --prune
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ git -C /opt/frontail fetch --tags --force --prune \033[39;49;00m'

e[90;01m$ git -C /opt/frontail fetch --tags --force --prune e[39;49;00m
+ git -C /opt/frontail fetch --tags --force --prune
+ return 0
+ cond_redirect git -C /opt/frontail reset --hard origin/master
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ git -C /opt/frontail reset --hard origin/master \033[39;49;00m'

e[90;01m$ git -C /opt/frontail reset --hard origin/master e[39;49;00m
+ git -C /opt/frontail reset --hard origin/master
HEAD is now at 621cda8 Update README.md
+ return 0
+ cond_redirect git -C /opt/frontail clean --force -x -d
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ git -C /opt/frontail clean --force -x -d \033[39;49;00m'

e[90;01m$ git -C /opt/frontail clean --force -x -d e[39;49;00m
+ git -C /opt/frontail clean --force -x -d
+ return 0
+ cond_redirect git -C /opt/frontail checkout master
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ git -C /opt/frontail checkout master \033[39;49;00m'

e[90;01m$ git -C /opt/frontail checkout master e[39;49;00m
+ git -C /opt/frontail checkout master
Already on 'master'
Your branch is up to date with 'origin/master'.
+ return 0
+ echo OK
OK
+ return 0
+ echo OK
OK
+ return 0
+ cd /opt/frontail
+ cond_redirect npm install --force -g
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ npm install --force -g \033[39;49;00m'

e[90;01m$ npm install --force -g e[39;49;00m
+ npm install --force -g
npm WARN using --force Recommended protections disabled.

added 1 package, and audited 3 packages in 2s

found 0 vulnerabilities
+ return 0
+ cond_redirect npm install --force -g cookie
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ npm install --force -g cookie \033[39;49;00m'

e[90;01m$ npm install --force -g cookie e[39;49;00m
+ npm install --force -g cookie
npm WARN using --force Recommended protections disabled.

added 1 package, and audited 2 packages in 2s

found 0 vulnerabilities
+ return 0
+ cond_redirect npm update --force -g
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ npm update --force -g \033[39;49;00m'

e[90;01m$ npm update --force -g e[39;49;00m
+ npm update --force -g
npm WARN using --force Recommended protections disabled.

changed 38 packages, and audited 210 packages in 18s

11 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities
npm notice 
npm notice New minor version of npm available! 8.15.0 -> 8.18.0
npm notice Changelog: <https://github.com/npm/cli/releases/tag/v8.18.0>
npm notice Run `npm install -g npm@8.18.0` to update!
npm notice 
+ return 0
+ echo OK
OK
++ timestamp
++ printf '%(%F_%T_%Z)T\n' -1
+ echo -n '2022-08-24_10:36:09_CEST [openHABian] Setting up openHAB Log Viewer (frontail) service... '
2022-08-24_10:36:09_CEST [openHABian] Setting up openHAB Log Viewer (frontail) service... + sed -e 's|%FRONTAILBASE|/usr/lib/node_modules/frontail|g' /opt/openhabian/includes/frontail.service
+ cond_redirect chmod 644 /etc/systemd/system/frontail.service
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ chmod 644 /etc/systemd/system/frontail.service \033[39;49;00m'

e[90;01m$ chmod 644 /etc/systemd/system/frontail.service e[39;49;00m
+ chmod 644 /etc/systemd/system/frontail.service
+ return 0
+ cond_redirect systemctl -q daemon-reload
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ systemctl -q daemon-reload \033[39;49;00m'

e[90;01m$ systemctl -q daemon-reload e[39;49;00m
+ systemctl -q daemon-reload
+ return 0
+ cond_redirect systemctl enable --now frontail.service
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ systemctl enable --now frontail.service \033[39;49;00m'

e[90;01m$ systemctl enable --now frontail.service e[39;49;00m
+ systemctl enable --now frontail.service
Created symlink /etc/systemd/system/multi-user.target.wants/frontail.service → /etc/systemd/system/frontail.service.
+ return 0
+ cond_redirect systemctl restart frontail.service
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ systemctl restart frontail.service \033[39;49;00m'

e[90;01m$ systemctl restart frontail.service e[39;49;00m
+ systemctl restart frontail.service
+ return 0
+ echo OK
OK
+ openhab_is_installed
+ openhab2_is_installed
++ dpkg -s openhab2
++ grep Status
++ cut '-d ' -f2
+ [[ '' =~ ^(install|hold)$ ]]
+ return 1
+ openhab3_is_installed
++ dpkg -s openhab
++ grep Status
++ cut '-d ' -f2
+ [[ install =~ ^(install|hold)$ ]]
+ return 0
+ return 0
+ dashboard_add_tile frontail
+ local application
+ local dashboardConfig
+ local ipAddress
+ local openhabConfig
+ local tileDesc
+ local tileImg
+ local tileURL
+ application=frontail
+ openhabConfig=/etc/openhab
+ dashboardConfig=/etc/openhab/services/runtime.cfg
++ ip route get 8.8.8.8
++ awk '{print $7}'
++ xargs
+ ipAddress=192.168.27.3
++ grep '^[[:space:]]*tile_desc_frontail' /opt/openhabian/includes/dashboard-imagedata
++ sed 's|tile_desc_frontail=||g; s|"||g'
+ tileDesc='openHAB Log Viewer'
++ sed 's|tile_imagedata_frontail=||g; s|"||g'
++ grep '^[[:space:]]*tile_imagedata_frontail' /opt/openhabian/includes/dashboard-imagedata
+ tileImg='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAV4AAADZCAMAAABfN6j8AA
*** EDITED ***
Tg6NDU6NDQrMDA6MDAdZexOAAAAAElFTkSuQmCC'
++ grep '^[[:space:]]*tile_url_frontail' /opt/openhabian/includes/dashboard-imagedata
++ sed 's|tile_url_frontail=||g; s|"||g; s|{HOSTNAME}|192.168.27.3|g'
+ tileURL=http://192.168.27.3:9001
++ timestamp
++ printf '%(%F_%T_%Z)T\n' -1
+ echo -n '2022-08-24_10:36:13_CEST [openHABian] Adding an openHAB dashboard tile for '\''frontail'\''... '
2022-08-24_10:36:13_CEST [openHABian] Adding an openHAB dashboard tile for 'frontail'... + case $application in
+ true
+ openhab_is_installed
+ openhab2_is_installed
++ dpkg -s openhab2
++ grep Status
++ cut '-d ' -f2
+ [[ '' =~ ^(install|hold)$ ]]
+ return 1
+ openhab3_is_installed
++ grep Status
++ cut '-d ' -f2
++ dpkg -s openhab
+ [[ install =~ ^(install|hold)$ ]]
+ return 0
+ return 0
+ [[ -d /etc/openhab/services ]]
+ touch /etc/openhab/services/runtime.cfg
+ grep -qs frontail-link /etc/openhab/services/runtime.cfg
+ [[ -z openHAB Log Viewer ]]
+ [[ -z http://192.168.27.3:9001 ]]
+ [[ -z data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAV4AAADZCAMAAABfN6j8AAAABGdB*** EDITED *** YdGRhdGU6bW9kaWZ5ADIwMjEtMTItMTBUMTg6NDU6NDQrMDA6MDAdZexOAAAAAElFTkSuQmCC ]]
+ echo -e '\norg.openhab.core.ui.tiles:frontail-link-name=openHAB Log Viewer\norg.openhab.core.ui.tiles:frontail-link-url=http://192.168.27.3:9001\norg.openhab.core.ui.tiles:frontail-link-imageurl=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAV4AAADZCAMAAABfN6j8A*** EDITED *** AAElFTkSuQmCC'
+ echo OK
OK
+ custom_frontail_log add ''
+ local frontailService=/etc/systemd/system/frontail.service
+ local addLog
+ local removeLog
+ local array
+ [[ -f /etc/systemd/system/frontail.service ]]
+ [[ add == \a\d\d ]]
+ [[ -n '' ]]
+ [[ -n '' ]]
+ return 0

I’ve just uploaded a potential fix. Reinstall frontail from openhabian-config menu and let me know.

I relaunched openhabian-config, that was already set on the openhabian branch “main”, and it updated itself.
I relaunched option 21 to install frontail and I can confirm that now frontail is starting regularly.
Thank you for your assistance,
Lionello Marrelli

It also worked for me. but now i have some other issues. maybe they are related in some way?

no, they are not related. Frontail was not working because of the version of nodejs vs. the packages that were required for frontail. Frontail is comletely ( apart of the hardware it runs on ) separated from openhab.

Is Nodejs maybe related to other parts of openhab?

Not for the basic/native/bare openhab installation.
In case you install something like frontail or node-red then you will need it but all these are not part of the basis installation but third party additions.

You should be able to see if nodejs is used on your system by running e.g.

ps -ef | grep [n]ode

which then should return something like

frontail   921     1  0 Aug06 ?        00:01:05 node /usr/lib/node_modules/frontail/bin/frontail --disable-usage-stats --ui-highlight --ui-highlight-preset /usr/lib/node_modules/frontail/preset/openhab_AEM.json --theme openhab_AEM --lines 2000 --number 200 /var/log/openhab/openhab.log /var/log/openhab/events.log

in case it is used and running

my result is:

frontail   743     1  0 11:55 ?        00:00:07 node /usr/lib/node_modules/frontail/bin/frontail --disable-usage-stats --ui-highlight --ui-highlight-preset /usr/lib/node_modules/frontail/preset/openhab_AEM.json --theme openhab_AEM --lines 2000 --number 200 /var/log/openhab/openhab.log /var/log/openhab/events.log

so it is the same.

correct, and nothing else makes use of node.js while the ps command was checking for it.

On a fresh installation frontail wont get installed:



[...]
# npm audit report

engine.io  4.0.0 - 6.2.0
Severity: high
Uncaught exception in engine.io  - https://github.com/advisories/GHSA-r7qp-cfhv-p84w
fix available via `npm audit fix --force`
Will install socket.io@4.5.4, which is a breaking change
node_modules/engine.io
  socket.io  3.0.0-rc1 - 4.4.1
  Depends on vulnerable versions of engine.io
  node_modules/socket.io

2 high severity vulnerabilities

To address all issues (including breaking changes), run:
  npm audit fix --force
+ return 1
+ echo 'FAILED (install)'
FAILED (install)
+ return 1
[...]