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

Jabber can not send message

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved (View Workflow)
    • Critical
    • Resolution: Fixed
    • jabber-plugin
    • None
    • Debian 7
      Jenkins 1.587

    Description

      java.lang.ClassCastException: org.jivesoftware.smack.util.PacketParserUtils$2 cannot be cast to org.jivesoftware.smackx.vcardtemp.packet.VCard
      at org.jivesoftware.smackx.vcardtemp.packet.VCard.doLoad(VCard.java:560)
      at org.jivesoftware.smackx.vcardtemp.packet.VCard.load(VCard.java:542)
      at hudson.plugins.jabber.im.transport.JabberIMConnection.vCardExists(JabberIMConnection.java:551)
      at hudson.plugins.jabber.im.transport.JabberIMConnection.createVCardIfNeeded(JabberIMConnection.java:534)
      at hudson.plugins.jabber.im.transport.JabberIMConnection.createConnection(JabberIMConnection.java:431)
      at hudson.plugins.jabber.im.transport.JabberIMConnection.connect(JabberIMConnection.java:189)
      at hudson.plugins.jabber.im.transport.JabberIMConnectionProvider.createConnection(JabberIMConnectionProvider.java:42)
      at hudson.plugins.im.IMConnectionProvider.create(IMConnectionProvider.java:65)
      at hudson.plugins.im.IMConnectionProvider.access$600(IMConnectionProvider.java:22)
      at hudson.plugins.im.IMConnectionProvider$ConnectorRunnable.run(IMConnectionProvider.java:183)
      at java.lang.Thread.run(Thread.java:745)

      Attachments

        Activity

          mbbn Mohammad Biabani created issue -

          I got this message as WARNING, and it looks to be related to this previous issue: JENKINS-12097

          However, I can't get the plugin to work (version 1.28, im = 1.30, jenkins = 1.588 on CentOS 6.6).
          Besides info saying it can't connect (but I see session opening for the user on the server side = eJabberd 2.1.13), this warning is the only thing I got in the logs to try to understand what's wrong:

          Nov 10, 2014 2:49:51 PM hudson.plugins.jabber.im.transport.JabberIMConnection createConnection
          INFO: Trying to connect to XMPP on /xxx.xxx.xxx
          Nov 10, 2014 2:49:51 PM hudson.plugins.jabber.im.transport.JabberIMConnection setupSubscriptionMode
          INFO: Subscription requests must be handled manually
          Nov 10, 2014 2:49:51 PM hudson.plugins.jabber.im.transport.JabberIMConnection connect
          WARNING: java.lang.ClassCastException: org.jivesoftware.smack.util.PacketParserUtils$2 cannot be cast to org.jivesoftware.smackx.vcardtemp.packet.VCard
          at org.jivesoftware.smackx.vcardtemp.packet.VCard.doLoad(VCard.java:560)
          at org.jivesoftware.smackx.vcardtemp.packet.VCard.load(VCard.java:542)
          at hudson.plugins.jabber.im.transport.JabberIMConnection.vCardExists(JabberIMConnection.java:551)
          at hudson.plugins.jabber.im.transport.JabberIMConnection.createVCardIfNeeded(JabberIMConnection.java:534)
          at hudson.plugins.jabber.im.transport.JabberIMConnection.createConnection(JabberIMConnection.java:431)
          at hudson.plugins.jabber.im.transport.JabberIMConnection.connect(JabberIMConnection.java:189)
          at hudson.plugins.jabber.im.transport.JabberIMConnectionProvider.createConnection(JabberIMConnectionProvider.java:42)
          at hudson.plugins.im.IMConnectionProvider.create(IMConnectionProvider.java:65)
          at hudson.plugins.im.IMConnectionProvider.access$600(IMConnectionProvider.java:22)
          at hudson.plugins.im.IMConnectionProvider$ConnectorRunnable.run(IMConnectionProvider.java:183)
          at java.lang.Thread.run(Thread.java:745)

          Nov 10, 2014 2:49:51 PM hudson.plugins.im.IMConnectionProvider$ConnectorRunnable run
          INFO: Reconnect failed. Next connection attempt in X minutes

          In ejabberd:

          =INFO REPORT==== 2014-11-10 14:49:51 ===
          I(<0.1484.0>:ejabberd_c2s:640) : ({socket_state,tls,

          {tlssock,#Port<0.5204>,#Port<0.5206>},<0.1483.0>}) Accepted authentication for bot-jenkins by ejabberd_auth_ldap

          =INFO REPORT==== 2014-11-10 14:49:51 ===
          I(<0.1484.0>:ejabberd_c2s:949) : ({socket_state,tls,{tlssock,#Port<0.5204>,#Port<0.5206>}

          ,<0.1483.0>}) Opened session for jenkins@xxx.xxx.xxx/36705839461415627391209190

          Setting logs to FINEST did not help me so far...
          But I never had this plugin working before. So I'm not sure I'm looking at a bug here.
          Searching for one based on the WARNING just gave me this page.

          bdonneaux Benoit Donneaux added a comment - I got this message as WARNING, and it looks to be related to this previous issue: JENKINS-12097 However, I can't get the plugin to work (version 1.28, im = 1.30, jenkins = 1.588 on CentOS 6.6). Besides info saying it can't connect (but I see session opening for the user on the server side = eJabberd 2.1.13), this warning is the only thing I got in the logs to try to understand what's wrong: Nov 10, 2014 2:49:51 PM hudson.plugins.jabber.im.transport.JabberIMConnection createConnection INFO: Trying to connect to XMPP on /xxx.xxx.xxx Nov 10, 2014 2:49:51 PM hudson.plugins.jabber.im.transport.JabberIMConnection setupSubscriptionMode INFO: Subscription requests must be handled manually Nov 10, 2014 2:49:51 PM hudson.plugins.jabber.im.transport.JabberIMConnection connect WARNING: java.lang.ClassCastException: org.jivesoftware.smack.util.PacketParserUtils$2 cannot be cast to org.jivesoftware.smackx.vcardtemp.packet.VCard at org.jivesoftware.smackx.vcardtemp.packet.VCard.doLoad(VCard.java:560) at org.jivesoftware.smackx.vcardtemp.packet.VCard.load(VCard.java:542) at hudson.plugins.jabber.im.transport.JabberIMConnection.vCardExists(JabberIMConnection.java:551) at hudson.plugins.jabber.im.transport.JabberIMConnection.createVCardIfNeeded(JabberIMConnection.java:534) at hudson.plugins.jabber.im.transport.JabberIMConnection.createConnection(JabberIMConnection.java:431) at hudson.plugins.jabber.im.transport.JabberIMConnection.connect(JabberIMConnection.java:189) at hudson.plugins.jabber.im.transport.JabberIMConnectionProvider.createConnection(JabberIMConnectionProvider.java:42) at hudson.plugins.im.IMConnectionProvider.create(IMConnectionProvider.java:65) at hudson.plugins.im.IMConnectionProvider.access$600(IMConnectionProvider.java:22) at hudson.plugins.im.IMConnectionProvider$ConnectorRunnable.run(IMConnectionProvider.java:183) at java.lang.Thread.run(Thread.java:745) Nov 10, 2014 2:49:51 PM hudson.plugins.im.IMConnectionProvider$ConnectorRunnable run INFO: Reconnect failed. Next connection attempt in X minutes In ejabberd: =INFO REPORT==== 2014-11-10 14:49:51 === I(<0.1484.0>:ejabberd_c2s:640) : ({socket_state,tls, {tlssock,#Port<0.5204>,#Port<0.5206>},<0.1483.0>}) Accepted authentication for bot-jenkins by ejabberd_auth_ldap =INFO REPORT==== 2014-11-10 14:49:51 === I(<0.1484.0>:ejabberd_c2s:949) : ({socket_state,tls,{tlssock,#Port<0.5204>,#Port<0.5206>} ,<0.1483.0>}) Opened session for jenkins@xxx.xxx.xxx/36705839461415627391209190 Setting logs to FINEST did not help me so far... But I never had this plugin working before. So I'm not sure I'm looking at a bug here. Searching for one based on the WARNING just gave me this page.
          kutzi kutzi added a comment -

          This looks like a bug in the Smack library parsing VCards, which is also reported elsewhere:
          http://stackoverflow.com/questions/26752285/android-asmack-vcard-classcastexception-while-calling-vcard-loadconn

          I added a workaround to just ignore the error, so that the connection works at least. Would you be willing to test it?

          https://dl.dropboxusercontent.com/u/25863594/jabber.hpi

          kutzi kutzi added a comment - This looks like a bug in the Smack library parsing VCards, which is also reported elsewhere: http://stackoverflow.com/questions/26752285/android-asmack-vcard-classcastexception-while-calling-vcard-loadconn I added a workaround to just ignore the error, so that the connection works at least. Would you be willing to test it? https://dl.dropboxusercontent.com/u/25863594/jabber.hpi

          Works like a charm on our test build server.
          Thumbs up: this plugin is awesome.

          This been said, you might have a closer look to what might happen when an error like this one is blocking.
          Because it looks like a new connection is opened for each reconnect.
          After a while, we've seen jenkins online with 6 sessions, even if we can't interact with any of them.
          But I guess it could/should be another issue... Or not at all.

          Thanks anyway.
          Anything else to be tested before the next release?

          bdonneaux Benoit Donneaux added a comment - Works like a charm on our test build server. Thumbs up: this plugin is awesome. This been said, you might have a closer look to what might happen when an error like this one is blocking. Because it looks like a new connection is opened for each reconnect. After a while, we've seen jenkins online with 6 sessions, even if we can't interact with any of them. But I guess it could/should be another issue... Or not at all. Thanks anyway. Anything else to be tested before the next release?

          Code changed in jenkins
          User: Christoph Kutzinski
          Path:
          src/main/java/hudson/plugins/jabber/im/transport/JabberIMConnection.java
          http://jenkins-ci.org/commit/jabber-plugin/87f188e7e7199e256c170008797b903f4c929f5a
          Log:
          JENKINS-25515 workaround for VCard parsing problem

          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Christoph Kutzinski Path: src/main/java/hudson/plugins/jabber/im/transport/JabberIMConnection.java http://jenkins-ci.org/commit/jabber-plugin/87f188e7e7199e256c170008797b903f4c929f5a Log: JENKINS-25515 workaround for VCard parsing problem
          kutzi kutzi added a comment -

          Fixed in jabber-plugin 1.29

          kutzi kutzi added a comment - Fixed in jabber-plugin 1.29
          kutzi kutzi made changes -
          Field Original Value New Value
          Resolution Fixed [ 1 ]
          Status Open [ 1 ] Resolved [ 5 ]
          kutzi kutzi added a comment -

          Regarding the session problem: if you have more info (e.g. thread dumps) please open an issue for this and I'll look at it. Low prio, since it doesn't seem to break anything.

          kutzi kutzi added a comment - Regarding the session problem: if you have more info (e.g. thread dumps) please open an issue for this and I'll look at it. Low prio, since it doesn't seem to break anything.
          rtyler R. Tyler Croy made changes -
          Workflow JNJira [ 159484 ] JNJira + In-Review [ 196099 ]

          People

            kutzi kutzi
            mbbn Mohammad Biabani
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: