OpenFire disconnects very randomly with following error (XmppReceiverImpl.java initialize:134) - Error Occured Initializing the Receiver - xmpp

My OpenFire server frequenctly disconnectly in a random way with the below exception. I have written a strophe client to receive the notification from the xmpp server. And openFire runs with the apache CAMEL.
ERROR 2013-05-28 19:26:40,628 [http-bio-8181-exec-16] (XmppReceiverImpl.java ini
tialize:134) - Error Occured Initializing the Receiver
No response from server.:
at org.jivesoftware.smackx.muc.MultiUserChat.join(MultiUserChat.java:498
)
at org.jivesoftware.smackx.muc.MultiUserChat.join(MultiUserChat.java:392
)
And my openFire debug gives me following message in red color :
2013.05.28 19:26:24 org.apache.mina.filter.executor.ExecutorFilter - Exiting since queue is empty for /161.85.29.155:50429
2013.05.28 19:26:24 org.jivesoftware.openfire.http.HttpSession - consumeResponse: org.jivesoftware.openfire.http.HttpConnection#125e5eb
2013.05.28 19:26:24 org.jivesoftware.openfire.http.HttpSession - consumeResponse: org.jivesoftware.openfire.http.HttpConnection#14c009f
2013.05.28 19:26:24 org.jivesoftware.openfire.http.HttpSession - consumeResponse: org.jivesoftware.openfire.http.HttpConnection#125e5eb
Any help on this regard would be useful.
Lokesh

Related

Akka connection actor has terminated

I'm working on a REST API that uses Akka, we inherited it from a previous team, and none of us have experience with Akka before this.
Akka is being used to process the data the API is returning, and acting as the HTTP server.
Recently when the API was under load, we started getting failures like so:
),HttpProtocol(HTTP/1.1)), Response: HttpResponse(500 Internal Server Error,List(),HttpEntity.Strict(text/plain; charset=UTF-8,
Error Code: 500
Type: Internal Server Error
Stack Trace:
akka.stream.StreamTcpException: The connection actor has terminated. Stopping now.
),HttpProtocol(HTTP/1.1)), Time: 6430 ms
I have no idea where the above error is happening in the code, or how to appropriately handle this error when it happens.
Can anyone give suggestions on how to trace this down further, or suggestions on how to handle and recover from these types of issues?

Why is Swift Kitura Server Not Terminating Some Threads?

I am having a somewhat reproducible problem on a Swift server I'm running. This is a multi-threaded server, using Kitura. The basics are: After the server has been running for a period of time, download requests start needing retries from the client (usually three retries). The attempts from the client result in the server thread not terminating. On the server, the download problem shows up like this in the log:
[INFO] REQUEST /DownloadFile: ABOUT TO END ...
And then the request never terminates.
The relevant fragment code in my server looks like this:
// <snip>
Log.info(message: "REQUEST \(request.urlURL.path): ABOUT TO END ...")
do {
try self.response.end()
Log.info(message: "REQUEST \(request.urlURL.path): STATUS CODE: \(response.statusCode)")
} catch (let error) {
Log.error(message: "Failed on `end` in failWithError: \(error.localizedDescription); HTTP status code: \(response.statusCode)")
}
Log.info(message: "REQUEST \(request.urlURL.path): COMPLETED")
// <snip>
That is, the server clearly seems to hang on the call to end (a Kitura method). See also https://github.com/crspybits/SyncServerII/blob/master/Sources/Server/Setup/RequestHandler.swift#L105
Immediately before this issue came up last time, I observed the following in my server log:
[2017-07-12T15:31:23.302Z] [ERROR] [HTTPServer.swift:194 listen(listenSocket:socketManager:)] Error accepting client connection: Error code: 5(0x5), ERROR: SSL_accept, code: 5, reason: DH lib
[2017-07-12T15:31:23.604Z] [ERROR] [HTTPServer.swift:194 listen(listenSocket:socketManager:)] Error accepting client connection: Error code: 1(0x1), ERROR: SSL_accept, code: 1, reason: Could not determine error reason.
[2017-07-12T15:31:23.995Z] [ERROR] [HTTPServer.swift:194 listen(listenSocket:socketManager:)] Error accepting client connection: Error code: 1(0x1), ERROR: SSL_accept, code: 1, reason: Could not determine error reason.
[2017-07-12T15:40:32.941Z] [ERROR] [HTTPServer.swift:194 listen(listenSocket:socketManager:)] Error accepting client connection: Error code: 1(0x1), ERROR: SSL_accept, code: 1, reason: Could not determine error reason.
[2017-07-12T15:42:43.000Z] [VERBOSE] [HTTPServerRequest.swift:215 parsingCompleted()] HTTP request from=139.162.78.135; proto=https;
[INFO] REQUEST RECEIVED: /
[2017-07-12T16:32:38.479Z] [ERROR] [HTTPServer.swift:194 listen(listenSocket:socketManager:)] Error accepting client connection: Error code: 1(0x1), ERROR: SSL_accept, code: 1, reason: Could not determine error reason.
I am not sure where this is coming from in the sense that I'm not sure if one of my client's is generating this. I do not explicitly make requests to my server with "/". (I do occasionally see requests made to my server from clients that are not mine-- it is possible this is one of these). Note that all except one of these log messages are coming from Kitura, not directly from my code. My log message is [INFO] REQUEST RECEIVED: /.
If I was a betting man, I'd say the above errors put my server into a state where afterwards, I see this download/retry behavior.
My only solution at this point is to restart the server. From which point the issue doesn't immediately happen.
Thoughts?
I'm not sure if this addresses the root problem, or if it's just a work-around, but it appears to be working. With the server as stated in the question, I had been using Kitura's built-in SSL support. I have now switched to using NGINX as a front-end, and no longer use Kitura's built-in SSL support. NGINX takes care of all the HTTPS/SSL details. Since doing this (about a month ago), and with the server running for all of that intervening time, I have not experience the not terminating issue reported in this question. See also https://github.com/crspybits/SyncServerII/issues/28

Show stacktrace on 500 error when calling tomcat via REST

How can I configure tomcat to show the actual stacktrace during a 500 error on a REST call? Currently I only get a "System error occurred - 500" type of message. Is there a plugin/configuration setting that will allow me to add more detail in the returned error?
I see a similar question: Tomcat not showing full stack trace in Error Report for Http status 500 error but this suggests going to the server logs. I would like (at least in development mode) to see the error at the client side.

"Failed to parse extension packet in Presence packet" error, causing disconnects, with Smack

I've implemented a chat client that stays online forever and sends messages to different XMPP users. This client is connected to ejabberd server and is implemented in java using Smack.
After exactly 1 minute, the client goes offline and then comes back online in almost 15 seconds. The log that appears on client's console, follows:
java.io.EOFException: no more data available - expected end tag </stream:stream> to close start tag <stream:stream> from line 1, parser stopped on END_TAG seen...erd.cloudservicesplatform.biz/cspb2\' id=\'t5f8L-12\' type=\'result\'/>... #1:1264
at org.xmlpull.mxp1.MXParser.fillBuf(MXParser.java:3035)
at org.xmlpull.mxp1.MXParser.more(MXParser.java:3046)
at org.xmlpull.mxp1.MXParser.nextImpl(MXParser.java:1144)
at org.xmlpull.mxp1.MXParser.next(MXParser.java:1093)
at org.jivesoftware.smack.PacketReader.parsePackets(PacketReader.java:279)
at org.jivesoftware.smack.PacketReader.access$000(PacketReader.java:44)
at org.jivesoftware.smack.PacketReader$1.run(PacketReader.java:70)
Failed to parse extension packet in Presence packet.
java.io.EOFException: no more data available - expected end tag </stream:stream> to close start tag <stream:stream> from line 1, parser stopped on END_TAG seen
...<query xmlns=\'jabber:iq:version\'/>\n</iq>... #6:6
at org.xmlpull.mxp1.MXParser.fillBuf(MXParser.java:3035)
at org.xmlpull.mxp1.MXParser.more(MXParser.java:3046)
at org.xmlpull.mxp1.MXParser.nextImpl(MXParser.java:1144)
at org.xmlpull.mxp1.MXParser.next(MXParser.java:1093)
at org.jivesoftware.smack.PacketReader.parsePackets(PacketReader.java:279)
at org.jivesoftware.smack.PacketReader.access$000(PacketReader.java:44)
at org.jivesoftware.smack.PacketReader$1.run(PacketReader.java:70)
Failed to parse extension packet in Presence packet.
java.io.EOFException: no more data available - expected end tag </stream:stream> to close start tag <stream:stream> from line 1, parser stopped on END_TAG seen
...=\'cspbox107#dev-ejabberd.cloudservicesplatform.biz\'/></query></iq>... #6:292
at org.xmlpull.mxp1.MXParser.fillBuf(MXParser.java:3035)
at org.xmlpull.mxp1.MXParser.more(MXParser.java:3046)
at org.xmlpull.mxp1.MXParser.nextImpl(MXParser.java:1144)
at org.xmlpull.mxp1.MXParser.next(MXParser.java:1093)
at org.jivesoftware.smack.PacketReader.parsePackets(PacketReader.java:279)
at org.jivesoftware.smack.PacketReader.access$000(PacketReader.java:44)
at org.jivesoftware.smack.PacketReader$1.run(PacketReader.java:70)
Failed to parse extension packet in Presence packet.
Smack until 3.3.0 throw an exception when a malformed presence stanza was received. This behavior was changed with SMACK-390.
You should:
update to the latest Smack Version (i.e. 3.4.1 at the time of writing)
inform the developer of the library/program where the malformed stanza originates from about the bug
Edit: After having a close look at the logs and since you didn't mention the used Smack version, it seems also likely that you simply received a malformed stanza which causes the disconnect (This would be a non-recoverable error, even on Smack 3.4.1).

ATG- Issue in sending email through atg scenario

I have a requirement to send an email after registration of a new user my ATG application.
I have created a template jsp and created a scenario in ATG for that.
I also configured config/atg/scenario/IndividualEmilSender.properties with below key-value-
contextPathPrefix=/teststore
siteHttpServerName=localhost
siteHttpServerPort=8080
And /config/atg/userprofiling/email/TemplateEmailSender.properties as:-
$class=atg.userprofiling.email.TemplateEmailInfoImpl
mailingName=Your Mailing
contextPathPrefix=/teststore
messageSubject^=/atg/dynamo/service/SMTPEmail.defaultSubject
messageFrom^=/atg/dynamo/service/SMTPEmail.defaultFrom
contentProcessor=/atg/userprofiling/email/HtmlContentProcessor
fillFromTemplate=true
templateURL=/NewUserRegistered.jsp
loggingDebug=true
But getting following exception-
ERROR [ScenarioManager] Error while processing individual timer message InstanceTimerMessage[17000001,/TestStore/RegistrationScenario.sdl,NewMembers,3,in 1 mins]; rolling back the transaction java.lang.NullPointerException
at atg.scenario.action.SendEmail.createTemplateEmailInfo(SendEmail.java:193)
at atg.scenario.action.SendEmail.execute(SendEmail.java:526)
at atg.process.ProcessManagerService.executeAction(ProcessManagerService.java:14001)
at atg.process.ProcessManagerService.takeIndividualTransition(ProcessManagerService.java:13408)
at atg.process.ProcessManagerService.receiveIndividualTimerMessage(ProcessManagerService.java:12732)
at atg.process.ProcessManagerService.receiveMessage(ProcessManagerService.java:11416)
at atg.process.ProcessManagerService.receiveMessage(ProcessManagerService.java:11341)
at atg.dms.patchbay.ElementManager.deliverMessage(ElementManager.java:316)
at atg.dms.patchbay.InputPort.onMessage(InputPort.java:190)
at atg.dms.patchbay.InputDestination.onMessage(InputDestination.java:397)
at atg.dms.patchbay.InputDestinationConsumer.processMessageDelivery(InputDestinationConsumer.java:501)
at atg.dms.patchbay.InputDestinationConsumer.runXATransactions(InputDestinationConsumer.java:371)
at atg.dms.patchbay.InputDestinationConsumer.run(InputDestinationConsumer.java:245)
at java.lang.Thread.run(Thread.java:662)
10:34:32,527 INFO [ScenarioManager] DEBUG [message]: message ID:170000 failed a total of 1 times so far
10:34:32,543 ERROR [MessagingManager] An error occurred while MessageSink with nucleus name "/atg/scenario/ScenarioManager" was receiving a Message from input port "IndividualTimers": javax.jms.JMSException: CONTAINER:atg.process.ProcessException; SOURCE:java.lang.NullPointerException
10:34:32,558 INFO [ScenarioManager] DEBUG received message on port IndividualTimers message: jms-msg:ID:170000
10:34:32,558 INFO [ScenarioManager] DEBUG [message]: not processing message ID:170000 after 1 failed delivery attempts
Please help to resolve this!
Thanks!
You are getting a NullPointerException because your DefaultEmailInfo is not configured correctly.
Have a look at the chapter around Sending Targeted E-mail as well as the SendMail action in the documentation.
It is likely that you are missing one or more of the required configuration changes.