Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-5345

Hudson leaving the google talk chatroom each time a user enters or leaves the room

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • jabber-plugin
    • None
    • hudson 1.341 deployed in tomcat 6.0.20

      I'm using hudson with the jabber plugin (version 1.5) as a bot on a googletalk chatroom. Connection and interaction with hudson through the chatroom works fine, but each time a user enters or leaves the chatroom, hudson gets disconnected. In the logs I can see the following lines:

      org.xmlpull.v1.XmlPullParserException: parser must be on START_TAG or TEXT to read text (position: START_TAG seen ...n"><body><user:x xmlns:user="http://jabber.org/protocol/muc#user">... @13:405)
      at org.xmlpull.mxp1.MXParser.nextText(MXParser.java:1039)
      at org.jivesoftware.smack.util.PacketParserUtils.parseMessage(PacketParserUtils.java:85)
      at org.jivesoftware.smack.PacketReader.parsePackets(PacketReader.java:286)
      at org.jivesoftware.smack.PacketReader.access$000(PacketReader.java:43)
      at org.jivesoftware.smack.PacketReader$1.run(PacketReader.java:63)
      Jan 21, 2010 4:12:13 PM hudson.plugins.im.IMConnectionProvider$ConnectorRunnable run
      INFO: Trying to connect
      Jan 21, 2010 4:12:13 PM hudson.plugins.jabber.im.transport.JabberIMConnection close
      FINE: java.lang.IllegalStateException: Not connected to server.
      Jan 21, 2010 4:12:14 PM hudson.plugins.jabber.im.transport.JabberIMConnection connect
      INFO: Connected to XMPP on talk.google.com:5223
      Jan 21, 2010 4:12:14 PM hudson.plugins.jabber.im.transport.JabberIMConnection connect
      INFO: Joined groupchat private-chat-7930f4dd-0629-447e-bd2e-62ca1679f4fd@groupchat.google.com
      org.xmlpull.v1.XmlPullParserException: parser must be on START_TAG or TEXT to read text (position: START_TAG seen ...n"><body><user:x xmlns:user="http://jabber.org/protocol/muc#user">... @2:1236)
      at org.xmlpull.mxp1.MXParser.nextText(MXParser.java:1039)
      at org.jivesoftware.smack.util.PacketParserUtils.parseMessage(PacketParserUtils.java:85)
      at org.jivesoftware.smack.PacketReader.parsePackets(PacketReader.java:286)
      at org.jivesoftware.smack.PacketReader.access$000(PacketReader.java:43)
      at org.jivesoftware.smack.PacketReader$1.run(PacketReader.java:63)

          [JENKINS-5345] Hudson leaving the google talk chatroom each time a user enters or leaves the room

          jpollak added a comment -

          I'm not sure if I have the same issue or not, but it seems related.

          As soon as any event occurs on the hudson server (like a build completes), hudson leaves the chat room. It still seems to send IMs to users though.

          Our Hudson server is configured to join a room called "hudson@conference.kivasystems.com", which it does. This is specified in both the global config and a specific build job.

          We are using an OpenFire server.

          This is all that appears in the logs. I'm not sure how to get more information.

          Mar 24, 2010 10:53:44 AM hudson.plugins.jabber.im.transport.JabberIMConnection createConnection
          INFO: Accepting all subscription requests
          Mar 24, 2010 10:53:44 AM hudson.plugins.jabber.im.transport.JabberIMConnection connect
          INFO: Connected to XMPP on chat.kivasystems.com:5222/kivasystems.com using TLS
          Mar 24, 2010 10:53:44 AM hudson.plugins.jabber.im.transport.JabberIMConnection connect
          INFO: Joined groupchat hudson@conference.kivasystems.com

          jpollak added a comment - I'm not sure if I have the same issue or not, but it seems related. As soon as any event occurs on the hudson server (like a build completes), hudson leaves the chat room. It still seems to send IMs to users though. Our Hudson server is configured to join a room called "hudson@conference.kivasystems.com", which it does. This is specified in both the global config and a specific build job. We are using an OpenFire server. This is all that appears in the logs. I'm not sure how to get more information. Mar 24, 2010 10:53:44 AM hudson.plugins.jabber.im.transport.JabberIMConnection createConnection INFO: Accepting all subscription requests Mar 24, 2010 10:53:44 AM hudson.plugins.jabber.im.transport.JabberIMConnection connect INFO: Connected to XMPP on chat.kivasystems.com:5222/kivasystems.com using TLS Mar 24, 2010 10:53:44 AM hudson.plugins.jabber.im.transport.JabberIMConnection connect INFO: Joined groupchat hudson@conference.kivasystems.com

          kutzi added a comment -

          @jpollak: which Jabber plugin version are you using?

          kutzi added a comment - @jpollak: which Jabber plugin version are you using?

          kutzi added a comment -

          Please try with Jabber plugin 1.8 or up.
          The underlying Jabber library has changed, so I think that the behaviour may have changed.

          kutzi added a comment - Please try with Jabber plugin 1.8 or up. The underlying Jabber library has changed, so I think that the behaviour may have changed.

          I tried with version 1.9, but I still have the same issue, excepted that the logs are almost empty now:

          Apr 19, 2010 3:12:38 PM hudson.plugins.jabber.im.transport.JabberIMConnection close
          FINE: java.lang.IllegalStateException: Not connected to server.
          Apr 19, 2010 3:12:38 PM hudson.plugins.jabber.im.transport.JabberIMConnection removeConnectionListener
          WARNING: Connection listener hudson.plugins.jabber.im.transport.JabberIMConnectionProvider@639bf1 not found.
          Apr 19, 2010 3:02:20 PM hudson.plugins.jabber.im.transport.JabberIMConnection connect
          INFO: Joined groupchat private-chat-xyz@groupchat.google.com
          Apr 19, 2010 3:02:20 PM hudson.plugins.jabber.im.transport.JabberIMConnection connect
          INFO: Connected to XMPP on talk.google.com:5222/dooapp.com using TLS

          antoinemischler added a comment - I tried with version 1.9, but I still have the same issue, excepted that the logs are almost empty now: Apr 19, 2010 3:12:38 PM hudson.plugins.jabber.im.transport.JabberIMConnection close FINE: java.lang.IllegalStateException: Not connected to server. Apr 19, 2010 3:12:38 PM hudson.plugins.jabber.im.transport.JabberIMConnection removeConnectionListener WARNING: Connection listener hudson.plugins.jabber.im.transport.JabberIMConnectionProvider@639bf1 not found. Apr 19, 2010 3:02:20 PM hudson.plugins.jabber.im.transport.JabberIMConnection connect INFO: Joined groupchat private-chat-xyz@groupchat.google.com Apr 19, 2010 3:02:20 PM hudson.plugins.jabber.im.transport.JabberIMConnection connect INFO: Connected to XMPP on talk.google.com:5222/dooapp.com using TLS

          kutzi added a comment -

          kutzi added a comment - Seems like this is a bug in Smack. See: http://www.igniterealtime.org/community/thread/40374 http://www.igniterealtime.org/community/message/201984

          kutzi added a comment -

          This seems to be be the corresponding issue in the Smack JIRA:
          http://www.igniterealtime.org/issues/browse/SMACK-207

          You may create a account there and vote for it (I already did)
          However, given the update frequency of Smack, it's not very likely that a fix will be delivered soon. The issue itself is now more than 3 years old.
          The given state of the library is not very satisfying. If I would have the experience with XMPP and time, I would fork Smack to get fixes quicker in. Maybe someone else can step in?

          kutzi added a comment - This seems to be be the corresponding issue in the Smack JIRA: http://www.igniterealtime.org/issues/browse/SMACK-207 You may create a account there and vote for it (I already did) However, given the update frequency of Smack, it's not very likely that a fix will be delivered soon. The issue itself is now more than 3 years old. The given state of the library is not very satisfying. If I would have the experience with XMPP and time, I would fork Smack to get fixes quicker in. Maybe someone else can step in?

          kutzi added a comment -

          Please try the plugins attached to JENKINS-7060. They use a new, beta version of the Smack library which should fix a lot of bugs.

          kutzi added a comment - Please try the plugins attached to JENKINS-7060 . They use a new, beta version of the Smack library which should fix a lot of bugs.

          Thanks,these plugins fixed the problem.

          antoinemischler added a comment - Thanks,these plugins fixed the problem.

          kutzi added a comment -

          Fixed in version 1.17

          kutzi added a comment - Fixed in version 1.17

          Code changed in jenkins
          User: kutzi
          Path:
          pom.xml
          src/main/java/hudson/plugins/jabber/im/transport/JabberConnectionDebugger.java
          http://jenkins-ci.org/commit/jabber-plugin/242722157b444737390857d5c341e590ae655804
          Log:
          Upgrade Smack library to 3.2.0. Fixes JENKINS-7060, JENKINS-8426 and JENKINS-5345

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: kutzi Path: pom.xml src/main/java/hudson/plugins/jabber/im/transport/JabberConnectionDebugger.java http://jenkins-ci.org/commit/jabber-plugin/242722157b444737390857d5c341e590ae655804 Log: Upgrade Smack library to 3.2.0. Fixes JENKINS-7060 , JENKINS-8426 and JENKINS-5345

          Code changed in jenkins
          User: kutzi
          Path:
          pom.xml
          src/main/java/hudson/plugins/jabber/im/transport/JabberConnectionDebugger.java
          http://jenkins-ci.org/commit/jabber-plugin/242722157b444737390857d5c341e590ae655804
          Log:
          Upgrade Smack library to 3.2.0. Fixes JENKINS-7060, JENKINS-8426 and JENKINS-5345

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: kutzi Path: pom.xml src/main/java/hudson/plugins/jabber/im/transport/JabberConnectionDebugger.java http://jenkins-ci.org/commit/jabber-plugin/242722157b444737390857d5c341e590ae655804 Log: Upgrade Smack library to 3.2.0. Fixes JENKINS-7060 , JENKINS-8426 and JENKINS-5345

            kutzi kutzi
            antoinemischler antoinemischler
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: