XMPP:BOSH客户端使用Blabber没有获得代理响应

时间:2015-02-11 09:55:32

标签: xmpp bosh

我正在尝试与端口7070上的openfire服务器建立BOSH连接,防火墙未阻止,并且openfire主动侦听。没有代理,它可以很好地运行在同一网络上运行的openfire,但是代理会收到以下错误,

java.io.IOException: java.net.SocketTimeoutException: Read timed out
at rocks.xmpp.core.session.XmppSession.connect(XmppSession.java:737)
at com.geo.XMPPBosh.XMPPDemo.main(XMPPDemo.java:45)

Caused by: java.net.SocketTimeoutException: Read timed out
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:152)
at java.net.SocketInputStream.read(SocketInputStream.java:122)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:235)
at java.io.BufferedInputStream.read1(BufferedInputStream.java:275)
at java.io.BufferedInputStream.read(BufferedInputStream.java:334)
at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:687)
at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:633)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1323)
at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:468)
at rocks.xmpp.extensions.httpbind.BoshConnection$2.run(BoshConnection.java:564)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Exception in thread "main" java.lang.IllegalStateException: You must be connected to the server before trying to login.
at rocks.xmpp.core.session.XmppSession.login(XmppSession.java:827)
at com.geo.XMPPBosh.XMPPDemo.main(XMPPDemo.java:52)

以下是代码,

BoshConnectionConfiguration boshConfiguration = BoshConnectionConfiguration
.builder().hostname("remote address").port(7070)
.proxy(new Proxy(Proxy.Type.HTTP,new InetSocketAddress("proxy address", 10015))).file("/http-bind/").wait(5000).build();

帮助解决可能的原因或解决方案。

0 个答案:

没有答案