[asterisk-bugs] [JIRA] (ASTERISK-26357) core: AMI binds to random port every Asterisk restart on FreeBSD

Corey Farrell (JIRA) noreply at issues.asterisk.org
Tue Feb 20 06:04:13 CST 2018


     [ https://issues.asterisk.org/jira/browse/ASTERISK-26357?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Corey Farrell updated ASTERISK-26357:
-------------------------------------

    Assignee: Roman Petrov  (was: Unassigned)
      Status: Waiting for Feedback  (was: Open)

I do not believe this is a bug in Asterisk.  To troubleshoot further you will need to collect debug logs \[1\].  Once you've enabled debug then touch /etc/asterisk/manager.conf (to ensure it is seen as modified), then from Asterisk CLI run {{module reload manager}}.  I suspect you will get messages {{Not an IPv4 nor IPv6 address, cannot get port.}} and {{Not an IPv4 nor IPv6 address, cannot set port.}}.  If so this likely indicates an error in your BSD build, possibly {{getaddrinfo}} failing to set the correct {{ss_family}} to the {{struct sockaddr_storage}}.

\[1\] https://wiki.asterisk.org/wiki/display/AST/Collecting+Debug+Information

> core: AMI binds to random port every Asterisk restart on FreeBSD
> ----------------------------------------------------------------
>
>                 Key: ASTERISK-26357
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-26357
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Core/ManagerInterface
>    Affects Versions: 11.23.1, 13.10.0, 13.11.2
>         Environment: Appears if world installed with "WITHOUT_INET6=yes" in /etc/src.conf
> OS: FreeBSD 11.0-STABLE amd64
> Asterisk 13.11.2
> Also repeated on:
> Jailed FreeBSD 10.3-PRERELEASE #0 r295211 amd64
> Asterisk 13.11.2
>            Reporter: Roman Petrov
>            Assignee: Roman Petrov
>
> I'm setup simpliest asterisk system, and try to work with AMI.
> That's my manager.conf:
> ----------------------------------------
> [general]
> enabled = yes
> webenabled= no
> debug   = no
> port    = 5038
> bindaddr= 127.0.0.1
> [admin]
> secret  = secret
> deny    = 0.0.0.0/0.0.0.0
> permit  = 127.0.0.1/255.255.255.0
> read    = system,call,log,verbose,agent,user,config,dtmf,reporting,cdr,dialplan
> write   = system,call,agent,user,config,command,reporting,originate,message 
> -------------------------------------------------
> When I start asterisk, and see: netstat -an | grep LISTEN
> there is not 127.0.0.1:5038 socket.
> But it has other record:
> tcp4       0      0 127.0.0.1.54792        *.*                    LISTEN 
> And when I try to check that opened port with telnet, it is a AMI port:
> telnet 127.0.0.1 54792
> Trying 127.0.0.1...
> Connected to localhost.
> Escape character is '^]'.
> Asterisk Call Manager/2.8.0 
> I can authorize on telnet with credentials which I setup in manager.conf.
> When I see in asterisk console: manager show settings it gives me:
> ----------------------------------------
> Global Settings:
> ----------------
>   Manager (AMI):             Yes           
>   Web Manager (AMI/HTTP):    No             
>   TCP Bindaddress:           127.0.0.1:0   
>   HTTP Timeout (minutes):    60             
>   TLS Enable:                No             
>   TLS Bindaddress:           Disabled       
>   TLS Certfile:              asterisk.pem   
>   TLS Privatekey:                           
>   TLS Cipher:                               
>   Allow multiple login:      Yes           
>   Display connects:          Yes           
>   Timestamp events:          No             
>   Channel vars:                             
>   Debug:                     Yes             
> ----------------------------------------
> And other interesting info: When I restart asterisk, that port changes to other and that happens every asterisk restart.
> Similar appears with 2 versions: 13.10.0 and 13.11.2
> Repeat that on another PC, create new Jail on FreeBSD 10.3-PRERELEASE #0 r295211, install Asterisk 13 and edit only manager.conf to enabled=yes
> Problem exists.



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list