Sponsor: VoiceMeUp - Corporate & Wholesale VoIP Services

VoIP Mailing List Archives
Mailing list archives for the VoIP community
 SearchSearch 

[asterisk-users] broken pipe question


 
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> Asterisk Users
View previous topic :: View next topic  
Author Message
geisj at pagestation.com
Guest





PostPosted: Tue Dec 16, 2014 2:04 pm    Post subject: [asterisk-users] broken pipe question Reply with quote

I am running a heartbeat... Asterisk 11.15.0 - same behaviour is noticed on 1.4.43 also

I issue a call through the API that does the below. just UserEvent and Hangup


   -- Executing [s@heartbeat:1] UserEvent("Local/s@heartbeat-0000000f;2", "HeartBeat, Noop") in new stack
    -- Executing [s@heartbeat:2] Hangup("Local/s@heartbeat-0000000f;2", "") in new stack
  == Spawn extension (heartbeat, s, 2) exited non-zero on 'Local/s@heartbeat-0000000f;2'
[Dec 16 13:57:01] ERROR[1956]: utils.c:1440 ast_careful_fwrite: fwrite() returned error: Broken pipe





I get "many" broken pipes (last line above) in the /var/log/asterisk/messages file.
Is there a way to more correctly close and not get that message?


Action: Originate\r\n
Channel: Local/s@smvoice-heartbeat/n\r\n
Context: heartbeat\r\n
Exten: s\r\n
Priority: 1\r\n



Thanks,


jerry
Back to top
dnoll at wi.rr.com
Guest





PostPosted: Tue Dec 16, 2014 8:09 pm    Post subject: [asterisk-users] broken pipe question Reply with quote

On Tue, Dec 16, 2014 at 1:04 PM, Jerry Geis <geisj@pagestation.com (geisj@pagestation.com)> wrote:
Quote:
I am running a heartbeat... Asterisk 11.15.0 - same behaviour is noticed on 1.4.43 also

I issue a call through the API that does the below. just UserEvent and Hangup


   -- Executing [s@heartbeat:1] UserEvent("Local/s@heartbeat-0000000f;2", "HeartBeat, Noop") in new stack
    -- Executing [s@heartbeat:2] Hangup("Local/s@heartbeat-0000000f;2", "") in new stack
  == Spawn extension (heartbeat, s, 2) exited non-zero on 'Local/s@heartbeat-0000000f;2'
[Dec 16 13:57:01] ERROR[1956]: utils.c:1440 ast_careful_fwrite: fwrite() returned error: Broken pipe





I get "many" broken pipes (last line above) in the /var/log/asterisk/messages file.
Is there a way to more correctly close and not get that message?






Assuming you are talking about the Asterisk Management Interface (AMI). 
 
I have seen many broken pipe messages cause by the AMI client closing the connection before reading the response from the server.  Some of the Asterisk Munin-Node plugins suffered from this problem.



After you issue your command, you need to read the response.  You should get a line that says '--END COMMNAD--' or an error response. Since the dialplan is executing, I doubt you will get an error.


Your client should issue a Logoff action, then read all the responses until it gets the 'Thanks for all the fish.' response.  Then close the socket.
Back to top
geisj at pagestation.com
Guest





PostPosted: Wed Dec 17, 2014 10:40 am    Post subject: [asterisk-users] broken pipe question Reply with quote

Hi Dale,

I am in fact doing all the items you suggest. here is a log.


For normal commands I am logging off just fine.
Its just the heartbeat command I am getting an error on when logging out.


Thoughts?


Jerry


------


asterisk_command() Action: Login
asterisk_command() Username: XXXXX
asterisk_command() Secret: XXXXX
asterisk_command() Events: off
asterisk_execute() event_list=0 ret=36 last_command='Events: off' Response: Success[CR ][LF ]Message: Authentication accepted[CR ][LF ][CR ][LF ]
asterisk_command() Action: Command
asterisk_command() Command: confbridge list
asterisk_execute() event_list=0 ret=19 last_command='Command: confbridge list' Response: Follows[CR ][LF ]Privilege: Command[CR ][LF ]Conference Bridge Name           Users  Marked Locked?[LF ]================================ ====== ====== ========[LF ]--END COMMAND--[CR ][LF ][CR ][LF ]
asterisk_command() Action: Logoff
asterisk_execute() event_list=0 ret=37 last_command='Action: Logoff' Response: Goodbye[CR ][LF ]Message: Thanks for all the fish.[CR ][LF ][CR ][LF ]
asterisk_command() Action: Login
asterisk_command() Username: XXXXX
asterisk_command() Secret: XXXXX
asterisk_command() Events: off
asterisk_execute() event_list=0 ret=36 last_command='Events: off' Response: Success[CR ][LF ]Message: Authentication accepted[CR ][LF ][CR ][LF ]
asterisk_command() Action: Originate[CR ][LF ]Async: Yes[CR ][LF ]Channel: Local/s@heartbeat/n[CR ][LF ]Context: heartbeat[CR ][LF ]Exten: s[CR ][LF ]Priority: 1[CR ][LF ]
asterisk_execute() event_list=0 ret=42 last_command='Action: Originate[CR ][LF ]Async: Yes[CR ][LF ]Channel: Local/s@heartbeat/n[CR ][LF ]Context: heartbeat[CR ][LF ]Exten: s[CR ][LF ]Priority: 1[CR ][LF ]' Response: Success[CR ][LF ]Message: Originate successfully queued[CR ][LF ][CR ][LF ]
asterisk_command() Action: Logoff
asterisk_execute() event_list=0 ret=55 last_command='Action: Logoff' Response: Error[CR ][LF ]Message: Missing action in request[CR ][LF ][CR ][LF ]
asterisk_command() Action: Login
asterisk_command() Username: XXXXX
asterisk_command() Secret: XXXXX
asterisk_command() Events: off
asterisk_execute() event_list=0 ret=36 last_command='Events: off' Response: Success[CR ][LF ]Message: Authentication accepted[CR ][LF ][CR ][LF ]
asterisk_command() Action: Command
asterisk_command() Command: confbridge list
asterisk_execute() event_list=0 ret=19 last_command='Command: confbridge list' Response: Follows[CR ][LF ]Privilege: Command[CR ][LF ]Conference Bridge Name           Users  Marked Locked?[LF ]================================ ====== ====== ========[LF ]--END COMMAND--[CR ][LF ][CR ][LF ]
asterisk_command() Action: Logoff
asterisk_execute() event_list=0 ret=37 last_command='Action: Logoff' Response: Goodbye[CR ][LF ]Message: Thanks for all the fish.[CR ][LF ][CR ][LF ]
Back to top
dnoll at wi.rr.com
Guest





PostPosted: Wed Dec 17, 2014 12:15 pm    Post subject: [asterisk-users] broken pipe question Reply with quote

Jerry,

asterisk_execute() event_list=0 ret=55 last_command='Action: Logoff' Response: Error[CR ][LF ]Message: Missing action in request[CR ][LF ][CR ][LF ]



Shows an error.  Perhaps the originate did not complete before the logoff was sent?  I have never used original in AMI so it is just a guess.


Dale
Back to top
Display posts from previous:   
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> Asterisk Users All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

VoiceMeUp - Corporate & Wholesale VoIP Services