powered by Jive Software

Smack 4.4.4 BOSHConnection connect() fail

Smack 4.4.4 uses BOSH connect (), isConnected () = true to call login (), throws exceptions that the connection is not successful, sometimes it can login () succeed, sometimes fails.

二月 22, 2022 11:38:54 上午 org.igniterealtime.jbosh.BOSHClient init
信息: Starting with 1 request processors
二月 22, 2022 11:38:54 上午 org.jivesoftware.smack.AbstractXMPPConnection callConnectionClosedOnErrorListener
警告: Connection XMPPBOSHConnection[not-authenticated] (901) closed with error
org.igniterealtime.jbosh.BOSHException: Could not parse body:

Error 500 insufficient content written

HTTP ERROR 500 insufficient content written

URI: /http-bind
STATUS: 500
MESSAGE: insufficient content written
SERVLET: org.jivesoftware.openfire.http.HttpBindServlet-61138dfb
at org.igniterealtime.jbosh.BodyParserXmlPull.parse(BodyParserXmlPull.java:132)
at org.igniterealtime.jbosh.StaticBody.fromString(StaticBody.java:114)
at org.igniterealtime.jbosh.ApacheHTTPResponse.awaitResponse(ApacheHTTPResponse.java:246)
at org.igniterealtime.jbosh.ApacheHTTPResponse.getBody(ApacheHTTPResponse.java:192)
at org.igniterealtime.jbosh.BOSHClient.processExchange(BOSHClient.java:1123)
at org.igniterealtime.jbosh.BOSHClient.processMessages(BOSHClient.java:999)
at org.igniterealtime.jbosh.BOSHClient.access$300(BOSHClient.java:100)
at org.igniterealtime.jbosh.BOSHClient$RequestProcessor.run(BOSHClient.java:1728)
at java.lang.Thread.run(Thread.java:748)

Caused by: java.lang.IllegalStateException: Root element was not ‘body’ in the ‘http://jabber.org/protocol/httpbind’ namespace. (Was ‘html’ in ‘’)
at org.igniterealtime.jbosh.BodyParserXmlPull.parse(BodyParserXmlPull.java:98)
… 8 more

    at org.jivesoftware.smack.StanzaCollector.nextResultOrThrow(StanzaCollector.java:276) ~[smack-core-4.4.4.jar!/:?]
    at org.jivesoftware.smack.StanzaCollector.nextResultOrThrow(StanzaCollector.java:228) ~[smack-core-4.4.4.jar!/:?]
    at org.jivesoftware.smack.AbstractXMPPConnection.bindResourceAndEstablishSession(AbstractXMPPConnection.java:762) ~[smack-core-4.4.4.jar!/:?]
    at org.jivesoftware.smack.bosh.XMPPBOSHConnection.loginInternal(XMPPBOSHConnection.java:232) ~[smack-bosh-4.4.4.jar!/:?]
    at org.jivesoftware.smack.AbstractXMPPConnection.login(AbstractXMPPConnection.java:641) ~[smack-core-4.4.4.jar!/:?]
    at org.jivesoftware.smack.AbstractXMPPConnection.login(AbstractXMPPConnection.java:598) ~[smack-core-4.4.4.jar!/:?]
    at org.feige.com.sdk.role.FeigeRole.login(FeigeRole.java:125) [sdk-1.0-SNAPSHOT.jar!/:?]
    at org.feige.com.sdk.tester.FeigeWorkgroup.startUser(FeigeWorkgroup.java:64) [sdk-1.0-SNAPSHOT.jar!/:?]
    at org.feige.com.sdk.tester.TesterManager.startUser(TesterManager.java:250) [sdk-1.0-SNAPSHOT.jar!/:?]
    at org.feige.com.sdk.tester.TesterManager.asyncStartTestWorkgroup(TesterManager.java:210) [sdk-1.0-SNAPSHOT.jar!/:?]
    at org.feige.com.sdk.tester.TesterManager.access$200(TesterManager.java:24) [sdk-1.0-SNAPSHOT.jar!/:?]
    at org.feige.com.sdk.tester.TesterManager$3.run(TesterManager.java:186) [sdk-1.0-SNAPSHOT.jar!/:?]
    at java.util.TimerThread.mainLoop(Timer.java:555) [?:1.8.0_162]
    at java.util.TimerThread.run(Timer.java:505) [?:1.8.0_162]

This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.