在XMPP中找不到远程服务器 [英] Remote server not found in XMPP

查看:113
本文介绍了在XMPP中找不到远程服务器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将数据包发送给客户端

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>

并收到

   <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>

出什么问题了?

推荐答案

该节有两个问题.

1)您输入的是'localhsot'而不是'localhost'.

1) You've typod 'localhsot' instead of 'localhost'.

2)您正在将"from"放在节上.假设您是发送此消息的客户端,最好不要使用发件人",而让服务器自己对其进行标记,就好像您从发件人"中弄错了一样,服务器将开始拒绝节.在您的情况下,这是错误的,因为您使用的是客户端的裸机JID,而不是完整的JID.

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.

这篇关于在XMPP中找不到远程服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆