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

Larry da Ponte hb9eyq at gmail.com
Sun Nov 1 13:34:45 UTC 2015


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          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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.keekles.org/pipermail/app_rpt-users/attachments/20151101/19e545a9/attachment.html>


More information about the App_rpt-users mailing list