[App_rpt-users] outstreamcmd, ezstream, and error: manager.c: Unable to bind socket: Address already in use

Steve Zingman szingman at msgstor.com
Sun Nov 1 08:46:56 EST 2015


Make sure asterisk is stopping.
kill it if necessary
killall -9 /usr/sbin/asterisk

On 11/01/2015 08:34 AM, Larry da Ponte wrote:
> After setting up the outstreamcmd parameter in rpt.conf with ezstream 
> on my DIAL AllStar node I noticed that when I stopped and restarted 
> the asterisk service, I was getting the following error in the log:
>
> [Oct 29 23:15:37] WARNING[19838] manager.c: Unable to bind socket: 
> Address already in use
>
> I found that after a service asterisk stop, port 5038 was still in use.
>
> my manager.conf file has port = 5038
>
> prior to a service asterisk stop - I get the following:
>
> root at Server1:~# ps -ef | grep 7497
> root      7497     1 24 13:45 ?        00:09:24 /usr/sbin/asterisk
> root      7528  7497  0 13:45 ?        00:00:00 /bin/sh -c 
> /usr/bin/lame --preset cbr 16 -r -m m -s 8 --bitwidth 16 - - | 
> /usr/bin/ezstream -qvc /etc/asterisk/ezstream.xml
>
> after a service asterisk stop I can still see port 5038 in use:
>
> root at Server1:~# netstat -nlp|grep 5038
> tcp        0      0 127.0.0.1:5038 <http://127.0.0.1:5038>  0.0.0.0:* 
>               LISTEN      7528/sh
>
> Now, when I issue asterisk service start I get the following error:
>
> manager.c: Unable to bind socket: Address already in use
>
> and Asterisk fails to load
>
> If I kill pid 7528 then my service asterisk start works fine.
>
> I assume outstreamcmd is using manager, shells out to ezstream which 
> is a child of asterisk, and when asterisk shuts down, the process 
> running ezstream is left running.
>
> Should I put something in my asterisk startip script to look for 
> processes using 5038 and kill them?
>
> Thanks
>
> -Larry
>
>
> _______________________________________________
> App_rpt-users mailing list
> App_rpt-users at ohnosec.org
> http://ohnosec.org/cgi-bin/mailman/listinfo/app_rpt-users
>
> To unsubscribe from this list please visit http://ohnosec.org/cgi-bin/mailman/listinfo/app_rpt-users and scroll down to the bottom of the page. Enter your email address and press the "Unsubscribe or edit options button"
> You do not need a password to unsubscribe, you can do it via email confirmation. If you have trouble unsubscribing, please send a message to the list detailing the problem.

-- 
"Anything is possible if you don't know what you are talking about."
1st Law of Logic

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.allstarlink.org/pipermail/app_rpt-users/attachments/20151101/438beb8c/attachment.html>


More information about the App_rpt-users mailing list