Web interface won't load

I’ve just rebuilt my custom zynthian from a new image downloaded yesterday. The web interface doesn’t load, or takes a long time. Are there any logs I can check to figure this out? And is there a way to restart it from command line? While waiting the Zynthian is accessible via VNC and I can navigate the Zynthian UI as normal.

Webconf offers the GUI log under Interfaces

that reports the sort of issues you might experience.

Hmm, could be unrelated, but I have this when my DNS acts up for some reason, never had this on the PI 3, but my PI 5 likes giving me DNS issues.

When it can’t reach the webconfig page or takes a long time, maybe check if you can actually reach it my name by pinging the device?

ping zynthian from a terminal

If it can’t find it, it likely can’t resolve it by name.

Workaround for me is to then switch to the IP address assigned by the router for both CLI SSH access and even the Web UI.

I have not had time to dig into why this happens.

@wyleu Do you know where the physical logs for that page is stored on the zynthian OS? Maybe that can help debug if @3tree cannot access the UI but can ssh into the system?

yes that’s what I need - access to the logs on the device. I can vnc and access by terminal, it’s just the web ui doesn’t load, or is slow to do so. I typically use the ip (which is fixed) because zynthian.local wasn’t working and I hadn’t bothered to figure out why and forgotten about it. Or likely now it’s part of the same issue.

Maybe start here, the Wiki suggests a few ways to access the system without the webconfig

Command Line User Guide - ZynthianWiki

Also this topic:

Log file and level - Development - Zynthian Discourse

@3tree : This seems to be the one you are looking for journalctl -u zynthian-webconf

You can tail it if you want to see the last few lines output instead of scrolling through the whole log as well

1 Like

Here’s the log from the point where I re-opened the web ui and it took a couple of minutes or so to appear…

Feb 28 09:33:42 zynthian zynthian_webconf.sh[841]: WARNING:tornado.access:404 GET /apple-touch-icon-precomposed.png (fe80::104f:e545:bb33:88ed) 0.49ms
Feb 28 09:33:42 zynthian zynthian_webconf.sh[841]: WARNING:tornado.access:404 GET /apple-touch-icon.png (fe80::104f:e545:bb33:88ed) 0.42ms
Feb 28 09:33:42 zynthian zynthian_webconf.sh[841]: INFO:tornado.access:200 GET /favicon.ico (fe80::104f:e545:bb33:88ed) 2.11ms
Feb 28 09:33:42 zynthian zynthian_webconf.sh[841]: INFO:tornado.access:200 GET /img/favicon_196.png (fe80::104f:e545:bb33:88ed) 2.62ms
Feb 28 09:33:42 zynthian zynthian_webconf.sh[841]: INFO:tornado.access:200 GET /img/favicon.ico (fe80::104f:e545:bb33:88ed) 0.56ms
Feb 28 09:33:42 zynthian zynthian_webconf.sh[841]: INFO:tornado.access:200 GET /img/favicon_180.png (fe80::104f:e545:bb33:88ed) 1.04ms
Feb 28 09:33:44 zynthian zynthian_webconf.sh[841]: DEBUG:root:Loaded engine config with timestamp: 1740608598.994155
Feb 28 09:33:44 zynthian zynthian_webconf.sh[841]: INFO:tornado.access:304 GET /zynterm (fe80::104f:e545:bb33:88ed) 49.45ms
Feb 28 09:33:45 zynthian zynthian_webconf.sh[841]: INFO:tornado.access:101 GET /zynterm_ws (fe80::104f:e545:bb33:88ed) 0.52ms
Feb 28 09:33:45 zynthian zynthian_webconf.sh[841]: INFO:terminado.websocket:TermSocket.open: None
Feb 28 09:33:45 zynthian zynthian_webconf.sh[841]: INFO:terminado.websocket:TermSocket.open: Opened tty
Feb 28 09:33:47 zynthian zynthian_webconf.sh[841]: INFO:terminado.websocket:Websocket closed
Feb 28 09:33:52 zynthian zynthian_webconf.sh[841]: DEBUG:root:Loaded engine config with timestamp: 1740608598.994155
Feb 28 09:35:46 zynthian zynthian_webconf.sh[841]: DEBUG:root:Build info => Timestamp: 2024-10-02
Feb 28 09:35:46 zynthian zynthian_webconf.sh[841]: DEBUG:root:LV2 presets => 27
Feb 28 09:35:46 zynthian zynthian_webconf.sh[841]: DEBUG:root:Pianoteq presets => 0
Feb 28 09:35:46 zynthian zynthian_webconf.sh[841]: DEBUG:root:Puredata presets => 0
Feb 28 09:35:46 zynthian zynthian_webconf.sh[841]: DEBUG:root:ZynAddSubFX presets => 0
Feb 28 09:35:46 zynthian zynthian_webconf.sh[841]: INFO:tornado.access:200 GET / (fe80::104f:e545:bb33:88ed) 114858.88ms
Feb 28 09:35:47 zynthian zynthian_webconf.sh[841]: DEBUG:root:Loaded engine config with timestamp: 1740608598.994155
Feb 28 09:35:47 zynthian zynthian_webconf.sh[841]: INFO:tornado.access:200 GET /zynterm (fe80::104f:e545:bb33:88ed) 49.86ms
Feb 28 09:35:47 zynthian zynthian_webconf.sh[841]: DEBUG:root:Loaded engine config with timestamp: 1740608598.994155
Feb 28 09:35:47 zynthian zynthian_webconf.sh[841]: INFO:tornado.access:304 GET /zynterm (fe80::104f:e545:bb33:88ed) 101.75ms
Feb 28 09:35:47 zynthian zynthian_webconf.sh[841]: INFO:terminado.websocket:Websocket closed
Feb 28 09:35:47 zynthian zynthian_webconf.sh[841]: INFO:tornado.access:101 GET /zynterm_ws (fe80::104f:e545:bb33:88ed) 0.51ms
Feb 28 09:35:47 zynthian zynthian_webconf.sh[841]: INFO:terminado.websocket:TermSocket.open: None
Feb 28 09:35:47 zynthian zynthian_webconf.sh[841]: INFO:terminado.websocket:TermSocket.open: Opened tty

Seems like a fairly long time for this to return 200, could be the culprit (or just a symptom of an underlaying issue) if the loading on this call is supposed to return faster

anything more I can do, or explore, or are we dependent on insights from zynthian experts?!

Think we are going to have to ask for some insights from the experts.

@wyleu Anything you think we can look into?

Also, one more thing to maybe help debug it…

What are your hardware specs on your custom build?

Also, if you turn off VNC, does the problem go away? (Shot in the dark)

It’s an 8gb Raspberry Pi 5 Model B Rev 1.0. I tried turning off VNC, no change. I recall this happened a while ago but I dropped it when I didn’t get anywhere. Anyway, an odd workaround - if I disconnect the power (via the pin header) to the touch screen, it fixes it. So not a practical fix, but might point to a solution?

journalctl -fu zynthian

will show you zynthian events.

journalctl -fu zynthian-webconf

Does similarly for the separate webconf instance.

journalctl has many many options for log analysis.
The most effective way of isolating a webconf problem, is to shut dwon the systemd zynthian-webconf service…

systemctl stop zynthian-webconf

This will stop the auto restart mechansism. Then we want to run the webconf instance from the command line so…

cd /zynthian/zynthian-webconf/

Then start the shell script…

. zynthian_webconf.sh

Make sure to add the . and the space…

You should see the error that holding it all up…

Thanks for the info, here’s the response to running the shell script…

root@zynthian:/zynthian/zynthian-webconf# . zynthian_webconf.sh
Traceback (most recent call last):
File “/zynthian/zynthian-webconf/./zynthian_webconf.py”, line 32, in
import tornado.web
ModuleNotFoundError: No module named ‘tornado’
root@zynthian:/zynthian/zynthian-webconf#

I would expect that to be running within a virtual window …

Do you have (venv) at the start of the line?

Tornado is a core component so should be there, but it you are running outside of the virtual environment that zynthian uses then you will not find tornado…

It sounds like you aren’t running within a python virtual environment.

The zynthian is predominantly written in the python language, and python allows you to load modules that add functionality. tornado, is one among many. It is a web framework that operates a web server that zynthian use to display its web based configuration page.

There is a problem when running multiple modules, because there are subtle differences between versions of modules that can conflict.

To address this python allows the construction of code environments that offer specific complete versions of modules. A so called virtual environment where python gets to see a carefully prescribed list of specified modules of known version.

It’s a good thing.

You can tell that the virtual environment is running when you log in via ssh is the prompt
(venv) root@zynthian-rack6:~#

IF you aren’t running the virtual environment, for some reason, than that would behave that way. But it could be a red herring.

ah ok, no there is no (venv) prefix when I ssh to the terminal session.

It’s definitely impeded by the touch screen though. On reboot just now I opened the web ui and waited whilst it loaded, after a minute whilst waiting I unplugged the screen and the second I did the ui popped up.

Is there anything else in can check? And @wyleu how do I run it inside a virtual window?

What version of zynthian are you running? Did you install oram from a downloaded image? (Lack of venv is very suspisious.) Is it any part of webconf that is slow or just certain pages?

Here’s the s/w details from webconf…

zyncoder: oram-2502.1 (092fb26)
zynthian-ui: oram-2502.1 (e48c01b)
zynthian-sys: oram-2502.1 (a0a0ac5)
zynthian-data: oram-2502.1 (10f663b)
zynthian-webconf: oram-2502.1 (9e5e062)

I did a fresh install this week, downloading the image, installing via the raspberry pi imager because etcher kept crashing at 100%.

Since the above, I’ve left the touchscreen unplugged and webconf now loads and runs v quickly. With the screen connected, it’s slow to load but then responds ok once loaded.

I’m not clear on venv - when I connect to the command line as root, should I just see (venv) at the start of the prompt, by default, or is there a way you connect to access that?

Yes. It should look after itself, which is why I was, keen to find out if you were running a venv. We could just be confused, but it would explain your ability to not load tornado in this instance, but this could distract from the real problem.