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

Matt Jordan (JIRA) noreply at issues.asterisk.org
Mon Jan 21 13:57:21 CST 2013


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

Matt Jordan commented on ASTERISK-20945:
----------------------------------------

To be frank, I'm not sure what's happening on your system at this point. No, {{safe_asterisk}} was not modified for version 11.2.0. If I recall correctly, it wasn't modified for version 11.0.0. Regardless, that's all beside the point. None of the initialization scripts were modified for 11.2.0 - what affected them was a change in the startup sequence and error message handling in {{asterisk.c}}.

Both {{safe_asterisk}} and the various {{init.d}} scripts run a remote console command execution to determine if Asterisk is running, specifically, they check what the version of Asterisk is. In 11.2.0, an error message that previously would never be displayed is now written to stderr - this is the error message you're seeing.

My question was whether or not you applied the entirety of the patch on this issue (ASTERISK-20945-1.8-mjordan.diff). Based on your comment, it *looked* like you only patched the {{init.d}} script, which would mean you would still see the error message printed out when {{safe_asterisk}} attempted to determine if Asterisk was still running.

The fact that the {{_ASTERISK_VARRUN_DIR_}} variable is not populated correctly the the run directory of Asterisk is due (I suspect) to not re-installing Asterisk properly. Regardless, the {{safe_asterisk}} script - and all of the {{init.d}} scripts - use that variable.

As it is, I've gone ahead and set up an OpenSuse 12.2 VM, installed Asterisk 11.2.0, updated the {{init.d}} scripts and {{safe_asterisk}} with the patch on this issue, set up Asterisk to run as a service using {{make config}}, and did not see the error message on starting/stopping Asterisk.
                
> "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