openHAB Log Viewer (frontail) - websocket errors in browser console

Fresh openhab3 install on PI4 (openhabian-pi-raspios32-v1.6.2b.img)
http://192.168.2.238:9001/ shows the logviewer UI, no errors in the UI and the orange top bar is there. But no logging is shown.

The F12 developer tools, console shows the same error on every refresh (same in chrome, edge and IE)
(repeating:) index.js:83 WebSocket connection to ‘ws://192.168.2.238:9001/socket.io/?EIO=3&transport=websocket’ failed: Error during WebSocket handshake: Unexpected response code: 400

running the tail (copied from the logviewer header bar) command direct on the pi works as expected - showing the logs
tail -f /var/log/openhab/openhab.log /var/log/openhab/events.log

Does frontail run?
What does sudo service frontail status show?

It should look similar to this:

● frontail.service - Frontail openHAB instance, reachable at http://openhab:9001
   Loaded: loaded (/etc/systemd/system/frontail.service; enabled; vendor preset: enabled)
   Active: active (running) since Sun 2020-12-27 21:52:10 CET; 1 weeks 3 days ago
     Docs: https://github.com/mthenw/frontail
           https://github.com/openhab/openhabian/issues/28
 Main PID: 17500 (node)
    Tasks: 12 (limit: 4915)
   CGroup: /system.slice/frontail.service
           ├─17500 node /usr/lib/node_modules/frontail/bin/frontail --ui-highlight --ui-highlight-preset /usr/lib/node_modules/frontail/preset/openhab.json -l 10000 -n 300 -t dark /var/log/openhab2/openhab.log /var/log/openhab2/events.log
           └─17520 tail -n 300 -F /var/log/openhab2/openhab.log /var/log/openhab2/events.log

Dez 27 21:52:10 openhab systemd[1]: Started Frontail openHAB instance, reachable at http://openhab:9001.
Dez 28 07:34:31 openhab frontail[17500]: tail: '/var/log/openhab2/events.log' ist aufgetaucht;  folge der neuen Datei

[23:07:29] openhabian@openHABianDevice:~$ sudo service frontail status

● frontail.service - Frontail openHAB instance, reachable at http://openHABianDevice:9001
Loaded: loaded (/etc/systemd/system/frontail.service; enabled; vendor preset: enabled)
Active: active (running) since Wed 2021-01-06 21:38:31 CET; 1h 31min ago
Docs: GitHub - mthenw/frontail: 📝 streaming logs to the browser
Main PID: 443 (node)
Tasks: 12 (limit: 4915)
CGroup: /system.slice/frontail.service
├─443 node /usr/lib/node_modules/frontail/bin/frontail --ui-highlight --ui-highlight-preset /usr/lib/node_modules/frontail/preset/openhab.json -t openhab -l 2000 -n 200 /var/l
└─637 tail -n 200 -F /var/log/openhab/openhab.log /var/log/openhab/events.log

Jan 06 21:38:31 openHABianDevice systemd[1]: Started Frontail openHAB instance, reachable at http://openHABianDevice:9001.
Jan 06 21:38:45 openHABianDevice frontail[443]: tail: ‘/var/log/openhab/openhab.log’ has become inaccessible
Jan 06 21:38:45 openHABianDevice frontail[443]: : No such file or directory
Jan 06 21:38:45 openHABianDevice frontail[443]: tail: ‘/var/log/openhab/openhab.log’ has appeared; following new file
Jan 06 21:38:45 openHABianDevice frontail[443]: tail: ‘/var/log/openhab/events.log’ has become inaccessible: No such file or directory
Jan 06 21:38:45 openHABianDevice frontail[443]: tail: ‘/var/log/openhab/events.log’ has appeared; following new file
lines 1-16/16 (END)

This seems to be looking alright. Did you try restarting frontail with sudo service frontail restart or rebooting the server?

Could be that this [OH3] Frontail no longer displays after new installation · Issue #1383 · openhab/openhabian · GitHub
is the problem.

Check which version of socket.io is installed.

I shutdown and restarted the pi a number of times, but no change.
I noticed there was nothing to see in the browser (except from the top bar) directly after install. I’m using OH3 on a Pi3 and know that the logviewer webservice is started before there’s anything to see on port 8080, so i mostly open the logviewer in my browser when waiting for a restart to finish.

See

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.