问题
i send Packet to client
<iq id="kGufc-4" to="tp@localhsot" from="admin@localhost" type="get"><query xmlns='http://localhost/protocol/disco#info'/></iq>
And received
<iq id="kGufc-4" to="admin@localhost/testchat" from="tp@localhsot" type="error"><error code="404" type="CANCEL"><remote-server-not-found xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/></error></iq>
what is problem???
回答1:
You have two problems with that stanza.
1) You've typod 'localhsot' instead of 'localhost'.
2) You're putting a 'from' on the stanza. Assuming you're a client sending this, it is better to not use a 'from', and let the server stamp it itself, as if you get the 'from' wrong, the server will start rejecting stanzas. In your case it's wrong as you're using the bare JID of the client, not the full JID.
Try resolving those first, and then seeing what happens.
来源:https://stackoverflow.com/questions/27353667/remote-server-not-found-in-xmpp