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

Campfire Plugin failing SSL check after upgrading Jenkins to latest 1.530

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • campfire-plugin
    • None
    • This is running on Mac OS X 10.8.4

      Campfire recently changed their SSL configuration to a new set of preferred ciphers and this plugin randomly fails with the following exception:

      ERROR: Publisher hudson.plugins.campfire.CampfireNotifier aborted due to exception
      java.lang.RuntimeException: javax.net.ssl.SSLProtocolException: Server returned wrong cipher suite for session
      at hudson.plugins.campfire.Campfire.post(Campfire.java:77)
      at hudson.plugins.campfire.Room.speak(Room.java:29)
      at hudson.plugins.campfire.CampfireNotifier.publish(CampfireNotifier.java:121)
      at hudson.plugins.campfire.CampfireNotifier.perform(CampfireNotifier.java:184)
      at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:45)
      at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:782)
      at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:754)
      at hudson.model.Build$BuildExecution.post2(Build.java:183)
      at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:707)
      at hudson.model.Run.execute(Run.java:1628)
      at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
      at hudson.model.ResourceController.execute(ResourceController.java:88)
      at hudson.model.Executor.run(Executor.java:246)
      Caused by: javax.net.ssl.SSLProtocolException: Server returned wrong cipher suite for session
      at com.sun.net.ssl.internal.ssl.ClientHandshaker.serverHello(ClientHandshaker.java:438)
      at com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:125)
      at com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Handshaker.java:593)
      at com.sun.net.ssl.internal.ssl.Handshaker.process_record(Handshaker.java:529)
      at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:943)
      at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1188)
      at com.sun.net.ssl.internal.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.java:654)
      at com.sun.net.ssl.internal.ssl.AppOutputStream.write(AppOutputStream.java:100)
      at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65)
      at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:123)
      at org.apache.commons.httpclient.methods.StringRequestEntity.writeRequest(StringRequestEntity.java:146)
      at org.apache.commons.httpclient.methods.EntityEnclosingMethod.writeRequestBody(EntityEnclosingMethod.java:499)
      at org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMethodBase.java:2114)
      at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1096)
      at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:398)
      at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
      at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
      at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:323)
      at hudson.plugins.campfire.Campfire.post(Campfire.java:75)
      ... 12 more

          [JENKINS-19590] Campfire Plugin failing SSL check after upgrading Jenkins to latest 1.530

          Some possibly helpful information from a coworker:

          Looks like this may be due to the JRE shipping with only wimpy ciphers enabled by default, due to import/export restrictions.

          See http://developer.klocwork.com/documentation/cahoots/current/p4errorduringsslhandshake for a similar issue.

          The fix—hopefully—is to install http://www.oracle.com/technetwork/java/javase/downloads/jce-7-download-432124.html to enable the stronger cipher suites.

          -Javan Makhmali
          37signals

          Javan Makhmali added a comment - Some possibly helpful information from a coworker: Looks like this may be due to the JRE shipping with only wimpy ciphers enabled by default, due to import/export restrictions. See http://developer.klocwork.com/documentation/cahoots/current/p4errorduringsslhandshake for a similar issue. The fix—hopefully—is to install http://www.oracle.com/technetwork/java/javase/downloads/jce-7-download-432124.html to enable the stronger cipher suites. -Javan Makhmali 37signals

          Sam Kozin added a comment -

          @Javan

          Some possibly helpful information from a coworker: ...

          Unfortunately, this didn't fix the issue for me — there are still random SSLProtocolException errors even after installing Java Cryptography Extension (for Java SE 6).

          Sam Kozin added a comment - @Javan Some possibly helpful information from a coworker: ... Unfortunately, this didn't fix the issue for me — there are still random SSLProtocolException errors even after installing Java Cryptography Extension (for Java SE 6).

          @Sam - Try it in combination with building from my repo and see if that works any better. I believe my JVM also already had the JCE extensions necessary, but they were being incorrectly referenced by the very old version of HttpClient the Campfire adapter was using. It's just a theory, but the .hpi from my repo is working for my team.

          Morgan Schweers added a comment - @Sam - Try it in combination with building from my repo and see if that works any better. I believe my JVM also already had the JCE extensions necessary, but they were being incorrectly referenced by the very old version of HttpClient the Campfire adapter was using. It's just a theory, but the .hpi from my repo is working for my team.

          Coleman added a comment -

          Hmm, still running into the earlier issue with both the updated hpi and JCE installed. I could be missing something along the way, can anyone else test with @Morgan's changes and JCE installed?

          Coleman added a comment - Hmm, still running into the earlier issue with both the updated hpi and JCE installed. I could be missing something along the way, can anyone else test with @Morgan's changes and JCE installed?

          I can confirm that for me after the upgrade from openjdk-1.6 to openjdk-1.7 (on Centos6.4) , we have not seen the issue anymore.

          stephen gregory added a comment - I can confirm that for me after the upgrade from openjdk-1.6 to openjdk-1.7 (on Centos6.4) , we have not seen the issue anymore.

          Toland Hon added a comment - - edited

          I've downloaded the official JDK 7 from Oracle (jdk-7u40-macosx-x64.dmg) http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html and the issue still persists after launching Jenkins with the new java binary on Mac OSX 10.8.5

          Toland Hon added a comment - - edited I've downloaded the official JDK 7 from Oracle (jdk-7u40-macosx-x64.dmg) http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html and the issue still persists after launching Jenkins with the new java binary on Mac OSX 10.8.5

          Toland Hon added a comment -

          Hmmm. After updating to Jenkins 1.532 (looks like 1.533 is also out), my Campfire SSL errors went away using the same version of Java when I filed this bug.

          Toland Hon added a comment - Hmmm. After updating to Jenkins 1.532 (looks like 1.533 is also out), my Campfire SSL errors went away using the same version of Java when I filed this bug.

          Gemini Agaloos added a comment - - edited

          Last-week, we were on Jenkins 1.503 with campfire plugin 2.1 and we were seeing this error intermittently:
          ERROR: Publisher hudson.plugins.campfire.CampfireNotifier aborted due to exception
          java.io.IOException: Cannot join room: Server returned wrong cipher suite for session
          at hudson.plugins.campfire.CampfireNotifier.initialize(CampfireNotifier.java:66)

          We updated the campfire plugin from 2.1 to 2.6 but we continued to see this same error intermittently whenever we edit or create a job with campfire notification.

          We decided to upgrade to Jenkins 1.532 last Saturday, Sep 28th. Today, Monday Sep 30th, we are seeing this error which fails our builds:
          Failed to initialize campfire notifier - check your campfire notifier configuration settings: javax.net.ssl.SSLProtocolException: Server returned wrong cipher suite for session

          Gemini Agaloos added a comment - - edited Last-week, we were on Jenkins 1.503 with campfire plugin 2.1 and we were seeing this error intermittently: ERROR: Publisher hudson.plugins.campfire.CampfireNotifier aborted due to exception java.io.IOException: Cannot join room: Server returned wrong cipher suite for session at hudson.plugins.campfire.CampfireNotifier.initialize(CampfireNotifier.java:66) We updated the campfire plugin from 2.1 to 2.6 but we continued to see this same error intermittently whenever we edit or create a job with campfire notification. We decided to upgrade to Jenkins 1.532 last Saturday, Sep 28th. Today, Monday Sep 30th, we are seeing this error which fails our builds: Failed to initialize campfire notifier - check your campfire notifier configuration settings: javax.net.ssl.SSLProtocolException: Server returned wrong cipher suite for session

          We are running Jenkins 1.532 on Tomcat in a Windows 2008 datacenter server. Our campfire plugin is at 2.6 and Maven project plugin is 1.532

          Interestingly, testing via curl on command line to send a message to a campfire room using api key via https seems to work (not sure if this one will intermittently fail too).

          C:\Users\Administrator> curl -u 123replacewithyourapikey456:X -H "Content-Type: application/xml" -d "<message>gem test from jenkins windows cmd line</message>"

          https://yourcompany.campfirenow.com/room/345671/speak.xml
          <?xml version="1.0" encoding="UTF-8"?>
          <message>
          <created-at type="datetime">2013-09-30T23:39:33Z</created-at>
          <id type="integer">1068538523</id>
          <room-id type="integer">345671</room-id>
          <user-id type="integer">1234548</user-id>
          <body>gem test from jenkins windows cmd line</body>
          <type>TextMessage</type>
          <starred type="boolean">false</starred>
          </message>

          Gemini Agaloos added a comment - We are running Jenkins 1.532 on Tomcat in a Windows 2008 datacenter server. Our campfire plugin is at 2.6 and Maven project plugin is 1.532 Interestingly, testing via curl on command line to send a message to a campfire room using api key via https seems to work (not sure if this one will intermittently fail too). C:\Users\Administrator> curl -u 123replacewithyourapikey456:X -H "Content-Type: application/xml" -d "<message>gem test from jenkins windows cmd line</message>" https://yourcompany.campfirenow.com/room/345671/speak.xml <?xml version="1.0" encoding="UTF-8"?> <message> <created-at type="datetime">2013-09-30T23:39:33Z</created-at> <id type="integer">1068538523</id> <room-id type="integer">345671</room-id> <user-id type="integer">1234548</user-id> <body>gem test from jenkins windows cmd line</body> <type>TextMessage</type> <starred type="boolean">false</starred> </message>

          Kevin van Zonneveld added a comment - - edited

          To those running Ubuntu 12.04, after we installed the newer JRE (7 vs 6):

          sudo aptitude install openjdk-7-jre
          sudo update-alternatives --set java /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java
          sudo service jenkins stop
          sudo service jenkins start

          The error is gone and we're now seeing notifications in Campfire

          Kevin van Zonneveld added a comment - - edited To those running Ubuntu 12.04, after we installed the newer JRE (7 vs 6): sudo aptitude install openjdk-7-jre sudo update-alternatives --set java /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java sudo service jenkins stop sudo service jenkins start The error is gone and we're now seeing notifications in Campfire

            jenslukowski jenslukowski
            krunk Toland Hon
            Votes:
            5 Vote for this issue
            Watchers:
            13 Start watching this issue

              Created:
              Updated: