ElvishArtisan / rivendell

A full-featured radio automation system targeted for use in professional broadcast and media environments
196 stars 63 forks source link

Rivendell 4 and JACK #973

Open deltecent opened 2 weeks ago

deltecent commented 2 weeks ago

Ubuntu 22.04 LTS

I am trying to get Rivendell 4 to start the jackd server. I have the following configuration in RDAdmin->JACK Settings:

Start JACK Sever: Checked JACK Server Name: (default) JACK Command Line: /usr/bin/jackd -d dummy Active Audio Ports: 8

When I restart rivendell, I get the following in the log file:

Jun 16 16:23:52 rivendell caed: JACK server started
Jun 16 16:23:53 rivendell caed: unable to communicate with JACK server
Jun 16 16:23:53 rivendell caed: JACK general failure
Jun 16 16:23:53 rivendell caed: no connection to JACK server
Jun 16 16:23:57 rivendell ripcd: unable to communicate with JACK server
Jun 16 16:23:57 rivendell ripcd: JACK general failure
Jun 16 16:23:57 rivendell ripcd: no connection to JACK server

cae is starting jackd, but it can't connect to it and subsequently kills it.

If I run caed from the command line, it also fails:

root@rivendell:/home/rd#export JACK_PROMISCUOUS_SERVER=audio
root@rivendell:/home/rd# /usr/sbin/caed
HPI_DriverOpen error: No such file or directory
Cannot connect to server socket err = Connection refused
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
unable to communication with JACK server
JACK general failure
no connection to JACK server
QProcess: Destroyed while process ("/usr/bin/jackd") is still running.

If I eliminate export JACK_PROMISCUOUS_SERVER=audio, it works:

root@rivendell:/home/rd# export JACK_PROMISCUOUS_SERVER=
root@rivendell:/home/rd# /usr/sbin/caed
HPI_DriverOpen error: No such file or directory

If I run the same command on the command line, it works:

root@rivendell:/home/rd/rivendell/cae# export JACK_PROMISCUOUS_SERVER=audio
root@rivendell:/home/rd/rivendell/cae# /usr/bin/jackd -d dummy
jackdmp 1.9.20
Copyright 2001-2005 Paul Davis and others.
Copyright 2004-2016 Grame.
Copyright 2016-2021 Filipe Coelho.
jackdmp comes with ABSOLUTELY NO WARRANTY
This is free software, and you are welcome to redistribute it
under certain conditions; see the file COPYING for details
no message buffer overruns
no message buffer overruns
no message buffer overruns
JACK server starting in realtime mode with priority 10
self-connect-mode is "Don't restrict self connect requests"

This has something to do with penv.insert("JACK_PROMISCUOUS_SERVER","audio"); in cae.cpp. If I remove that line, jackd will start and caed and ripcd will connect.

This is a stock Rivendell 4 installation other than running sudo apt install jackd2 after installing Rivendell.

rd@rivendell:~$ jackd -V
jackdmp version 1.9.20 tmpdir /dev/shm protocol 9
deltecent commented 2 weeks ago

If I start jackd on the command line, caed and ripcd appear to be happy:

root@rivendell:/home/rd# export JACK_PROMISCUOUS_SERVER=audio
root@rivendell:/home/rd# jackd -d dummy
jackdmp 1.9.20
Copyright 2001-2005 Paul Davis and others.
Copyright 2004-2016 Grame.
Copyright 2016-2021 Filipe Coelho.
jackdmp comes with ABSOLUTELY NO WARRANTY
This is free software, and you are welcome to redistribute it
under certain conditions; see the file COPYING for details
no message buffer overruns
no message buffer overruns
no message buffer overruns
JACK server starting in realtime mode with priority 10
self-connect-mode is "Don't restrict self connect requests"
JackEngine::XRun: client = rivendell_0 was not finished, state = Running
JackAudioDriver::ProcessGraphAsyncMaster: Process error
JackEngine::XRun: client = rivendell_0 was not finished, state = Triggered
Jun 16 16:46:43 rivendell rdservice: delaying startup for 5 seconds
Jun 16 16:46:48 rivendell caed: cae starting
Jun 16 16:46:48 rivendell caed: Found TwoLAME encoder library, MPEG L2 encoding supported
Jun 16 16:46:48 rivendell caed: Found MAD decoder library, MPEG L2 decoding supported
Jun 16 16:46:48 rivendell caed: Found TwoLAME encoder library, MPEG L2 encoding supported
Jun 16 16:46:48 rivendell caed: Found MAD decoder library, MPEG L2 decoding supported
Jun 16 16:46:48 rivendell caed: JACK server started
Jun 16 16:46:48 rivendell ripcd: started
Jun 16 16:46:49 rivendell rdcatchd: rdcatchd started
Jun 16 16:46:49 rivendell caed: connected to JACK server
Jun 16 16:46:49 rivendell caed: Found TwoLAME encoder library, MPEG L2 encoding supported
Jun 16 16:46:49 rivendell caed: Found MAD decoder library, MPEG L2 decoding supported
Jun 16 16:46:51 rivendell caed: cae started
Jun 16 16:46:54 rivendell ripcd: connected to JACK server
deltecent commented 2 weeks ago

It's a mystery. Compiled the v4 branch from source, ran sudo make install and now caed can start jackd:

Jun 16 19:39:21 rivendell caed: cae starting
Jun 16 19:39:21 rivendell ripcd: DB connection re-established
Jun 16 19:39:21 rivendell ripcd: invalid SQL or failed DB connection[Field 'INSTANCE' doesn't have a default value QMYSQL: Unable to execute query]: insert into `RDAIRPLAY` set `STATION`='rivendell'
Jun 16 19:39:21 rivendell caed: Found TwoLAME encoder library, MPEG L2 encoding supported
Jun 16 19:39:21 rivendell caed: Found MAD decoder library, MPEG L2 decoding supported
Jun 16 19:39:21 rivendell caed: Found TwoLAME encoder library, MPEG L2 encoding supported
Jun 16 19:39:21 rivendell caed: Found MAD decoder library, MPEG L2 decoding supported
Jun 16 19:39:21 rivendell caed: JACK server started
Jun 16 19:39:21 rivendell ripcd: started
Jun 16 19:39:21 rivendell rdcatchd: rdcatchd started
Jun 16 19:39:22 rivendell rdvairplayd: DB connection re-established
Jun 16 19:39:22 rivendell rdvairplayd: invalid SQL or failed DB connection[Field 'INSTANCE' doesn't have a default value QMYSQL: Unable to execute query]: insert into `RDAIRPLAY` set `STATION`='rivendell'
Jun 16 19:39:22 rivendell rdpadengined: DB connection re-established
Jun 16 19:39:22 rivendell rdpadengined: invalid SQL or failed DB connection[Field 'INSTANCE' doesn't have a default value QMYSQL: Unable to execute query]: insert into `RDAIRPLAY` set `STATION`='rivendell'
Jun 16 19:39:22 rivendell caed: connected to JACK server
Jun 16 19:39:22 rivendell caed: Found TwoLAME encoder library, MPEG L2 encoding supported
Jun 16 19:39:22 rivendell caed: Found MAD decoder library, MPEG L2 decoding supported
Jun 16 19:39:23 rivendell caed: cae started
Jun 16 19:39:26 rivendell ripcd: connected to JACK server
ltyndale commented 1 week ago

I've run into this before. Jackd tries to create files in /dev/shm but they are already there so it fails to start. Make sure Jackd is not running (and stop the Rivendell services if they are also running) and delete all the files from /dev/shm (you might need to be root to delete these files). Then restart the Rivendell services. It should recreate the files in /dev/shm and work as expected. On some systems (such as a Raspberry PI) you may need to do a second restart of the services to get it to work.

On 2024-06-16 19:42, Deltec Enterprises wrote:

It's a mystery. Compiled the v4 branch from source, ran sudo make install and now caed can start jackd:

Jun 16 19:39:21 rivendell caed: cae starting Jun 16 19:39:21 rivendell ripcd: DB connection re-established Jun 16 19:39:21 rivendell ripcd: invalid SQL or failed DB connection[Field 'INSTANCE' doesn't have a default value QMYSQL: Unable to execute query]: insert into RDAIRPLAY set STATION='rivendell' Jun 16 19:39:21 rivendell caed: Found TwoLAME encoder library, MPEG L2 encoding supported Jun 16 19:39:21 rivendell caed: Found MAD decoder library, MPEG L2 decoding supported Jun 16 19:39:21 rivendell caed: Found TwoLAME encoder library, MPEG L2 encoding supported Jun 16 19:39:21 rivendell caed: Found MAD decoder library, MPEG L2 decoding supported Jun 16 19:39:21 rivendell caed: JACK server started Jun 16 19:39:21 rivendell ripcd: started Jun 16 19:39:21 rivendell rdcatchd: rdcatchd started Jun 16 19:39:22 rivendell rdvairplayd: DB connection re-established Jun 16 19:39:22 rivendell rdvairplayd: invalid SQL or failed DB connection[Field 'INSTANCE' doesn't have a default value QMYSQL: Unable to execute query]: insert into RDAIRPLAY set STATION='rivendell' Jun 16 19:39:22 rivendell rdpadengined: DB connection re-established Jun 16 19:39:22 rivendell rdpadengined: invalid SQL or failed DB connection[Field 'INSTANCE' doesn't have a default value QMYSQL: Unable to execute query]: insert into RDAIRPLAY set STATION='rivendell' Jun 16 19:39:22 rivendell caed: connected to JACK server Jun 16 19:39:22 rivendell caed: Found TwoLAME encoder library, MPEG L2 encoding supported Jun 16 19:39:22 rivendell caed: Found MAD decoder library, MPEG L2 decoding supported Jun 16 19:39:23 rivendell caed: cae started Jun 16 19:39:26 rivendell ripcd: connected to JACK server

-- Reply to this email directly, view it on GitHub [1], or unsubscribe [2]. You are receiving this because you are subscribed to this thread.Message ID: @.***>

Links:

[1] https://github.com/ElvishArtisan/rivendell/issues/973#issuecomment-2171937472 [2] https://github.com/notifications/unsubscribe-auth/AC5JEH3XIRSOYJB6R5BJTOTZHYPHBAVCNFSM6AAAAABJM4ISDGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNZRHEZTONBXGI

deltecent commented 1 week ago

Jackd is starting fine. Caed has a 1 second delay between starting jackd and attempting to connect. I changed it to 10 seconds. If I ps -aux | grep jack, I can see it running. The problem I am having is caed is not able to connect to it and then kills it 10 seconds later.

starrbuck68 commented 2 days ago

Have you checked to see if another instance of jackd may be running and interfering with Rivendell's?