OP25 Pulse to LiquidSoap connection error when starting up OP25 via automatic start at boot

Status
Not open for further replies.

w8jfj

Member
Premium Subscriber
Joined
Oct 30, 2013
Messages
74
Location
Central Michigan
Have had an OP25 system running on Buster for quit a while, no issues, a great little program Thanks Boatbod. Just finished building up a Bullseye version. Install went pretty easy. And everything works just fine, including Icecast on my LAN usng the OP25.sh and OP25.liq shells commands.

Final step was to get everything started at boot. OP25.sh starts up the radio and the OP25 browser windows show processing of the P25 signals just fine. However Pulse and Liquidsoap are not playing well when starting from systemd Service file. I get the following message: Sep 1 11:56:26 Debian111 liquidsoap[539]: 2021/09/01 11:56:26 [clock.wallclock_pulse:2] Error when starting output pulse_out(liquidsoap:): Pulseaudio error: Connection refused!>

I have been searching thru the various forums in RR and others. It appears to be a permission issue that I just cannot seem to find a solution to. I have removed/purged Pulseaudio and reinstalled but still not able to get this resolved. I do not recall this happening on my original Buster install.

Any suggestions, thanks John.

From SYSLOG - reboot start

Sep 1 11:56:26 Debian111 liquidsoap[539]: 2021/09/01 11:56:26 >>> LOG START
Sep 1 11:56:26 Debian111 liquidsoap[539]: 2021/09/01 11:56:17 [main:3] Liquidsoap 1.4.4
Sep 1 11:56:26 Debian111 liquidsoap[539]: 2021/09/01 11:56:17 [main:3] Using: bytes=[distributed with OCaml 4.02 or above] pcre=[unspe>
Sep 1 11:56:26 Debian111 liquidsoap[539]: 2021/09/01 11:56:25 [gstreamer.loader:3] Loaded GStreamer 1.18.4 0
Sep 1 11:56:26 Debian111 liquidsoap[539]: 2021/09/01 11:56:26 [dynamic.loader:3] Could not find dynamic module for fdkaac encoder.
Sep 1 11:56:26 Debian111 liquidsoap[539]: 2021/09/01 11:56:26 [frame:3] Using 8000Hz audio, 25Hz video, 8000Hz master.
Sep 1 11:56:26 Debian111 liquidsoap[539]: 2021/09/01 11:56:26 [frame:3] Frame size must be a multiple of 320 ticks = 320 audio samples>
Sep 1 11:56:26 Debian111 liquidsoap[539]: 2021/09/01 11:56:26 [frame:3] Targetting 'frame.duration': 0.04s = 320 audio samples = 320 t>
Sep 1 11:56:26 Debian111 liquidsoap[539]: 2021/09/01 11:56:26 [frame:3] Frames last 0.04s = 320 audio samples = 1 video samples = 320 >
Sep 1 11:56:26 Debian111 liquidsoap[539]: 2021/09/01 11:56:26 [sandbox:3] Sandboxing disabled
Sep 1 11:56:26 Debian111 liquidsoap[539]: 2021/09/01 11:56:26 [video.converter:3] Using preferred video converter: gavl.
Sep 1 11:56:26 Debian111 liquidsoap[539]: 2021/09/01 11:56:26 [audio.converter:3] Using samplerate converter: ffmpeg.
Sep 1 11:56:26 Debian111 liquidsoap[539]: 2021/09/01 11:56:26 [input.external.rawaudio_9376:3] Starting process
Sep 1 11:56:26 Debian111 liquidsoap[539]: 2021/09/01 11:56:26 [clock.wallclock_pulse:2] Error when starting output pulse_out(liquidsoap:): Pulseaudio error: Connection refused!>
Sep 1 11:56:26 Debian111 liquidsoap[539]: Raised by primitive operation at Pulseaudio.Simple.create in file "pulseaudio.ml" (inlined),>
Sep 1 11:56:26 Debian111 liquidsoap[539]: Called from Pulseaudio_io.output#open_device in file "io/pulseaudio_io.ml", line 82, charact>
Sep 1 11:56:26 Debian111 liquidsoap[539]: Called from Start_stop.base#do_start in file "tools/start_stop.ml", line 108, characters 8-18
Sep 1 11:56:26 Debian111 liquidsoap[539]: Called from Clock.clock#start_outputs.(fun) in file "clock.ml", line 245, characters 20-38
Sep 1 11:56:26 Debian111 liquidsoap[539]: 2021/09/01 11:56:26 [op25:3] Connecting mount op25 for source@localhost...
Sep 1 11:56:26 Debian111 liquidsoap[539]: 2021/09/01 11:56:26 [op25:3] Connection setup was successful.
Sep 1 11:56:26 Debian111 liquidsoap[539]: 2021/09/01 11:56:26 [main:3] Shutdown started!
Sep 1 11:56:26 Debian111 liquidsoap[539]: 2021/09/01 11:56:26 [main:3] Waiting for main threads to terminate...
Sep 1 11:56:26 Debian111 liquidsoap[539]: 2021/09/01 11:56:26 [clock.wallclock_pulse:3] Streaming loop starts, synchronized by active >
Sep 1 11:56:26 Debian111 liquidsoap[539]: 2021/09/01 11:56:26 [op25:3] Closing connection...
Sep 1 11:56:26 Debian111 liquidsoap[539]: 2021/09/01 11:56:26 [clock.wallclock_pulse:3] Streaming loop stopped.
Sep 1 11:56:26 Debian111 liquidsoap[539]: 2021/09/01 11:56:26 [main:3] Threads terminated.
Sep 1 11:56:26 Debian111 liquidsoap[539]: 2021/09/01 11:56:26 [threads:3] Shutting down scheduler...
Sep 1 11:56:26 Debian111 liquidsoap[539]: 2021/09/01 11:56:26 [threads:3] Scheduler shut down.
Sep 1 11:56:26 Debian111 liquidsoap[539]: 2021/09/01 11:56:26 [threads:3] Waiting for queue threads to terminate...


Starting via ./op25.liq

ohn@Debian111:~/op25/op25/gr-op25_repeater/apps$ ./op25.liq
2021/09/01 13:14:15 >>> LOG START
2021/09/01 13:14:15 [main:3] Liquidsoap 1.4.4
2021/09/01 13:14:15 [main:3] Using: bytes=[distributed with OCaml 4.02 or above] pcre=[unspecified] sedlex=2.2 menhirLib=20201216 dtools=0.4.2 duppy=0.8.0 cry=0.6.5 mm=0.5.0 xmlplaylist=0.1.5 lastfm=0.3.2 ogg=0.5.2 vorbis=0.7.1 opus=0.1.3 speex=0.2.1 mad=0.4.6 flac=0.1.7 flac.ogg=0.1.7 dynlink=[distributed with Ocaml] lame=0.3.4 shine=0.2.1 gstreamer=0.3.0 frei0r=0.1.1 theora=0.3.1 gavl=0.1.6 ffmpeg=0.4.3 bjack=0.1.5 alsa=0.3.0 ao=0.2.1 samplerate=0.1.4 taglib=0.3.6 ssl=0.5.9 magic=0.7.3 camomile=[unspecified] inotify=2.3 yojson=[unspecified] faad=0.4.0 soundtouch=0.1.8 portaudio=0.2.1 pulseaudio=0.1.3 ladspa=0.1.5 sdl=0.9.1 camlimages=4.2.6 lo=0.1.2 gd=1.0a5
2021/09/01 13:14:15 [gstreamer.loader:3] Loaded GStreamer 1.18.4 0
2021/09/01 13:14:15 [dynamic.loader:3] Could not find dynamic module for fdkaac encoder.
2021/09/01 13:14:15 [frame:3] Using 8000Hz audio, 25Hz video, 8000Hz master.
2021/09/01 13:14:15 [frame:3] Frame size must be a multiple of 320 ticks = 320 audio samples = 1 video samples.
2021/09/01 13:14:15 [frame:3] Targetting 'frame.duration': 0.04s = 320 audio samples = 320 ticks.
2021/09/01 13:14:15 [frame:3] Frames last 0.04s = 320 audio samples = 1 video samples = 320 ticks.
2021/09/01 13:14:15 [sandbox:3] Sandboxing disabled
2021/09/01 13:14:15 [video.converter:3] Using preferred video converter: gavl.
2021/09/01 13:14:15 [audio.converter:3] Using samplerate converter: ffmpeg.
2021/09/01 13:14:15 [input.external.rawaudio_9376:3] Starting process
2021/09/01 13:14:15 [op25:3] Connecting mount op25 for source@localhost...
2021/09/01 13:14:15 [op25:3] Connection setup was successful.
2021/09/01 13:14:15 [clock.wallclock_pulse:3] Streaming loop starts, synchronized by active sources.
2021/09/01 13:14:15 [mksafe:3] Switch to safe_blank.
2021/09/01 13:14:18 [mksafe:3] Switch to input.external.rawaudio_9376 with transition.
2021/09/01 13:14:20 [mksafe:3] Switch to safe_blank with forgetful transition.
2021/09/01 13:14:21 [mksafe:3] Switch to input.external.rawaudio_9376 with transition.
2021/09/01 13:14:21 [mksafe:3] Switch to safe_blank with transition.
2021/09/01 13:14:23 [mksafe:3] Switch to input.external.rawaudio_9376 with transition.
2021/09/01 13:14:28 [mksafe:3] Switch to safe_blank with transition.
2021/09/01 13:14:28 [mksafe:3] Switch to input.external.rawaudio_9376 with transition.
2021/09/01 13:14:29 [mksafe:3] Switch to safe_blank with transition.
2021/09/01 13:14:37 [mksafe:3] Switch to input.external.rawaudio_9376 with transition.
 

wgbecks

Active Member
Joined
Jan 17, 2005
Messages
903
Location
NE Wisconsin
No sure of what your platform you're on but the following addresses this issue on a Raspberry Pi-4 running Buster...

crontab -e
@reboot pulseaudio --start
[Add this to the bottom of the file, save, and reboot.]
 

w8jfj

Member
Premium Subscriber
Joined
Oct 30, 2013
Messages
74
Location
Central Michigan
No sure of what your platform you're on but the following addresses this issue on a Raspberry Pi-4 running Buster...

crontab -e
@reboot pulseaudio --start
[Add this to the bottom of the file, save, and reboot.]
I added that yesterday as I finishing up the install. I did a crontab -l and I verified that the "@reboot pulseaudio --start" is in there. That one I did have from my Buster install notes.

Thanks...
 

boatbod

Member
Joined
Mar 3, 2007
Messages
3,316
Location
Talbot Co, MD
Pulse audio is weird insofar as it generally doesn't start up until logging in to the desktop. As a consequence, starting liquidsoap at boot usually runs in to permissions problems. The easiest fix is usually to switch over to ALSA.
 

w8jfj

Member
Premium Subscriber
Joined
Oct 30, 2013
Messages
74
Location
Central Michigan
I did comment out the output.pulseaudio(input) in OP25.liq and the Icecast connection is good but of course I would still like to have local audio at the same time.

I was thinking I might still have something messed up in pulseaudio permissions. But again I am thinking it is a timing issue. I struggled to get it stable on my 3b+ running Buster (with an RTL-SDR) and with the PulseAudio start with cron.d a while ago everything is good on that system.

This latest setup is Bullseye on an older 2 core AMD pc with an AirSpy mini. Everything was just great until, as I mentioned earlier, I was setting up OP25-rx and OP25-liq to run as a service I started getting the error mentioned with the first post. I try a few more iterations before possible going back to ALSA.

Thanks guys.....John
 

boatbod

Member
Joined
Mar 3, 2007
Messages
3,316
Location
Talbot Co, MD
I did comment out the output.pulseaudio(input) in OP25.liq and the Icecast connection is good but of course I would still like to have local audio at the same time.

I was thinking I might still have something messed up in pulseaudio permissions. But again I am thinking it is a timing issue. I struggled to get it stable on my 3b+ running Buster (with an RTL-SDR) and with the PulseAudio start with cron.d a while ago everything is good on that system.

This latest setup is Bullseye on an older 2 core AMD pc with an AirSpy mini. Everything was just great until, as I mentioned earlier, I was setting up OP25-rx and OP25-liq to run as a service I started getting the error mentioned with the first post. I try a few more iterations before possible going back to ALSA.

Thanks guys.....John
I had the same issue with my streaming server and it took a major effort playing with pulseaudio permissions before I was able to get it working. Unfortunately I tweaked so many things I never did discover exactly what I did to fix it.
 
Status
Not open for further replies.
Top