[asterisk-bugs] [JIRA] (ASTERISK-20945) "Unable to connect to remote asterisk" message on service asterisk start, even though service is running

Danny Nicholas (JIRA) noreply at issues.asterisk.org
Mon Jan 21 11:27:21 CST 2013


    [ https://issues.asterisk.org/jira/browse/ASTERISK-20945?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=201958#comment-201958 ] 

Danny Nicholas commented on ASTERISK-20945:
-------------------------------------------

The safe_asterisk file doesn't change between 11.0.0 and 11.2.0.  I went back to my 11.0.0 source tree and did make install to get 11.0.0 back up.  That starts and stops fine.  Then shut it down and went to 11.2.0 source tree, did make install and back to same problem with the exception that the contributed safe_asterisk now dies with this result
Asterisk died with code 127.
cat: __ASTERISK_VARRUN_DIR__/asterisk.pid: No such file or directory
Automatically restarting Asterisk.
Asterisk ended with exit status 127
Asterisk died with code 127.
cat: __ASTERISK_VARRUN_DIR__/asterisk.pid: No such file or directory
Automatically restarting Asterisk.
Asterisk ended with exit status 127
Asterisk died with code 127.
cat: __ASTERISK_VARRUN_DIR__/asterisk.pid: No such file or directory
Automatically restarting Asterisk.
Asterisk ended with exit status 127
Asterisk died with code 127.
cat: __ASTERISK_VARRUN_DIR__/asterisk.pid: No such file or directory
Automatically restarting Asterisk.
Asterisk ended with exit status 127
Asterisk died with code 127.

here is the "diff" between the two files.
diff -s /usr/sbin/safe_asterisk /usr/local/src/asterisk-11.2.0/contrib/scripts/safe_asterisk
4c4,8
< CLIARGS="$*"                          # Grab any args passed to safe_asterisk
---
> ASTSBINDIR=__ASTERISK_SBIN_DIR__
> ASTVARRUNDIR=__ASTERISK_VARRUN_DIR__
> ASTVARLOGDIR=__ASTERISK_LOG_DIR__
>
> CLIARGS="$*"                                  # Grab any args passed to safe_asterisk
7,12c11,18
< #NOTIFY=ben at alkaloid.net      # Who to notify about crashes
< #EXEC=/path/to/somescript     # Run this command if Asterisk crashes
< #LOGFILE=/path/to/logfile     # Where to place the normal logfile (disabled if blank)
< #SYSLOG=local0                                # Which syslog facility to use (disabled if blank)
< MACHINE=`hostname`                    # To specify which machine has crashed when getting the mail
< DUMPDROP=/tmp
---
> #NOTIFY=root at localhost.localdomain            # Who to notify about crashes
> NOTIFY=${NOTIFY:-}                            # Who to notify about crashes
> #EXEC=/path/to/somescript                     # Run this command if Asterisk crashes
> #LOGFILE=${ASTVARLOGDIR}/safe_asterisk.log    # Where to place the normal logfile (disabled if blank)
> SYSLOG=${SYSLOG:-}                            # Which syslog facility to use (disabled if blank)
> MACHINE=`hostname`                            # To specify which machine has crashed when getting the mail
> DUMPDROP=${DUMPDROP:-/tmp}
> RUNDIR=${RUNDIR:-/tmp}
14,15d19
< ASTSBINDIR=/usr/sbin
< ASTVARRUNDIR=/var/run/asterisk
48c52
< VERSION=`${ASTSBINDIR}/asterisk -rx 'core show version'`
---
> VERSION=`${ASTSBINDIR}/asterisk -nrx 'core show version'`
121a126,135
>
> if test ! -d "${RUNDIR}" ; then
>       message "${RUNDIR} does not exist, creating"
>       mkdir -p "${RUNDIR}"
>       if test ! -d "${RUNDIR}" ; then
>               message "Unable to create ${RUNDIR}"
>               exit 1
>       fi
> fi
>
149c163
<                       cd /tmp
---
>                       cd "${RUNDIR}"
153c167
<                       cd /tmp
---
>                       cd "${RUNDIR}"
176,179c190,193
<                       if test -f /tmp/core.${PID} ; then
<                               mv /tmp/core.${PID} ${DUMPDROP}/core.`hostname`-$DATE &
<                       elif test -f /tmp/core ; then
<                               mv /tmp/core ${DUMPDROP}/core.`hostname`-$DATE &
---
>                       if test -f ${RUNDIR}/core.${PID} ; then
>                               mv ${RUNDIR}/core.${PID} ${DUMPDROP}/core.`hostname`-$DATE &
>                       elif test -f ${RUNDIR}/core ; then
>                               mv ${RUNDIR}/core ${DUMPDROP}/core.`hostname`-$DATE &
186,189c200,203
<                       if test -f /tmp/core.${PID} ; then
<                               mv /tmp/core.${PID} ${DUMPDROP}/core.`hostname`-$DATE &
<                       elif test -f /tmp/core ; then
<                               mv /tmp/core ${DUMPDROP}/core.`hostname`-$DATE &
---
>                       if test -f ${RUNDIR}/core.${PID} ; then
>                               mv ${RUNDIR}/core.${PID} ${DUMPDROP}/core.`hostname`-$DATE &
>                       elif test -f ${RUNDIR}/core ; then
>                               mv ${RUNDIR}/core ${DUMPDROP}/core.`hostname`-$DATE &

                
> "Unable to connect to remote asterisk" message on service asterisk start, even though service is running
> --------------------------------------------------------------------------------------------------------
>
>                 Key: ASTERISK-20945
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-20945
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Core/General
>    Affects Versions: 1.8.20.0
>         Environment: CentOS 5.8
> Kernel - 2.6.18-308.24.1.el5PAE
>            Reporter: Warren Selby
>            Assignee: Matt Jordan
>         Attachments: ASTERISK-20945-1.8-mjordan.diff, asterisk-20945-remote-intro-msg.diff
>
>
> Installed asterisk 1.8.19.1, worked fine. Installed 1.8.20.0, and started seeing the following issues, with the same config files for both:
> When I start the asterisk service using "service asterisk start" from the command line, this is the output:
> {noformat}
> [root at pbx ~]# service asterisk start
> Unable to connect to remote asterisk (does /var/run/asterisk/asterisk.ctl exist?)
> Starting asterisk:
> {noformat}
> However, the /var/run/asterisk/asterisk.ctl file is being created and the process is starting:
> {noformat}
> [root at pbx ~]# ls -lh /var/run/asterisk/
> total 4.0K
> srwxr-xr-x 1 root root 0 Jan 16 12:07 asterisk.ctl
> -rw-r--r-- 1 root root 6 Jan 16 12:07 asterisk.pid
> {noformat}
> However, I'm no longer getting the usual splash message when I connect to the asterisk console...this is what I get:
> {noformat}
> [root at pbx ~]# asterisk -r
> Verbosity is at least 3
> pbx*CLI>
> {noformat}
> I don't have any peers setup yet, or even any dialplan configured to test, but when I go through the logs, I don't find any errors or warnings that I'm not expecting.
> I've gone back to the asterisk 1.8.19.1 install and everything works as expected (no error messages, full splash about license / version on connection to console, etc).  I performed make clean in my 1.8.20 source directory, then ./configure, make menuselect, make, make install, and even make config, and I'm still seeing this message pop up when restarting / starting the service. 
> I went through the CHANGELOG.TXT for 1.8.20.0 and it appears there are some items talking about changing the way the process starts up (commit r376428), but I'm not enough of a coder to understand if those would cause what I'm seeing.  

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira



More information about the asterisk-bugs mailing list