Webinterface not running. Jack2.service failed?

Hello, brand new user here.

Just got my Raspberry pi 5, downloaded the image from the front page.
I can access zynthian via ssh.
I can see something is running on port 8099, but nothing on 80 or 443. Filebrowser?

ss -tuln
Netid              State               Recv-Q              Send-Q                            Local Address:Port                              Peer Address:Port              Process
udp                UNCONN              0                   0                                       0.0.0.0:53324                                  0.0.0.0:*
udp                UNCONN              0                   0                                       0.0.0.0:5353                                   0.0.0.0:*
udp                UNCONN              0                   0                                             *:33937                                        *:*
udp                UNCONN              0                   0                                             *:5353                                         *:*
tcp                LISTEN              0                   128                                     0.0.0.0:22                                     0.0.0.0:*
tcp                LISTEN              0                   128                                        [::]:22                                        [::]:*
tcp                LISTEN              0                   4096                                          *:8099                                         *:*

Log from webconf:

Dec 16 19:36:15 zynthian systemd[1]: Stopping zynthian-webconf.service - Zynthian Webconf...
Dec 16 19:36:15 zynthian systemd[1]: zynthian-webconf.service: Deactivated successfully.
Dec 16 19:36:15 zynthian systemd[1]: Stopped zynthian-webconf.service - Zynthian Webconf.
Dec 16 19:36:15 zynthian systemd[1]: zynthian-webconf.service: Consumed 1.499s CPU time.
Dec 16 19:36:15 zynthian systemd[1]: Started zynthian-webconf.service - Zynthian Webconf.
Dec 16 19:36:15 zynthian zynthian_webconf.sh[9336]: ----------------------------------------------
Dec 16 19:36:15 zynthian zynthian_webconf.sh[9336]: Linux Version: bookworm
Dec 16 19:36:15 zynthian zynthian_webconf.sh[9336]: Kernel Version: 6.12.61-v8-16k+
Dec 16 19:36:15 zynthian zynthian_webconf.sh[9336]: ZynthianOS Version: 2511
Dec 16 19:36:15 zynthian zynthian_webconf.sh[9336]: Virtualization: none
Dec 16 19:36:15 zynthian zynthian_webconf.sh[9336]: Hardware Architecture: aarch64
Dec 16 19:36:15 zynthian zynthian_webconf.sh[9336]: Hardware Model: Raspberry Pi 5 Model B Rev 1.0
Dec 16 19:36:15 zynthian zynthian_webconf.sh[9336]: ----------------------------------------------
Dec 16 19:36:15 zynthian zynthian_webconf.sh[9359]: INFO:root:ZYNTHIAN-UI CONFIG ...
Dec 16 19:36:15 zynthian zynthian_webconf.sh[9359]: INFO:root:Kit Version: Custom
Dec 16 19:36:15 zynthian zynthian_webconf.sh[9359]: INFO:root:No Wiring Layout configured. Only touch interface is available.
Dec 16 19:36:15 zynthian zynthian_webconf.sh[9359]: Cannot connect to server socket err = No such file or directory
Dec 16 19:36:15 zynthian zynthian_webconf.sh[9359]: Cannot connect to server request channel
Dec 16 19:36:15 zynthian zynthian_webconf.sh[9359]: jack server is not running or cannot be started

Can it not start if jack is not started?

Dec 16 19:37:06 zynthian systemd[1]: jack2.service: Scheduled restart job, restart counter is at 580.
Dec 16 19:37:06 zynthian systemd[1]: Stopped jack2.service - JACK2 Audio Server.
Dec 16 19:37:06 zynthian systemd[1]: Started jack2.service - JACK2 Audio Server.
Dec 16 19:37:06 zynthian jackd[9690]: jackdmp 1.9.21
Dec 16 19:37:06 zynthian jackd[9690]: Copyright 2001-2005 Paul Davis and others.
Dec 16 19:37:06 zynthian jackd[9690]: Copyright 2004-2016 Grame.
Dec 16 19:37:06 zynthian jackd[9690]: Copyright 2016-2022 Filipe Coelho.
Dec 16 19:37:06 zynthian jackd[9690]: jackdmp comes with ABSOLUTELY NO WARRANTY
Dec 16 19:37:06 zynthian jackd[9690]: This is free software, and you are welcome to redistribute it
Dec 16 19:37:06 zynthian jackd[9690]: under certain conditions; see the file COPYING for details
Dec 16 19:37:06 zynthian jackd[9690]: JACK server starting in realtime mode with priority 70
Dec 16 19:37:06 zynthian jackd[9690]: self-connect-mode is "Don't restrict self connect requests"
Dec 16 19:37:06 zynthian jackd[9690]: creating alsa driver ... hw:0|hw:0|512|3|48000|0|2|nomon|swmeter|-|32bit
Dec 16 19:37:06 zynthian jackd[9690]: Failed to open server
Dec 16 19:37:06 zynthian systemd[1]: jack2.service: Main process exited, code=exited, status=255/EXCEPTION
Dec 16 19:37:06 zynthian systemd[1]: jack2.service: Failed with result 'exit-code'.
 aplay -l
**** List of PLAYBACK Hardware Devices ****
card 1: X2 [XONE 96 USB 2], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

Anything I did wrong?

Thank you for your time.

Correct - Zynthian won’t start without JACK running. Do you have an audio device?

Yes

But maybe I have to adjust the jack config to the device config before startup?

ok, a bit further.

I changed /etc/systemd/system/jack2.service to use the device plughw:X2

/usr/bin/jackd -P 70 -s -S -d alsa -d plughw:X2 -r 48000 -o 2 -p 512 -n 3 -X raw

Now jack starts.

Restarting zythian-webconf gets a new error

Dec 16 21:23:29 zynthian zynthian_webconf.sh[52651]: INFO:root:ZYNTHIAN-UI CONFIG ...
Dec 16 21:23:29 zynthian zynthian_webconf.sh[52651]: INFO:root:Kit Version: Custom
Dec 16 21:23:29 zynthian zynthian_webconf.sh[52651]: INFO:root:No Wiring Layout configured. Only touch interface is available.
Dec 16 21:23:34 zynthian zynthian_webconf.sh[52651]: Cannot read socket fd = 9 err = Success
Dec 16 21:23:34 zynthian zynthian_webconf.sh[52651]: CheckRes error
Dec 16 21:23:34 zynthian zynthian_webconf.sh[52651]: JackSocketClientChannel read fail
Dec 16 21:23:34 zynthian zynthian_webconf.sh[52651]: Cannot open audioplayer client
Dec 16 21:23:34 zynthian zynthian_webconf.sh[52651]: JackShmReadWritePtr1::~JackShmReadWritePtr1 - Init not done for -1, skipping unlock
Dec 16 21:23:34 zynthian zynthian_webconf.sh[52651]: JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
Dec 16 21:23:34 zynthian zynthian_webconf.sh[52651]: JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
Dec 16 21:23:34 zynthian zynthian_webconf.sh[52651]: libaudioplayer error: failed to start jack client: 33
Dec 16 21:23:34 zynthian zynthian_webconf.sh[52651]: libzynaudioplayer failed to initialise jack client
Dec 16 21:23:34 zynthian zynthian_webconf.sh[52651]: Started libzynaudioplayer using libsndfile-1.2.0
Dec 16 21:23:34 zynthian zynthian_webconf.sh[52651]: INFO:root:Supported Audio Codecs: ['aiff', 'aifc', 'au', 'caf', 'flac', 'mp3', 'vox', 'opus', 'ogg', 'wav']
Dec 16 21:23:34 zynthian zynthian_webconf.sh[52651]: INFO:root:RBPi Device Name: ''
Dec 16 21:23:34 zynthian zynthian_webconf.sh[52651]: Can't init minimal zyncore library: /zynthian/zyncoder/build/libzyncore.so: cannot open shared object file: No such file or directory
Dec 16 21:23:34 zynthian zynthian_webconf.sh[52651]: Traceback (most recent call last):
Dec 16 21:23:34 zynthian zynthian_webconf.sh[52651]:   File "/zynthian/zynthian-webconf/./zynthian_webconf.py", line 46, in <module>
Dec 16 21:23:34 zynthian zynthian_webconf.sh[52651]:     from lib.midi_log_handler import MidiLogHandler
Dec 16 21:23:34 zynthian zynthian_webconf.sh[52651]:   File "/zynthian/zynthian-webconf/lib/midi_log_handler.py", line 31, in <module>
Dec 16 21:23:34 zynthian zynthian_webconf.sh[52651]:     from lib.midi_config_handler import get_ports_config
Dec 16 21:23:34 zynthian zynthian_webconf.sh[52651]:   File "/zynthian/zynthian-webconf/lib/midi_config_handler.py", line 36, in <module>
Dec 16 21:23:34 zynthian zynthian_webconf.sh[52651]:     from zyngui.zynthian_gui import zynthian_gui
Dec 16 21:23:34 zynthian zynthian_webconf.sh[52651]:   File "/zynthian/zynthian-ui/zyngui/zynthian_gui.py", line 46, in <module>
Dec 16 21:23:34 zynthian zynthian_webconf.sh[52651]:     from zyngine import zynthian_state_manager
Dec 16 21:23:34 zynthian zynthian_webconf.sh[52651]:   File "/zynthian/zynthian-ui/zyngine/zynthian_state_manager.py", line 50, in <module>
Dec 16 21:23:34 zynthian zynthian_webconf.sh[52651]:     from zyngine.zynthian_chain_manager import *
Dec 16 21:23:34 zynthian zynthian_webconf.sh[52651]:   File "/zynthian/zynthian-ui/zyngine/zynthian_chain_manager.py", line 51, in <module>
Dec 16 21:23:34 zynthian zynthian_webconf.sh[52651]:     NUM_ZMOP_CHAINS = lib_zyncore.zmop_get_num_chains()
Dec 16 21:23:34 zynthian zynthian_webconf.sh[52651]:                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Dec 16 21:23:34 zynthian zynthian_webconf.sh[52651]: AttributeError: 'NoneType' object has no attribute 'zmop_get_num_chains'
Dec 16 21:23:34 zynthian zynthian_webconf.sh[52651]: libzynaudioplayer exiting...  done!
Dec 16 21:23:34 zynthian systemd[1]: zynthian-webconf.service: Main process exited, code=exited, status=1/FAILURE
Dec 16 21:23:34 zynthian systemd[1]: zynthian-webconf.service: Failed with result 'exit-code'.

Also tried with another sound card:

aplay -L
null
    Discard all samples (playback) or generate zero samples (capture)
hw:CARD=T6,DEV=0
    Traktor Audio 6, USB Audio
    Direct hardware device without any conversions
plughw:CARD=T6,DEV=0
    Traktor Audio 6, USB Audio
    Hardware device with all software conversions
default:CARD=T6
    Traktor Audio 6, USB Audio
    Default Audio Device
sysdefault:CARD=T6
    Traktor Audio 6, USB Audio
    Default Audio Device
front:CARD=T6,DEV=0
    Traktor Audio 6, USB Audio
    Front output / input
surround21:CARD=T6,DEV=0
    Traktor Audio 6, USB Audio
    2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=T6,DEV=0
    Traktor Audio 6, USB Audio
    4.0 Surround output to Front and Rear speakers
surround41:CARD=T6,DEV=0
    Traktor Audio 6, USB Audio
    4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=T6,DEV=0
    Traktor Audio 6, USB Audio
    5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=T6,DEV=0
    Traktor Audio 6, USB Audio
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=T6,DEV=0
    Traktor Audio 6, USB Audio
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=T6,DEV=0
    Traktor Audio 6, USB Audio
    IEC958 (S/PDIF) Digital Audio Output
dmix:CARD=T6,DEV=0
    Traktor Audio 6, USB Audio
    Direct sample mixing device

hw:T6 did not work, so I also tried plughw:T6. Again jack starts but the web view crashes.

If I open up alsamixer there are no input or output controls at all for my sounds devices.

That is odd, no?

Are you running Zynthian headless (without a display)? If yes, plug in a normal HDMI monitor first. That makes it much easier to troubleshoot the sound card. The last time I did this on an RPi 5, I had to boot with an HDMI monitor and a USB audio interface. Only after everything was working could I switch to a GPIO-connected ZynScreen. When I started directly with the ZynScreen + USB audio interface setup, I couldn’t even reach Webconf.

2 Likes

Yes, totally headless, just pi and soundcard. Will try that tomorrow, thank you.

1 Like

Another tip: use HDMI port 0 — the one next to the USB ports.

3 Likes

Yes, it works now. I had to connect a monitor, change the jackd thing to plughw:T6 and then the webinterface started working.
Started the VNC now.
Now I can also start up without display.

Will test if it also starts with a different audio interface connected.

Thank you for your help.

Edit: Now it also works with defualt hw:0 .. huh?

1 Like

Hi @lord-carlos and @ToFF !

The web interface shouldn’t need jackd to work.
There is an issue with a library that is preventing this to work correctly, but it’s already fixed in testing branch (Vangelis). I will merge the fix into Oram ASAP.

Thanks for reporting!

Right - That’s because the numbers of the USB devices assigned at startup are unpredictable, so if you use them it will sometimes work, sometimes not. Giving the device a name and using that makes it reliable.

1 Like