I am using Asterisk-Java to listen to messages from an Asterisk PBX. This app used to work, but I made a few changes, and now when I try to run it and make a test conference call from my desk phone, it says:
Asterisk-Java ManagerConnection-0-Reader-2 2012-06-06 17:17:46,858 DEBUG [manager.internal.ManagerConnectionImpl] - Dispatching event:
org.asteriskjava.manager.event.MeetMeJoinEvent[dateReceived='Wed Jun 06 17:17:46 BST 2012',privilege='call,all',sequencenumber=null,meetme='1',calleridname=null,timesta
mp=null,uniqueid='1338999461.46707',server=null,calleridnum=null,channel='SIP/10.252.26.15-08b76ab0',usernum='1',systemHashcode=233612073]
Asterisk-Java ManagerConnection-0-Reader-2 2012-06-06 17:17:46,869 DEBUG [manager.internal.ManagerConnectionImpl] - Dispatching event:
org.asteriskjava.manager.event.DisconnectEvent[dateReceived='Wed Jun 06 17:17:46 BST 2012',timestamp=null,sequencenumber=null,server=null,systemHashcode=681515782]
Asterisk-Java ManagerConnection-0-Reader-2 2012-06-06 17:17:46,870 INFO [manager.internal.ManagerConnectionImpl] - Closing socket.
You can see there was a DisconnectEvent received directly after the MeetMeJoinEvent. This happens every time - it always happens immediately after a MeetMeJoinEvent. The DisconnectEvent is a psuedo-event meaning that Asterisk disconnected from my app - it did not disconnect from the caller.
Subsequently, Asterisk-Java automatically reconnects immediately, but then it will happen again the same way if I make another test call. I've tried restarting the Glassfish application server.
I don't think any of my changes should have caused this, and there is only one line of code that calls disconnect on the Asterisk connection (when the web app shuts down), and the log message corresponding to that line does not appear in the logs.
What could be causing this?
It was not actually Asterisk disconnecting from the app - it was the app disconnecting from Asterisk.
This occurred because Asterisk-Java has a bug: it catches Exceptions in event handlers but not Errors. And then it assumes that Asterisk must have disconnected if it gets an uncaught Throwable.
I found the uncaught exception stack trace in the main Glassfish log file.
Related
I'm using Sftp adapter in BizTalk 2020 for receiving and sending files.
In the past the corresponding Receive Location stopped working because of Connection Failures. A restart of the Receive Location was the solution here.
Therefore we enabled Logs within the Receive Location Configuration - now every time the polling is executed, some Logs were written into the configured file.
The Poll Interval is set to 20 mins.
Last week the Polling of the Receive Location stopped working again.
No logs were written into the configured log file after the last execution - which means that the polling wasn't executed anymore. The Eventviewer also didnt show any Logs.
The problem is that we don't have any BizTalk feedback (like disabling Receive Location etc.).
A restart of the Receive Location didn't help.
I needed to restart the Hostinstance.
Are there any common issues known for the constellation of the Usage of Sftp Adapter?
Is there a way to prevent getting this scenario again?
An instance of a BizTalk send pipeline has started to run continuously. On 09/12/2021 an attempt was made to send a file via SFTP, which retried several times but ultimately failed due to a network issue. The error from the event logs is:
The adapter failed to transmit message going to send port "Deliver Outgoing - SFTP" with URL "sftp://xxx.xxxxxx.co.nz:22/To_****/%SourceFileName%". It will be retransmitted after the retry interval specified for this Send Port. Details:"WinSCP.SessionRemoteException: Network error: Software caused connection abort.
For some reason BizTalk made another send attempt at 1:49pm on 10/12/2021 which succeeded as confirmed by the administrator of the SFTP site. Despite this, BizTalk continued making intermittent send attempts and the pipeline instance is still running. The same file has been sent 4 times to the SFTP server.
The pipeline instance in theory should have suspended at 9:47pm on 09/12/2021. I have been able to confirm definitively whether anybody resumed it, but it seems unlikely at this stage. In any case, after sending successfully the pipeline instance should have terminated and should not be re-executing intermittently.
Does anybody know what could account for this behaviour? This is occurring on BTS2020 with CU2 applied.
I've sent messages over SFTP where the WinSCP interpretation of the date-modified attribute doesn't work with a specific type of SFTP server.
With the WinSCP GUI a dialogue box appears and you can disregard this error, but this option isn't available with BizTalk's GUI. This error appears when a file with the same filename already exists on the server and is supposed to be overwritten.
My solution was to create a pipeline component that removed %SourceFileName% on the server. The pipeline component (just like WinSCP GUI) can disregard the modified-date.
I have a Spring mvc application, and I'm using websockets to communicate a phisical device that sends data with an angular 2 front end.
the architecture is like this
device ----> Spring Mvc <-----angular 2 front end
I have a datasource listener that publish to a websocket topic everytime a new message appears and I consume that topic from angular.
My problem is that this is working properly in my local tomcat install but when I upload it to a faster server it doesn't.
The main problem I'm having is that is buffering the messages and is reaching the limit and closing the websocket session.
What I noticed checking the logs is that in my local server messages come 20 milliseconds after last one is finished but in the other server sometimes are coming at the same time and they are being buffered throwing the session limit exception.
I tried setting a higher buffer size.
Also tried a thread.sleep but it doesn't worked.
Do you have some ideas what can I do ? should I implement some kind of message queue ?
Thanks in advance
How do I detect when a client is failing to connect (or re-connect) to a Signalr hub?
Is there an event that fires on the js client?
Responding to your second comment:
Currently in 0.5.3 SignalR does not handle the case when the server goes away. However, this will be/is handled in the next release 1.0alpha.
For the interim I'd recommend pinging the server every 5 seconds and seeing if the request fails. If it fails say 2 times then chances are the server is down and you can handle the logic from there.
If you'd like to see how we do it in the next release here's the link to the github feature: https://github.com/SignalR/SignalR/issues/469
I have a client that registers with JMX for notifications.
Whenever that JMX Notifications Emitting application is restarted I get an exception
01/08/2010 16:28:04 com.sun.jmx.remote.ws.client.JMXWSManStub fetchNotifications
WARNING: Exception java.io.IOException: java.net.ConnectException: Connection refused: connectoccured during fetch. Closing connection
And stop getting notifications (Obviously).
I would like to be able to catch this exception so I can start a thread that will poll on the target application until it's back up and then I would like to re-register with the events.
My question is - How can I handle this exception myself? Currently the JMX Platform catches it and I'm not sure If I can take over handling it myself.
Thanks for the help!
Well.. Since no one answered...
My solution was to do polling on the server by removing and re-adding notifications every few seconds.
It's not perfect but there is really no way (That I could find) to 'ask' if a notification is still listening.