Audio device busy running as daemon 4,5,6

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Audio device busy running as daemon 4,5,6

KB1NYT
Thank you for the replies. The issue was pulseaudio was installed I
removed that and now we get farther. Not sure why the pulseaudio didn't
affect running from the cmd line only starting as a service.

I am guessing the network isn't ready in time for Svxlink after boot. If
I stop and then start no error and everything works. I guess I could
start Svxlink from rc.local instead.

"SimplexLogic"
Wed Dec 21 15:45:59 2016:     Found /usr/lib/ModuleHelp.so
Wed Dec 21 15:45:59 2016:     Module Help v1.0.0 starting...
Wed Dec 21 15:45:59 2016: Loading module "ModuleEchoLink" into logic
"SimplexLogic"
Wed Dec 21 15:45:59 2016:     Found /usr/lib/ModuleEchoLink.so
Wed Dec 21 15:45:59 2016:     Module EchoLink v1.3.2 starting...
Wed Dec 21 15:45:59 2016: SimplexLogic: Event handler script
successfully loaded.
Wed Dec 21 15:45:59 2016: *** ERROR: No IP addresses were returned for
the EchoLink directory server DNS query
Wed Dec 21 15:45:59 2016: *** ERROR: EchoLink directory server DNS
lookup failed
Wed Dec 21 15:45:59 2016:
Wed Dec 21 15:45:59 2016: EchoLink directory status changed to ?

On 12/21/2016 3:12 PM, [hidden email] wrote:

> Send Svxlink-devel mailing list submissions to
> [hidden email]
>
> To subscribe or unsubscribe via the World Wide Web, visit
> https://lists.sourceforge.net/lists/listinfo/svxlink-devel
> or, via email, send a message with subject or body 'help' to
> [hidden email]
>
> You can reach the person managing the list at
> [hidden email]
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Svxlink-devel digest..."
>
>
> Today's Topics:
>
>     1. REJECT_OUTGOING evaluated after ACCEPT_OUTGOING? (isladelobos)
>     2. REJECT_OUTGOING evaluated after ACCEPT_OUTGOING? (isladelobos)
>     3. Time for a new Svxlink release? Problem with rapid RX/TX
>        flapping when connected to Echolink conferences (David Ranch)
>     4. Audio device busy running as daemon (Jay)
>     5. Re: Audio device busy running as daemon (Rob Janssen)
>     6. Re: Audio device busy running as daemon (David Ranch)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Sat, 17 Dec 2016 12:05:32 -0000
> From: "isladelobos" <[hidden email]>
> Subject: [Svxlink-devel] REJECT_OUTGOING evaluated after
> ACCEPT_OUTGOING?
> To: "SVXLIN-DEVEL" <[hidden email]>
> Message-ID: <10E26FBD951A46CEAAA2D90B1D6AB912@dell>
> Content-Type: text/plain; format=flowed; charset="iso-8859-1";
> reply-type=original
>
> Hi.
>
> In the man page, about the ModuleEchoLink.conf.
>
> I read:
>
> ACCEPT_OUTGOING
> Only accept outgoing connections where the remote callsign match this
> regular expression. The REJECT_OUTGOING directive will be evaluated before
> ACCEPT_OUTGOING.
>
> For example, i configure the next lines:
>
> REJECT_OUTGOING=^(\\*.*\\*)$
> ACCEPT_OUTGOING=^(\\*CONFERENCE1\\*|\\*CONFERENCE2\\*|\\*ECHOTEST\\*)$
>
> We can't connect to any conference, included the ACCEPT_OUTGOING matcheds
>
> This configuration is because we connect to some conference in days like
> sundays or special events.
> But normaly is non conference connected Link
>
> How can accept outgoing only for the accept outgoing conferences?
>
> 73's
>
>
>
>
> ------------------------------
>
> Message: 2
> Date: Sat, 17 Dec 2016 04:47:56 -0700 (MST)
> From: isladelobos <[hidden email]>
> Subject: [Svxlink-devel] REJECT_OUTGOING evaluated after
> ACCEPT_OUTGOING?
> To: [hidden email]
> Message-ID: <[hidden email]>
> Content-Type: text/plain; charset=us-ascii
>
> Hi.
>
> In the man page, about the ModuleEchoLink.conf.
>
> I read:
>
> ACCEPT_OUTGOING
> Only accept outgoing connections where the remote callsign match this
> regular expression. The REJECT_OUTGOING directive *will be evaluated before
> ACCEPT_OUTGOING.*
>
> For example, i configure the next lines:
>
> REJECT_OUTGOING=^(\\*.*\\*)$
> ACCEPT_OUTGOING=^(\\*CONFERENCE1\\*|\\*CONFERENCE2\\*|\\*ECHOTEST\\*)$
>
> We can't connect to any conference, included the ACCEPT_OUTGOING matcheds
>
> This configuration is because we connect to some conference in days like
> sundays or special events.
> But normaly is non conference connected Link
>
> How can accept outgoing only for the accept outgoing conferences?
>
>
>
> --
> View this message in context: http://svxlink.996268.n3.nabble.com/REJECT-OUTGOING-evaluated-after-ACCEPT-OUTGOING-tp4797.html
> Sent from the svxlink-devel mailing list archive at Nabble.com.
>
>
>
> ------------------------------
>
> Message: 3
> Date: Sat, 17 Dec 2016 13:00:42 -0800
> From: David Ranch <[hidden email]>
> Subject: [Svxlink-devel] Time for a new Svxlink release? Problem with
> rapid RX/TX flapping when connected to Echolink conferences
> To: Discussions about development issues
> <[hidden email]>
> Message-ID: <[hidden email]>
> Content-Type: text/plain; charset="utf-8"
>
> Hey Everyone,
>
> I was helping a friend with his Svxlink station flapping RX/TX when in a
> Echolink conference after 30+min and I first recommended that he first
> make sure he's running the newest version of Svxlink.  I then looked my
> self and it seems that the current release code is 15.08 which doesn't
> have all of the good work committed since then.
>
> So... two questions:
>
> 1. Are there any plans to release a 2016 or early 2017 version of
> Svxlink and Qtel?
>
> 2.  Has anyone observed this rapid RX/TX flapping every second issue
> when connected long term to an Echoink conference?  I haven't but I
> rarely use the conference feature.
>
> --David
> KI6ZHD
>
>
> -------------- next part --------------
> An HTML attachment was scrubbed...
>
> ------------------------------
>
> Message: 4
> Date: Wed, 21 Dec 2016 12:39:42 -0500
> From: Jay <[hidden email]>
> Subject: [Svxlink-devel] Audio device busy running as daemon
> To: [hidden email]
> Message-ID: <[hidden email]>
> Content-Type: text/plain; charset=utf-8; format=flowed
>
> Hello
>
> Svxlink runs fine from the command line but if I try to run it as a
> daemon I get the following error in the log file. The setup is a
> Raspberry Pi running Raspbian and a USB sound card. I am using the
> daemon script that came with the install slightly modified for the dir
> structure here. The only thing I did not add to the script was the audio
> strings for start and stop. Svxlink user is part of the audio group. Not
> sure what to look for.
>
> thanks
> Jay
> KB1NYT
>
> Wed Dec 21 11:54:59 2016: SvxLink v1.5.0 Copyright (C) 2003-2015 Tobias
> Blomberg / SM0SVX
> Wed Dec 21 11:54:59 2016:
> Wed Dec 21 11:54:59 2016: SvxLink comes with ABSOLUTELY NO WARRANTY.
> This is free software, and you are
> Wed Dec 21 11:54:59 2016: welcome to redistribute it in accordance with
> the terms and conditions in the
> Wed Dec 21 11:54:59 2016: GNU GPL (General Public License) version 2 or
> later.
> Wed Dec 21 11:54:59 2016:
> Wed Dec 21 11:54:59 2016: Using configuration file:
> /opt/svxlink/etc/svxlink/svxlink.conf
> Wed Dec 21 11:54:59 2016: --- Using sample rate 48000Hz
> Wed Dec 21 11:54:59 2016:
> Wed Dec 21 11:54:59 2016: Starting logic: SimplexLogic
> Wed Dec 21 11:54:59 2016: Loading RX: Rx1
> Wed Dec 21 11:54:59 2016: *** ERROR: Open capture audio device failed:
> Device or resource busy
> Wed Dec 21 11:54:59 2016: *** ERROR: Could not open audio device for
> receiver "Rx1"
> Wed Dec 21 11:54:59 2016: *** ERROR: Could not initialize RX "Rx1"
> Wed Dec 21 11:54:59 2016: *** ERROR: Could not initialize Logic object
> "SimplexLogic". Skipping...
> Wed Dec 21 11:54:59 2016: *** ERROR: No logics available. Bailing out...
>
>
> #!/bin/sh
> # Debian like server start/stop script, developed for raspbian distro
> # Copyright (c) 2013-2014 - F1RMB, Daniel Caujolle-Bert
> <[hidden email]>
> # Licended under GPL v2 or later
>
> #
> # /etc/default/svxlink support following options:
> #
>    GPIO_PTT_PIN=23
> #     <num> defines the GPIO pin used for PTT.
>    GPIO_SQL_PIN=27
> #     <num> defines the GPIO pin used for Squelch.
> #
> # AUDIO_SETTINGS_ONSTART="<string>"
> # AUDIO_SETTINGS_ONSTOP="<string>"
> #     <string>: shell script command(s)
> #
>
> ### BEGIN INIT INFO
> # Provides:        svxlink
> # Required-Start:  $local_fs $remote_fs $syslog $network $ntp
> # Required-Stop:   $local_fs $remote_fs
> # Default-Start:   2 3 4 5
> # Default-Stop:    0 1 6
> # Short-Description: Start svxLink Server daemon
> ### END INIT INFO
>
> PATH=/sbin:/bin:/usr/sbin:/usr/bin
>
> . /lib/lsb/init-functions
>
> PROG="svxlink"
> DAEMON=/opt/svxlink/bin/$PROG
> #DAEMON=/usr/bin/$PROG
> PIDFILE=/var/run/$PROG.pid
> LOCKFILE=/var/lock/$PROG
> LOGFILE=/var/log/$PROG
> RUNASUSER=svxlink
>
> test -x $DAEMON || exit 5
>
> if [ -r /etc/default/$PROG ]; then
>       . /etc/default/$PROG
> fi
>
> UGID=$(getent passwd $RUNASUSER | cut -f 3,4 -d:) || true
> SVXLINK_OPTS="--daemon ${LOGFILE:+--logfile=$LOGFILE}
> ${CFGFILE:+--config=$CFGFILE} --runasuser=$RUNASUSER --pidfile=$PIDFILE"
>
> lock_svxlink() {
>       if [ -x /usr/bin/lockfile-create ]; then
>           lockfile-create $LOCKFILE
>           lockfile-touch $LOCKFILE &
>           LOCKTOUCHPID="$!"
>       fi
> }
>
> unlock_svxlink() {
>       if [ -x /usr/bin/lockfile-create ] ; then
>           kill $LOCKTOUCHPID
>           lockfile-remove $LOCKFILE
>       fi
> }
>
> gpio_setup() {
>      NAME=$1
>      PIN=$2
>      DIR=$3
>      if [ ! -z "$PIN" -a ! -e /sys/class/gpio/gpio$PIN ]; then
>          # Enable the pin for GPIO:
>          log_progress_msg "[GPIO $NAME #$PIN"
>          echo $PIN > /sys/class/gpio/export
>          # Set the direction to output for the pin:
>          log_progress_msg ", direction"
>          echo $DIR > /sys/class/gpio/gpio$PIN/direction
>          # Make sure that the svxlink user can write to the GPIO pin:
>          log_progress_msg ", owner]"
>          chown svxlink /sys/class/gpio/gpio$PIN/value
>      fi
> }
>
> gpio_unsetup() {
>      NAME=$1
>      PIN=$2
>      if [ ! -z "$PIN" -a -e /sys/class/gpio/gpio$PIN ]; then
>          log_progress_msg "[GPIO $NAME #$PIN]"
>          # Enable the pin for GPIO:
>          echo $PIN > /sys/class/gpio/unexport
>      fi
> }
>
> case "$1" in
>       start)
>       log_daemon_msg "Starting SVXLINK server" "svxlink"
>
>       ## Check if svxlink user exists
>       if [ -z "$UGID" ]; then
>           log_failure_msg "user \"$RUNASUSER\" does not exist"
>           exit 1
>       fi
>
>       lock_svxlink
>
>       ## Check about pid file
>       if [ -e $PIDFILE ]; then
>           if $0 status > /dev/null ; then
>           log_failure_msg "$PROG is already started; not starting"
>           return
>           else
>           log_progress_msg "[Removing stale PID file $PIDFILE]"
>           rm -f $PIDFILE
>           fi
>       fi
>
>       ## GPIO PTT support ?
>       if [ ! -z "$GPIO_PTT_PIN" ]; then
>           gpio_setup PTT $GPIO_PTT_PIN out
>       fi
>
>       ## GPIO SQL support ?
>       if [ ! -z "$GPIO_SQL_PIN" ]; then
>           gpio_setup SQL $GPIO_SQL_PIN in
>       fi
>
>       ## Audio settings on startup ?
>       if [ ! -z "$AUDIO_SETTINGS_ONSTART" ]; then
>           log_progress_msg ", audio"
>           eval $AUDIO_SETTINGS_ONSTART > /dev/null 2<&1
>       fi
>
>       ## Start the daemon
>       start-stop-daemon --start --quiet --oknodo --pidfile $PIDFILE
> --startas $DAEMON -- $SVXLINK_OPTS
>       status=$?
>
>       unlock_svxlink
>
>       log_end_msg $status
>           ;;
>
>       stop)
>       log_daemon_msg "Stopping SVXLINK server" "svxlink"
>
>       ## Stopping the daemon
>         start-stop-daemon --stop --quiet --oknodo --pidfile $PIDFILE
>
>       ## Audio settings on leaving ?
>       if [ ! -z "$AUDIO_SETTINGS_ONSTOP" ]; then
>           log_progress_msg ", unsetting audio"
>           eval $AUDIO_SETTINGS_ONSTOP > /dev/null 2<&1
>       fi
>
>       ## Unset GPIO PTT pin, if used
>       if [ ! -z "$GPIO_PTT_PIN" ]; then
>           gpio_unsetup PTT $GPIO_PTT_PIN
>       fi
>
>       ## Unset GPIO SQL pin, if used
>       if [ ! -z "$GPIO_SQL_PIN" ]; then
>           gpio_unsetup SQL $GPIO_SQL_PIN
>       fi
>
>       log_end_msg $?
>       rm -f $PIDFILE
>           ;;
>
>       restart|force-reload)
>       $0 stop && sleep 2 && $0 start
>         ;;
>
>       try-restart)
>       if $0 status >/dev/null; then
>           $0 restart
>       else
>           exit 0
>       fi
>       ;;
>
>       reload)
>       exit 3
>       ;;
>
>       status)
>       status_of_proc $DAEMON "SVXLINK server"
>       ;;
>
>       gpio)
>       # PTT
>       if [ ! -z "$GPIO_PTT_PIN" -a ! -e /sys/class/gpio/gpio$GPIO_PTT_PIN
> ]; then
>           log_daemon_msg "Initialize PTT GPIO" "gpio$GPIO_PTT_PIN"
>           gpio_setup PTT $GPIO_PTT_PIN out
>       else
>           log_daemon_msg "Uninitialize PTT GPIO" "gpio$GPIO_PTT_PIN"
>           gpio_unsetup PTT $GPIO_PTT_PIN
>       fi
>       log_end_msg 0
>
>       ## Squelch
>       if [ ! -z "$GPIO_SQL_PIN" -a ! -e /sys/class/gpio/gpio$GPIO_SQL_PIN
> ]; then
>           log_daemon_msg "Initialize Squelch GPIO" "gpio$GPIO_SQL_PIN"
>           gpio_setup SQL $GPIO_SQL_PIN in
>       else
>           log_daemon_msg "Uninitialize Squelch GPIO" "gpio$GPIO_SQL_PIN"
>           gpio_unsetup SQL $GPIO_SQL_PIN
>       fi
>       log_end_msg 0
>       ;;
>
>       *)
>       echo "Usage: $0
> {start|stop|restart|try-restart|force-reload|gpio|status}"
>       exit 2
>       ;;
> esac
>
>
>
>
> ------------------------------
>
> Message: 5
> Date: Wed, 21 Dec 2016 18:42:32 +0100
> From: Rob Janssen <[hidden email]>
> Subject: Re: [Svxlink-devel] Audio device busy running as daemon
> To: Discussions about development issues
> <[hidden email]>
> Message-ID: <[hidden email]>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> Jay wrote:
>> Hello
>>
>> Svxlink runs fine from the command line but if I try to run it as a
>> daemon I get the following error in the log file. The setup is a
>> Raspberry Pi running Raspbian and a USB sound card. I am using the
>> daemon script that came with the install slightly modified for the dir
>> structure here. The only thing I did not add to the script was the audio
>> strings for start and stop. Svxlink user is part of the audio group. Not
>> sure what to look for.
>>
>> thanks
>> Jay
>> KB1NYT
>>
>> Wed Dec 21 11:54:59 2016: SvxLink v1.5.0 Copyright (C) 2003-2015 Tobias
>> Blomberg / SM0SVX
>> Wed Dec 21 11:54:59 2016:
>> Wed Dec 21 11:54:59 2016: SvxLink comes with ABSOLUTELY NO WARRANTY.
>> This is free software, and you are
>> Wed Dec 21 11:54:59 2016: welcome to redistribute it in accordance with
>> the terms and conditions in the
>> Wed Dec 21 11:54:59 2016: GNU GPL (General Public License) version 2 or
>> later.
>> Wed Dec 21 11:54:59 2016:
>> Wed Dec 21 11:54:59 2016: Using configuration file:
>> /opt/svxlink/etc/svxlink/svxlink.conf
>> Wed Dec 21 11:54:59 2016: --- Using sample rate 48000Hz
>> Wed Dec 21 11:54:59 2016:
>> Wed Dec 21 11:54:59 2016: Starting logic: SimplexLogic
>> Wed Dec 21 11:54:59 2016: Loading RX: Rx1
>> Wed Dec 21 11:54:59 2016: *** ERROR: Open capture audio device failed:
>> Device or resource busy
>> Wed Dec 21 11:54:59 2016: *** ERROR: Could not open audio device for
>> receiver "Rx1"
>> Wed Dec 21 11:54:59 2016: *** ERROR: Could not initialize RX "Rx1"
>> Wed Dec 21 11:54:59 2016: *** ERROR: Could not initialize Logic object
>> "SimplexLogic". Skipping...
>> Wed Dec 21 11:54:59 2016: *** ERROR: No logics available. Bailing out...
>>
> It looks like some other software has the device open at the time you start the service.
> Make sure the commandline version is not running and that no other software that tries
> to open te audio device (including any "sound daemon" like pulseaudio) is running.
>
> Rob
>
>
>
> ------------------------------
>
> Message: 6
> Date: Wed, 21 Dec 2016 12:12:34 -0800
> From: David Ranch <[hidden email]>
> Subject: Re: [Svxlink-devel] Audio device busy running as daemon
> To: Discussions about development issues
> <[hidden email]>
> Message-ID: <[hidden email]>
> Content-Type: text/plain; charset="windows-1252"
>
>
>> It looks like some other software has the device open at the time you
>> start the service.
>> Make sure the commandline version is not running and that no other software that tries
>> to open te audio device (including any "sound daemon" like pulseaudio) is running.
> It wasn't mentioned which OS is running on the Raspberry Pi but I'm
> assuming Wheezy as this isn't a Systemd-type startup script.  Make sure
> that:
>
> 1. the svxlink user has been created
> 2. the svxlink user does NOT have a password (don't allow logins for
> this user)
> 3. the svxlink user is in the "audio" unix group
> 4. the svxlink user is in the "gpio" unix group
>
> If you had to add any of the above, reboot the rpi before trying to
> start Svxlink as a service.
>
> If that still doesn't work, see if you can run "sudo su - svxlink" and
> become the svxlink user.  From there, try starting Svxlink and see if it
> works or not.
>
>
> Btw, I have a bunch of these setup steps for the Raspberri Pi which also
> includes hardening, security, etc. if you find it helpful. It's intended
> for the Direwolf packet program but everything before that might provide
> you some ideas.
>
> http://www.trinityos.com/HAM/CentosDigitalModes/RPi/rpi2-setup.html
>
> --David
> KI6ZHD
> -------------- next part --------------
> An HTML attachment was scrubbed...
>
> ------------------------------
>
> ------------------------------------------------------------------------------
> Developer Access Program for Intel Xeon Phi Processors
> Access to Intel Xeon Phi processor-based developer platforms.
> With one year of Intel Parallel Studio XE.
> Training and support from Colfax.
> Order your platform today.http://sdm.link/intel
>
> ------------------------------
>
> _______________________________________________
> Svxlink-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/svxlink-devel
>
>
> End of Svxlink-devel Digest, Vol 121, Issue 2
> *********************************************


------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/intel
_______________________________________________
Svxlink-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/svxlink-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Audio device busy running as daemon 4,5,6

Rob Janssen
Jay wrote:
> Thank you for the replies. The issue was pulseaudio was installed I
> removed that and now we get farther. Not sure why the pulseaudio didn't
> affect running from the cmd line only starting as a service.
>
> I am guessing the network isn't ready in time for Svxlink after boot. If
> I stop and then start no error and everything works. I guess I could
> start Svxlink from rc.local instead.

Which version of the OS are you using?  Are you using a classical system5 init
package or the "systemd" disaster?

The supplied /etc/init.d script has these lines:

# Required-Start:  $local_fs $remote_fs $syslog $network $ntp
# Default-Start:   2 3 4 5

When you now do "insserv svxlink" the startup of svxlink will be placed way back
in the startup order, after networking has come up.

In occasional cases the network can be slow to come up due to switches with slow
spanning tree, dhcp server taking long to assign address, etc.

When your system still has /etc/network/interfaces, make sure there is a line:

auto eth0

for your eth0 interface, not:

allow-hotplug eth0

This makes the system wait for the eth0 interface at bootup, instead of just continuing
the startup while the network gets settled.

Rob

------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/intel
_______________________________________________
Svxlink-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/svxlink-devel
Loading...