Frontail not working after SD restore on fresh install

Hello Openhab helpers,

I’m running OH3.1 on a rPi3. I was running some issues after a power loss so I decided to restore from a backup I had. To do so, I installed a fresh install of openhabian-pi-raspios32-v1.6.5.img on my new SD card. After OH3.1 booted correctly, I imported and restored from my backup.

All is working perfectly now except for the log viewer (Frontail). When I try to open it, it says page not found. I tried to install it through openhab-config but here is the error I’m having :

openhabian@openhabian:~ $ sudo openhabian-config
[sudo] password for openhabian:
2021-09-30_12:00:23_EDT [openHABian] Checking for root privileges... OK
2021-09-30_12:00:24_EDT [openHABian] Loading configuration file '/etc/openhabian                                                                 .conf'... OK
2021-09-30_12:00:25_EDT [openHABian] openHABian configuration tool version: [mai                                                                 n]{2021-09-29T21:18:44+02:00}(b0e6c38)
2021-09-30_12:00:25_EDT [openHABian] Checking for changes in origin branch main.                                                                 .. OK
2021-09-30_12:00:27_EDT [openHABian] Switching to branch main... OK
2021-09-30_12:00:29_EDT [openHABian] Updating Linux package information... OK
/opt/openhabian/functions/helpers.bash: line 595: node: command not found
2021-09-30_12:00:35_EDT [openHABian] Installing Frontail prerequsites (NodeJS)..                                                                 . OK
/opt/openhabian/functions/nodejs-apps.bash: line 79: npm: command not found
2021-09-30_12:00:39_EDT [openHABian] Installing openHAB Log Viewer (frontail)...                                                                  2021-09-30_12:00:39_EDT [openHABian] Downloading frontail... OK
FAILED (install)
2021-09-30_12:00:43_EDT [openHABian] Checking for default openHABian username:pa                                                                 ssword combination... FAILED
2021-09-30_12:00:44_EDT [openHABian] We hope you got what you came for! See you                                                                  again soon ;)

From what I understand, “node” and “npm” seems to be not installed. How can I manually install Node and npm then?

Thank you very much for your help!

Installing them is no big challenge.

sudo apt install nodejs npm

I think that’s all there is to it. Buy openHABian should install those for you by default. If ti failed to do that it may have failed to do other things too so it might be worth exploring why it failed to install node and npm.

Ok thank you Rich for answering me so quickly.

Here is the log after trying to install node-js :

openhabian@openhabian:~ $ sudo apt install nodejs npm
[sudo] password for openhabian:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 nodejs : Conflicts: npm
 npm : Depends: node-gyp (>= 3.6.2~) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

I guess next step is to install node-gyp? Is that it?

It looks like we are approaching dependency hell. NPM is indeed already installed I think but it’s a wrong version. You can try to install node-gyp but I’ve no confidence that this will be the last problem you encounter nor that Frontail will end up in a working state once this is all done.

Were it me, I’d probably start over with a fresh install again. Make sure to review the logs from that first install for any errors.

I think this is something for the openhabian-config maintainers as nodejs is being installed from another repository than the default.

Ok not sure I get what you mean. How can I get support then?

I think mstormi will find this thread and reply soon.
The other possibility is to open an issue at https://github.com/openhab/openhabian/issues

I just did a fresh install (no restore backup yet) of openhabian-pi-raspios32-v1.6.5.img.xz and trying to install Frontail results in the same error as previously.

I think there might be an issue with the image or something…

Anyone reported something similar?

Review and do the things discussed at openHABian | openHAB.

No one has reported anything similar and without a whole lot more information we will largely be powerless to help.

Here is what my first-boot.log looks like :



2021-03-04_23:04:55_UTC [openHABian] Starting the openHABian initial setup.
2021-03-04_23:04:55_UTC [openHABian] Storing configuration... OK
2021-03-04_23:04:55_UTC [openHABian] Starting webserver with installation log... OK
2021-03-04_23:05:00_UTC [openHABian] Changing default username and password... OK
2021-03-04_23:05:01_UTC [openHABian] Setting up Ethernet connection... OK
2021-03-04_23:05:01_UTC [openHABian] Ensuring network connectivity... OK
2021-03-04_23:05:01_UTC [openHABian] Waiting for dpkg/apt to get ready... OK
2021-09-30_17:45:39_UTC [openHABian] Updating repositories and upgrading installed packages... OK (rebooting)


2021-09-30_18:51:38_BST [openHABian] Starting the openHABian initial setup.
2021-09-30_18:51:38_BST [openHABian] Storing configuration... OK
2021-09-30_18:51:39_BST [openHABian] Starting webserver with installation log... OK
2021-09-30_18:51:44_BST [openHABian] Changing default username and password... SKIPPED
2021-09-30_18:51:44_BST [openHABian] Setting up Ethernet connection... OK
2021-09-30_18:51:44_BST [openHABian] Ensuring network connectivity... OK
2021-09-30_18:51:44_BST [openHABian] Waiting for dpkg/apt to get ready... OK
2021-09-30_18:51:53_BST [openHABian] Updating repositories and upgrading installed packages... OK
2021-09-30_18:52:10_BST [openHABian] Installing git package... OK
2021-09-30_18:52:29_BST [openHABian] Updating myself from https://github.com/openhab/openhabian, main branch... OK
2021-09-30_18:52:35_BST [openHABian] Starting execution of 'openhabian-config unattended'... OK
2021-09-30_18:52:35_BST [openHABian] Checking for root privileges... OK
2021-09-30_18:52:36_BST [openHABian] Updating Linux package information... OK
2021-09-30_18:52:44_BST [openHABian] Loading configuration file '/etc/openhabian.conf'... OK
2021-09-30_18:52:44_BST [openHABian] Adjusting swap size to 1846 MB... OK (reboot required)
2021-09-30_18:52:44_BST [openHABian] Setting timezone based on openhabian.conf... OK (Europe/Berlin)
2021-09-30_19:52:44_CEST [openHABian] Enabling time synchronization using NTP... OK
2021-09-30_19:52:45_CEST [openHABian] Setting locale based on openhabian.conf... OK (reboot required)
2021-09-30_19:54:19_CEST [openHABian] Setting hostname of the base system based on openhabian.conf... OK
2021-09-30_19:54:19_CEST [openHABian] Setting the GPU memory split down to 16MB for headless system... OK
2021-09-30_19:54:19_CEST [openHABian] Enabling Audio output... OK
2021-09-30_19:54:20_CEST [openHABian] Installing basic can't-be-wrong packages (screen, vim, ...)... OK
2021-09-30_19:55:16_CEST [openHABian] Installing additional needed packages... OK
2021-09-30_19:56:17_CEST [openHABian] Installing python3 serial package... OK
2021-09-30_19:56:28_CEST [openHABian] Installing pigpio package... OK
2021-09-30_19:56:38_CEST [openHABian] Installing additional bluetooth packages... OK
2021-09-30_19:56:46_CEST [openHABian] Adding slightly tuned bash configuration files to system... OK
2021-09-30_19:56:46_CEST [openHABian] Adding slightly tuned vim configuration file to system... OK
2021-09-30_19:56:46_CEST [openHABian] tailscale VPN installation... SKIPPED (no preauthkey defined)
2021-09-30_19:56:46_CEST [openHABian] Applying miscellaneous system settings... OK
2021-09-30_19:56:47_CEST [openHABian] Downloading FireMotD... OK
2021-09-30_19:56:48_CEST [openHABian] Installing FireMotD... OK
2021-09-30_19:56:48_CEST [openHABian] Generating FireMotD theme... OK
2021-09-30_19:57:05_CEST [openHABian] Setting up FireMotD apt updates count service... OK
2021-09-30_19:57:18_CEST [openHABian] Installing cached version of Java to ensure that some form of Java is installed!
2021-09-30_19:57:18_CEST [openHABian] Installing Java Zulu prerequisites (libc, libstdc++, zlib1g)... OK
2021-09-30_19:57:18_CEST [openHABian] Installing Java Zulu 11 32-Bit OpenJDK... OK
2021-09-30_19:57:19_CEST [openHABian] Installing Java Zulu CEK to enable unlimited cipher strength... OK
2021-09-30_19:57:21_CEST [openHABian] Installing Java Zulu prerequisites (libc, libstdc++, zlib1g)... OK
2021-09-30_19:57:21_CEST [openHABian] Downloading Java Zulu 11 32-Bit OpenJDK... OK
2021-09-30_19:58:10_CEST [openHABian] Installing Java Zulu 11 32-Bit OpenJDK... OK
2021-09-30_19:58:10_CEST [openHABian] Installing Java Zulu CEK to enable unlimited cipher strength... OK
2021-09-30_19:58:11_CEST [openHABian] Beginning install of latest openHAB3 release (stable)... OK
2021-09-30_19:58:11_CEST [openHABian] Adding required keys to apt... OK
2021-09-30_19:58:12_CEST [openHABian] Installing selected openHAB3 version... OK
2021-09-30_20:00:18_CEST [openHABian] Setting up openHAB service... OK
2021-09-30_20:00:20_CEST [openHABian] Optimizing openHAB to run on low memory single board computers... OK
2021-09-30_20:00:20_CEST [openHABian] Setting openHAB HTTP/HTTPS ports... OK
2021-09-30_20:00:20_CEST [openHABian] Creating dependencies to jointly start services that depend on each other... OK
2021-09-30_20:00:21_CEST [openHABian] Adding an openHAB dashboard tile for 'openhabiandocs'... OK
2021-09-30_20:00:21_CEST [openHABian] Restarting openHAB service to play it safe... OK
2021-09-30_20:00:21_CEST [openHABian] Getting initial openHAB configuration... SKIPPED (no config backup found at /boot/initial.zip)
2021-09-30_20:00:21_CEST [openHABian] Activating the openHAB console on all interfaces... OK
2021-09-30_20:00:21_CEST [openHABian] Adding openHAB syntax to vim editor... OK
2021-09-30_20:00:22_CEST [openHABian] Adding openHAB syntax to nano editor... OK
2021-09-30_20:00:22_CEST [openHABian] Adding openHAB scheme to multitail... OK
2021-09-30_20:00:22_CEST [openHABian] Preparing openHAB folder mounts under '/srv/openhab-*'... OK
2021-09-30_20:00:30_CEST [openHABian] Installing Samba... OK
2021-09-30_20:01:55_CEST [openHABian] Setting up Samba network shares... OK
2021-09-30_20:01:58_CEST [openHABian] Setting up Samba service... OK
/opt/openhabian/functions/helpers.bash: line 595: node: command not found
2021-09-30_20:02:04_CEST [openHABian] Installing Frontail prerequsites (NodeJS)... OK
/opt/openhabian/functions/nodejs-apps.bash: line 79: npm: command not found
2021-09-30_20:02:05_CEST [openHABian] Installing openHAB Log Viewer (frontail)... 2021-09-30_20:02:05_CEST [openHABian] Downloading frontail... OK
FAILED (install)
Failed to open terminal.e[1;24re[4le)0e[me[37me[40me[1;24re[He[Je[1;1He[35me[K
e[K
e[K
e[K
e[K
e[K
e[K
e[K
e[K
e[K
e[K
e[K
e[K
e[K
e[K
e[K
e[K
e[K
e[K
e[K
e[K
e[K
e[K
e[Ke[1;1He[8;1He[34m┌──────────────────────────┤ e[31mFrontail not installede[34m ├──────────────────────────┐e[9;1H│e[33m                                                                              e[34m│e[10;1H│e[33m e[36me[42mFrontail is not installed!                                                  e[33me[40m e[34m│e[11;1H│e[33m e[36me[42m                                                                            e[33me[40m e[34m│e[12;1H│e[33m e[36me[42mCanceling operation!                                                        e[33me[40m e[34m│e[13;1H│e[33m                                                                              e[34m│e[14;1H│e[33m                                    e[37me[41m<Ok>e[33me[40m                                      e[34m│e[15;1H│e[33m                                                                              e[34m│e[16;1H└──────────────────────────────────────────────────────────────────────────────┘e[17;2He[32me[Ke[14;39He[?25he[?0ce[24;1He[37me[me[39;49m
e[K
2021-09-30_20:02:12_CEST [openHABian] Installing zram... 2021-09-30_20:02:39_CEST [openHABian] Beginning Mail Transfer Agent setup... CANCELED (no configuration provided)
2021-09-30_20:02:39_CEST [openHABian] Applying file permissions recommendations... OK
2021-09-30_20:02:43_CEST [openHABian] Setting up automated SD mirroring and backup... SKIPPED (no configuration provided)
2021-09-30_20:02:43_CEST [openHABian] Cleaning up... OK
2021-09-30_20:03:13_CEST [openHABian] Execution of 'openhabian-config unattended' completed.
2021-09-30_20:03:13_CEST [openHABian] First time setup successfully finished. Rebooting your system!
2021-09-30_20:03:13_CEST [openHABian] After rebooting the openHAB dashboard will be available at: http://openhabian:8080
2021-09-30_20:03:13_CEST [openHABian] After rebooting to gain access to a console, simply reconnect using ssh.

There’s the error. It looks awfully like there is something corrupt in some way. Did you redownload the image before burning it?

No I used the image I had previously downloaded this week.

Is the original image affected in some way when flashing it to the SD ?

No but if there was something wrong with the image you downloaded a week ago burning that same image over and over again isn’t going to change the outcome.

The above doesn’t look like a run of the mill error. It looks like some files are corrupted. That happened either when the image was uploaded, when you downloaded it, or when you burned it to the SD card. There is a very remote possibility that the error is there is something physically wrong with the SD card too.

But this is mostly just theory.

Thank you for your help once again!

I re-downloaded the image once again, flashed it using a brand new SD card reader from Anker (good quality) using a brand new 16GO Sandisk micro-SD. Openhabian is being installed right now on the rPi3. I will report in some minutes/hours how it went this time.

Thanks!

I don’t get it… still the same error when trying to install Frontail on a brand new SD Card with a freshly downloaded image.

Is there any other way to visualize the log in real time like the Frontail offers?

Thanks!

Maybe. You can bring up a browser and open the page on port 9001, but I suspect that’s driven by Frontail too so it’s a chicken-and-egg problem.

But based on what you done you’ve eliminated some potential causes. It’s not likely to be caused by the SD card or a bad burn to the card.

We can’t eliminate the image hosted is corrupted, but that seems unlikely or else there would be others complaining I think.

There might be a problem with the source repo openHABian is pulling from. I don’t really know. I’ve reached the end of my ideas.

If I would install node-gyp I would get this:

aptitude -s install node-gyp 
The following NEW packages will be installed:
  gyp{a} javascript-common{a} libbrotli1{a} libc-ares2{a} libjs-inherits{a} libjs-is-typedarray{a} libnode-dev{a} libnode64{ab} libssl-dev{a} 
  libuv1-dev{a} node-abbrev{a} node-ajv{a} node-ansi-regex{a} node-aproba{a} node-are-we-there-yet{a} node-asn1{a} node-assert-plus{a} 
  node-asynckit{a} node-aws-sign2{a} node-aws4{a} node-balanced-match{a} node-bcrypt-pbkdf{a} node-brace-expansion{a} node-caseless{a} 
  node-chownr{a} node-clone{a} node-co{a} node-combined-stream{a} node-concat-map{a} node-console-control-strings{a} node-core-util-is{a} 
  node-dashdash{a} node-defaults{a} node-delayed-stream{a} node-delegates{a} node-ecc-jsbn{a} node-extend{a} node-extsprintf{a} 
  node-forever-agent{a} node-form-data{a} node-fs.realpath{a} node-gauge{a} node-getpass{a} node-glob{a} node-graceful-fs{a} node-gyp 
  node-har-schema{a} node-har-validator{a} node-has-unicode{a} node-http-signature{a} node-inflight{a} node-inherits{a} node-is-typedarray{a} 
  node-isexe{a} node-isstream{a} node-jsbn{a} node-json-schema{a} node-json-stable-stringify{a} node-json-stringify-safe{a} node-jsonify{a} 
  node-jsprim{a} node-mime-types{a} node-minimatch{a} node-mkdirp{a} node-node-uuid{a} node-nopt{a} node-npmlog{a} node-oauth-sign{a} 
  node-object-assign{a} node-once{a} node-osenv{a} node-path-is-absolute{a} node-performance-now{a} node-punycode{a} node-qs{a} 
  node-request{a} node-rimraf{a} node-safe-buffer{a} node-semver{a} node-set-blocking{a} node-signal-exit{a} node-sshpk{a} 
  node-string-width{a} node-strip-ansi{a} node-tar{a} node-tough-cookie{a} node-tunnel-agent{a} node-tweetnacl{a} node-uuid{a} node-verror{a} 
  node-wcwidth.js{a} node-which{a} node-wide-align{a} node-wrappy{a} node-yallist{a} python-pkg-resources{a} 
0 packages upgraded, 96 newly installed, 0 to remove and 0 not upgraded.
Need to get 8,588 kB of archives. After unpacking 33.8 MB will be used.
The following packages have unmet dependencies:
 libnode64 : Conflicts: nodejs-legacy which is a virtual package, provided by:
                        - nodejs (14.18.0-deb-1nodesource1), but 14.18.0-deb-1nodesource1 is installed

The following actions will resolve these dependencies:

     Keep the following packages at their current version:
1)     libnode-dev [Not Installed]                        
2)     libnode64 [Not Installed]                          
3)     node-gyp [Not Installed]                           



Accept this solution? [Y/n/q/?]

I am on openhabian-config recommended branch OPENHAB3.
To me that looks similar to what the OP posted just that in my case node-gyp is not installed and in his case it seems to be requested.

What’s aptitude? Doesn’t look installed either :

openhabian@openhabian:~ $ aptitude -s install node-gyp
-bash: aptitude: command not found
openhabian@openhabian:~ $

Very strange that this happens even on a brand new image. Could the rPi3 corrupt something on the image?

sorry, that’s an alternative to apt. I am used to use aptitude but also could have used apt.

Whenever I try to install node-gyp, it says I’m missing libnode-dev.
After installing libnode-dev, I still get the same error message :

openhabian@openhabian:~ $ sudo apt -s install node-gyp
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 node-gyp : Depends: libnode-dev but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
openhabian@openhabian:~ $ sudo apt -s install libnode-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
  libbrotli1 libc-ares2 libnode64 libssl-dev libssl1.1 libuv1 libuv1-dev
Suggested packages:
  libssl-doc
The following NEW packages will be installed:
  libbrotli1 libc-ares2 libnode-dev libnode64 libssl-dev libuv1 libuv1-dev
The following packages will be upgraded:
  libssl1.1
1 upgraded, 7 newly installed, 0 to remove and 30 not upgraded.
Inst libbrotli1 (1.0.7-2+deb10u1 Raspbian:stable [armhf])
Inst libc-ares2 (1.14.0-1 Raspbian:stable [armhf])
Inst libssl1.1 [1.1.1d-0+deb10u4+rpt1] (1.1.1d-0+deb10u6+rpt1 Raspberry Pi Foundation:testing [armhf])
Inst libssl-dev (1.1.1d-0+deb10u6+rpt1 Raspberry Pi Foundation:testing [armhf])
Inst libuv1 (1.24.1-1 Raspbian:stable [armhf])
Inst libuv1-dev (1.24.1-1 Raspbian:stable [armhf])
Inst libnode64 (10.23.1~dfsg-1~deb10u1 Raspbian:stable [armhf])
Inst libnode-dev (10.23.1~dfsg-1~deb10u1 Raspbian:stable [armhf])
Conf libbrotli1 (1.0.7-2+deb10u1 Raspbian:stable [armhf])
Conf libc-ares2 (1.14.0-1 Raspbian:stable [armhf])
Conf libssl1.1 (1.1.1d-0+deb10u6+rpt1 Raspberry Pi Foundation:testing [armhf])
Conf libssl-dev (1.1.1d-0+deb10u6+rpt1 Raspberry Pi Foundation:testing [armhf])
Conf libuv1 (1.24.1-1 Raspbian:stable [armhf])
Conf libuv1-dev (1.24.1-1 Raspbian:stable [armhf])
Conf libnode64 (10.23.1~dfsg-1~deb10u1 Raspbian:stable [armhf])
Conf libnode-dev (10.23.1~dfsg-1~deb10u1 Raspbian:stable [armhf])
openhabian@openhabian:~ $ sudo apt -s install node-gyp
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 node-gyp : Depends: libnode-dev but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
openhabian@openhabian:~ $ sudo apt -s install libnode-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
  libbrotli1 libc-ares2 libnode64 libssl-dev libssl1.1 libuv1 libuv1-dev
Suggested packages:
  libssl-doc
The following NEW packages will be installed:
  libbrotli1 libc-ares2 libnode-dev libnode64 libssl-dev libuv1 libuv1-dev
The following packages will be upgraded:
  libssl1.1
1 upgraded, 7 newly installed, 0 to remove and 30 not upgraded.
Inst libbrotli1 (1.0.7-2+deb10u1 Raspbian:stable [armhf])
Inst libc-ares2 (1.14.0-1 Raspbian:stable [armhf])
Inst libssl1.1 [1.1.1d-0+deb10u4+rpt1] (1.1.1d-0+deb10u6+rpt1 Raspberry Pi Foundation:testing [armhf])
Inst libssl-dev (1.1.1d-0+deb10u6+rpt1 Raspberry Pi Foundation:testing [armhf])
Inst libuv1 (1.24.1-1 Raspbian:stable [armhf])
Inst libuv1-dev (1.24.1-1 Raspbian:stable [armhf])
Inst libnode64 (10.23.1~dfsg-1~deb10u1 Raspbian:stable [armhf])
Inst libnode-dev (10.23.1~dfsg-1~deb10u1 Raspbian:stable [armhf])
Conf libbrotli1 (1.0.7-2+deb10u1 Raspbian:stable [armhf])
Conf libc-ares2 (1.14.0-1 Raspbian:stable [armhf])
Conf libssl1.1 (1.1.1d-0+deb10u6+rpt1 Raspberry Pi Foundation:testing [armhf])
Conf libssl-dev (1.1.1d-0+deb10u6+rpt1 Raspberry Pi Foundation:testing [armhf])
Conf libuv1 (1.24.1-1 Raspbian:stable [armhf])
Conf libuv1-dev (1.24.1-1 Raspbian:stable [armhf])
Conf libnode64 (10.23.1~dfsg-1~deb10u1 Raspbian:stable [armhf])
Conf libnode-dev (10.23.1~dfsg-1~deb10u1 Raspbian:stable [armhf])

I even tried images 1.6.4 and 1.6.3 and I’m exactly at the same point… no frontail install possible…

What is going on?