AnsweredAssumed Answered

404 Server not found error while sending message.

Question asked by Aravindhan on Jun 6, 2017

Hi,

I have implemented chat using Smack(Version 4.2) in my android application with Openfire as chat server. I have successfully implemented the connection & login  between the server & client. I was able to send message if both the sender & receiver was admin(user created as administrator). I get to know that message is sent by Incomingmessagelistener prints it in logcat. But when I changed the Sender & receiver with other registered users it throws  error 404 Remote-server-not-found. I have Checked my receiver JID is correct with username@ip/Smack. I didn't understand that in my to i.e receiver address ip 172-31-9-93 was added somehow but my server ip is different.

 

Any help would be highly appreciated.

 

LOGS:

 

System.out: 12:14:12 SENT (0): <message to='username@ip-myawsserverip' id='hT9V2-33' type='chat'><body>test</body></message><r xmlns='urn:xmpp:sm:3'/>

12:14:13 RECV (0): <a xmlns='urn:xmpp:sm:3' h='15' />

12:14:13 RECV (0): <message id="hT9V2-33" to="username@ip-172-31-9-93/Smack" from="username)@ip-myawsserverip" type="error"><error code="404" type="cancel"><remote-server-not-found xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/></error></message>

06-06 12:15:06.408 18187-18194/? W/art: Debugger told VM to exit with status -1

Outcomes