I have a working installation of asterisk v184.108.40.206 with dahdi-linux-2.4.0-69, and it doesn’t seem to be logging properly. There is nothing in /var/log/asterisk/messages except for lines like this:
[Feb 9 19:05:39] ERROR utils.c: write() returned error: Broken pipe
They just repeat like that, sometimes two or three per second, and sometimes not for almost an hour between them.
These lines are the only information in that file. How can I have it record who has called, and other general on-going status information?
How can I figure out what is causing the ERROR above?
Does anyone have any ideas of how I can troubleshoot this? I’m concerned that it may somehow be configured because of the fwrite() error messages in the logs. How can I figure out how those errors are being produced?
February 14, 2011, 12:02pm
That looks like a network write, not a log write. Probably AMI. It could also be a write to an asterisk CLI processor.
To debug, set a breakpoint on the output of the message and obtain a traceback.
[quote=“david55”]That looks like a network write, not a log write. Probably AMI. It could also be a write to an asterisk CLI processor.
To debug, set a breakpoint on the output of the message and obtain a traceback.[/quote]
Hi, can you explain a bit further how to go about doing this? I’m not familiar with the terminology.
Sure would appreciate any further ideas.
Can I ask someone to take a look at this error that I posted some time ago again for any possible suggestions on how to troubleshoot this?
That error message is produced by ast_carefulwrite(). It means that a network (or pipe) write failed because the other side has gone away. This routine is used in the following places:
main/cli.c: ast_carefulwrite(fd, buf->str, strlen(buf->str), 100);
res/res_agi.c: return ast_carefulwrite(fd, buf->str, buf->used, 100);
To decide whether it is related to CLI, or AGI, you need to either take account of knowledge of how Asterisk was being used at the time, or, as I already said, set a breakpoint and get a backtrace. AMI can result in a similar message, but it will say fwrite, rather than write.
It is conceivable that some versions of Asterisk use write from manager.
I notice your subject says fwrite, but the actual error message is write. As noted above, both can produce similar messages, but from slightly different parts of Asterisk.