Yes, that works fine. Currently my only way to see the logs. There is a lot happening in my openhab installation, so there should something to see in frontail
I am encountering the same problem. Unfortunately, I do not have a solution, either. Log-Files are filled properly and Frontail is running. I am getting the same error on the frontend (i.e. in the browser) that is described in the first post. It seems to me that the browser interface is not able to fetch the log files from the backend as the websocket request is denied with error code 400. Looks like there is a misconfiguration of the communication between frontend and backend.
I did a fresh install of openhabian today to practice a little on the auto backup process and have encountered the same thing, no front tail activity.
I did the restart & status of front tail.
There is output if I do, sudo tail /var/log/openhab/openhab.log
I thought it was something I did, so I started a second time with openhabian 1.6.2.b with the same outcome. Interestingly the front tail in the new openhabian I set up last week for migration works fine with output.
I checked for ( linux ) system updates and openhabian-config ( openhab3 branch ) updates and installed both and also reinstalled frontail.
Here it is running so far.
Only during a reboot of the machine that hosts openhab I see the socket error message. Once it is up and frontail service is running again the messages are being displayed again.
I did some further research and debugging and I found a workaround that works for me at least.
The received error message used to be a common and known bug in Frontail. This especially holds for setups using NGINX if I understood correctly. See Fix websocket error during handshake (#195) · mthenw/frontail@0aad9dd · GitHub. As the comment on the commit suggests this might have broken other setups, which we are encountering right now.
Funny thing is that this version is quite old already (Feb 19th, 2020) and it is already used in my openhabian installation using OH 2.5, which works just fine. Hence, there seems to be some kind of incompatability with the current openhabian release.
Reverting above change did the trick for me for my OH 3.0 openhabian installation.
This is the procedure that worked for me:
Go to your frontail installation and there into the web directory (/usr/lib/node_modules/frontail/web - for openhabian default installation)
Edit the index.html
Quite at the end there is a javascript block including the following lines
var socket = new io.connect('/__NAMESPACE__', {
path: '__PATH__/socket.io',
transports: ['websocket']
});
Change this part to (i.e. remove the second parameter, do not forget about the comma)
var socket = new io.connect('/__NAMESPACE__', {
path: '__PATH__/socket.io'
});
Restart the Frontail service
After I did that Frontail worked again for me.
I am not sure whether this “fix” could or even should be integrated into the openhabian release since it also seems to be working for some people. Maybe one of the people for whom frontail is working from scratch could try if this change breaks it in their environment. Nevertheless, I would be interested if this works for the other affected users.
Just did a fresh install with 1.6.2, so the issue seems to occur not only with 1.6.2b. I’m not using nginx, too with my fresh install, so obviously something else has changed between 2.5 and 3.0.
Thanks @mischateeh, removing the line worked! At least a good workaround, but a fix from Openhab side is not possible here.