Re: [Asterisk-java-users] Losing connection to Asterisk Manager API
Brought to you by:
srt
From: Eric W. <eri...@gm...> - 2008-07-01 21:03:03
|
I'm working on the logs. It seems as though the Asterisk server is dropping the connection from my server app. The clients remain connected to my app, but my server is no longer connected to Asterisk to send/receive Actions/Events, etc. We had this problem with HudLite which is why I was tasked with building this app server, but it's looking more and more like it could be a problem with the asterisk server itself. Something else funny. I was running this app ON the asterisk server box along side asterisk. So it was connecting to localhost on port 5038. The app would lose it's connection after about 2 to 3 hours and not try to reconnect. I have been running the same app on my work pc connecting to asterisk remotely and it's been running since 10:30am Eastern this morning. It reconnects periodically, but it is not completely losing the connection and sitting in limbo. I can't explain it. Thanks again for all your responses. On Tue, Jul 1, 2008 at 4:50 PM, Martin Smith <ma...@be...> wrote: > Hi Eric, > > > > The situation seems to be that your clients are getting disconnected from > your server application, which in turn talks to Asterisk-Java. I was asking > if your server application would tell your clients about Asterisk-Java > problems/events, or just silently eat them, with the client never knowing. > Either way, logs would be really helpful before I could help more. > > > > Martin > > > ------------------------------ > > *From:* ast...@li... [mailto: > ast...@li...] *On Behalf Of *Eric > Windham > *Sent:* Tuesday, July 01, 2008 4:31 PM > > *To:* ast...@li... > *Subject:* Re: [Asterisk-java-users] Losing connection to Asterisk Manager > API > > > > Thanks Martin > > I'm looking into this now. > > I'm not sure I understand your statement about my app not handing out every > possible event that Asterisk-Java can throw. My proxy is using the > asterisk-java package to connect to the Asterisk Manager and get events. Am > I doing this wrong? > > > On Tue, Jul 1, 2008 at 4:12 PM, Martin Smith <ma...@be...> > wrote: > > Hi Eric, > > Yes, it has built in logging -- see "How do I disable the debug or "INFO" > output from asterisk-java?" at > http://asterisk-java.org/development/faq.html. That should explain how you > can turn more logging on as well. The logging info may be going to > where-ever your server application has configured System.out to be. > > Asterisk-Java's Manager connection starts a thread for pinging the > connection, so I'd have to guess that you're actually hitting a problem on > your server application. 'Broken pipe' shouldn't have anything to do with > Asterisk-Java, unless the JVM itself is crashing (which I doubt, as it > crashes with a crash dump to a text file). > > If you're actually using your application as a proxy <--> Asterisk-Java > <--> Asterisk, you may want to consider that your application isn't handing > out every possible event that Asterisk-Java can throw. Either way, without a > lot more of your source code or software, or a log from A-J (preferably >= > debug level), or a capture of the conversation, I can't really propose what > else it might be that you're running into. > > Good luck, > > > Martin Smith, Systems Developer > ma...@be... > Bureau of Economic and Business Research > University of Florida > (352) 392-0171 Ext. 221 > ________________________________________ > From: ast...@li... [mailto: > ast...@li...] On Behalf Of Eric > Windham > > Sent: Tuesday, July 01, 2008 11:11 AM > > To: ast...@li... > > Subject: Re: [Asterisk-java-users] Losing connection to Asterisk Manager > API > > > Does Asterisk-Java having built in logging? Or is this something I need to > add myself? > > The only thing I'm seeing is in the actual asterisk logs. I'm connecting > to asterisk manager api with a specific user, so I check the logs for when > that user logs on. > > As for my server app, I'm using the Live api and the app runs great for > about 45 minutes to an hour and then it just stops. It doesn't tell me it's > disconnected or anything. The clients connected to it think it's still > connected. Only when I try to connect a new client, the server will throw a > 'Broken Pipe' error. > > > On Tue, Jul 1, 2008 at 11:03 AM, Martin Smith <ma...@be...> > wrote: > Hi Eric, > > Do you have any logs from Asterisk-Java when this reconnect happens? That > is the most definitive way to see what's going on. If you're running a > non-current version of Asterisk, you might also want to take note that some > versions in the past allowed manager connections *before* important things > like pbx.c were even loaded, making it impossible for Asterisk-Java to > determine what version of Asterisk it has connected to, and also making it > impossible to perform almost any operation, for a second or so. > > I'm not familiar with TrixBox, but if this setup involves modifications to > Asterisk itself (as TrixBox usually does -- not sure about HudLite), you may > also be having problems with Asterisk-Java determining the version because > of that. > > Either way, some logs when it happens are your best bet. And unless you > have hundreds of events per second in the PBX, Asterisk-Java and Java > shouldn't be hogging much CPU. > > Cheers, > > Martin Smith, Systems Developer > ma...@be... > Bureau of Economic and Business Research > University of Florida > (352) 392-0171 Ext. 221 > > > ________________________________________ > From: ast...@li... [mailto: > ast...@li...] On Behalf Of Eric > Windham > Sent: Tuesday, July 01, 2008 10:58 AM > To: ast...@li... > Subject: [Asterisk-java-users] Losing connection to Asterisk Manager API > Hi all, > > My company has been using the Trixbox HudLite server to connect a client > app to and get info about the asterisk server. However, the HudLite server > seems to lose it's connection to the Manager API quite frequently making the > client app software work incorrectly(callerid, screenpops, etc.) > > So I built a small java server app that connects to the Manager API through > asterisk-java and allows a new client app(similar to the old one). This > server app seems to be losing it connections to the Manager API also. The > asteriskDefaultServer does not seem to be reconnecting and we're also > noticing that the java process seems to be eating up a lot of the cpu. > > Is anyone else having this problem? Is there a way to ensure a reconnect? > And is java that much of a cpu hog? > > > -- > ------------------------------------------------------------ > Eric Windham > ------------------------------------------------------------ > > ------------------------------------------------------------------------- > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for > just about anything Open Source. > http://sourceforge.net/services/buy/index.php > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > > -- > ------------------------------------------------------------ > Eric Windham > ------------------------------------------------------------ > > ------------------------------------------------------------------------- > Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! > Studies have shown that voting for your favorite open source project, > along with a healthy diet, reduces your potential for chronic lameness > and boredom. Vote Now at http://www.sourceforge.net/community/cca08 > > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > > > -- > ------------------------------------------------------------ > Eric Windham > ------------------------------------------------------------ > > ------------------------------------------------------------------------- > Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! > Studies have shown that voting for your favorite open source project, > along with a healthy diet, reduces your potential for chronic lameness > and boredom. Vote Now at http://www.sourceforge.net/community/cca08 > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > -- ------------------------------------------------------------ Eric Windham ------------------------------------------------------------ |