0

我正在尝试连接到我创建的 Jabberd2 服务器,这就是我所做的:

  ConnectionConfiguration configuration = new;  ConnectionConfiguration("localhost", 5222);
    configuration.setDebuggerEnabled(true);
    XMPPConnection connection = new XMPPConnection(configuration);
    connection.connect();

部分后connect();我收到此错误:

    stream:error (text)
at org.jivesoftware.smack.PacketReader.parsePackets(PacketReader.java:260)
at org.jivesoftware.smack.PacketReader.access$000(PacketReader.java:43)
at org.jivesoftware.smack.PacketReader$1.run(PacketReader.java:70)

这是我的 Smack 调试:已发送:

    <stream:stream to="localhost" xmlns="jabber:client" xmlns:stream="http://etherx.jabber.org/streams" version="1.0">
    <presence id="iuS06-0" type="unavailable"></presence>
    </stream:stream>

已收到:

<?xml version='1.0'?><stream:stream xmlns:stream='http://etherx.jabber.org/streams' xmlns='jabber:client' from='localhost' version='1.0' id='yawymcwsfxk8mzlyapv1y5pvgi9ngnpfxmdky9dd' xmlns:ack='http://www.xmpp.org/extensions/xep-0198.html#ns'><stream:error xmlns:stream='http://etherx.jabber.org/streams'><host-unknown xmlns='urn:ietf:params:xml:ns:xmpp-streams'/><text xmlns='urn:ietf:params:xml:ns:xmpp-streams'>service requested for unknown domain</text></stream:error></stream:stream>

我究竟做错了什么 ?

4

1 回答 1

0

it turned out i was missing section under section in c2s.xml

于 2016-11-21T14:18:14.917 回答