我正在尝试连接到 Tigase 服务器,使用 smack API 在 Java 中实现客户端。
ConnectionConfiguration config = new ConnectionConfiguration("192.32.104.93", 5222, "ELVES-D463645");
Connection connection = new XMPPConnection(config);
connection.connect();
当代码到达连接时。我得到以下堆栈跟踪。
stream:error (host-unknown)
at org.jivesoftware.smack.PacketReader.parsePackets(PacketReader.java:214)
at org.jivesoftware.smack.PacketReader.access$000(PacketReader.java:44)
at org.jivesoftware.smack.PacketReader$1.run(PacketReader.java:70)
No response from the server.:
at org.jivesoftware.smack.NonSASLAuthentication.authenticate(NonSASLAuthentication.java:73)
at org.jivesoftware.smack.XMPPConnection.login(XMPPConnection.java:230)
at org.jivesoftware.smack.Connection.login(Connection.java:366)
at com.directv.xmpp.client.poc.FirstClient.main(FirstClient.java:20)
XMPPException Occured while connecting to server No response from the server.
谁能帮我看看,我哪里出错了。谢谢!