powered by Jive Software

Connection closed on error exception

Hi we have implemented ssl on our ejabbered server. After that it is not connecting with server and getting this exception in android -

closed with error
org.jivesoftware.smack.SmackException$SmackMessageException: Parser got END_DOCUMENT event. This could happen e.g. if the server closed the connection without sending a closing stream element

I am unable to find out any solution. Please help.

This seems to be the server (or network?) very abruptly closing the network connection. I suggest to try and find out why that happens. Look at the log files of the server, which might contain a clue.

But its working fine for iOS and web portal. the log which i have mentioned in the post is the only one which i am getting. There is no proper information what is the issue.

Right, but it is very likely that there is also information in the server side, hence Guus’ suggestion to also look at the log files on the server.

No logs are being printed on server log file. but if i add certificate in app and use that certificate with setSocektFactory then it is connecting with the server without any issue but the issue with the certificate is that i will be required to change the certificate whenever the existing certificate gets expired.

Which Smack version is this?

smack 4.4.0. i tried with 4.4.5 but same issue

In web and ios it’s connecting but in android it’s throwing this exception

Can you try if it is XMPP compliant?

This topic was automatically closed 62 days after the last reply. New replies are no longer allowed.