Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Critical
    • Resolution: Fixed
    • Component/s: jabber-plugin
    • Labels:
      None
    • Environment:
      Debian 7
      Jenkins 1.587
    • Similar Issues:

      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

          Hide
          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.

          Show
          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.
          Hide
          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

          Show
          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
          Hide
          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?

          Show
          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?
          Hide
          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

          Show
          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
          Hide
          kutzi kutzi added a comment -

          Fixed in jabber-plugin 1.29

          Show
          kutzi kutzi added a comment - Fixed in jabber-plugin 1.29
          Hide
          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.

          Show
          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.

            People

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

              Dates

              • Created:
                Updated:
                Resolved: