title: Smack on Android, getting error code="404" remote-server-not-found while sending packets/message between two users via local Openfire server
body: <p>I was glad to implement smack on android via local Openfire server where it connects to Gmail server-host and it worked like charm. The tutorial found <a href="http://florentgarin.developpez.com/tutoriel/android/client-xmpp/" rel="nofollow">here</a></p>
  
  <p>But I'm getting an error (pasted below) when I'm trying to connect two users via android emulators with a local Openfire server installed.</p>
  
  <pre><code>03-23 16:24:01.392: DEBUG/SMACK(233): 04:24:01 PM SENT (1155246128): &lt;message id="t0tgA-5" to="justestingchat2" type="chat"&gt;&lt;body&gt;hi&lt;/body&gt;&lt;/message&gt;
  03-23 16:24:07.032: DEBUG/SMACK(233): 04:24:07 PM RCV  (1155246128): &lt;message id="t0tgA-5" to="justestingchat@admin-pc/Smack" from="justestingchat2" type="error"&gt;&lt;error code="404" type="cancel"&gt;&lt;remote-server-not-found xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/&gt;&lt;/error&gt;&lt;/message&gt;
  03-23 16:24:07.062: INFO/System.out(233): Received message: null
  </code></pre>
  
  <p><strong>Here are some of my system level description:</strong></p>
  
  <ul>
  <li>I'm trying to connect two users with different user name, e-mail and passwords via two emulators in android.</li>
  <li>Both the user show "Presence - Available" in the dashboard of Openfire when they are logged in <code>Presence presence = new Presence(Presence.Type.available);</code></li>
  <li>From the Error code pasted above the Message Id is same and i guess there is no problem with that. (correct me if I'm wrong)</li>
  <li>I use the <code>Packet Listener</code> as provided in the tutorial above <a href="http://pastebin.com/mVS4a9AE" rel="nofollow">code</a></li>
  <li>I also tried using chat manager in listening to the message using this <a href="http://pastebin.com/NfgqwA4k" rel="nofollow">code</a>
  but no use it returned "Null"</li>
  </ul>
  
  <p>Please can some one help me what's actually wrong? If it could work with google talk why not local server? Or is it may be because of using emulator? </p>
  
  <p><strong>UPDATE 1:</strong></p>
  
  <p>For finding out where the problem is! I downloaded <a href="http://www.igniterealtime.org/downloads/index.jsp" rel="nofollow">Spark</a> client and did some testing. I have found out that <strong>I'm able to send packets/messages from Spark to Android Client but not from Android to Spark, which gives me a Error 404!</strong> Can any one still help me with atleast some clues please?</p>