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

java.lang.NoSuchMethodError on hitting TestConnection

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Blocker Blocker
    • None
    • Ubuntu VM with docker installed is running a jenkins image. Docker client is installed in the container and docker unix socket is mapped to the host so that docker commands can be run inside container using host's docker daemon.

      I am running jenkins inside a container (using the official jenkins image). I have done a volume mapping of -v /var/run/docker.sock:/var/run/docker.sock so that I can run docker commands within the container, using the host's docker daemon.

      For setting up the Docker Build step plugin under "Configure System" -> "Docker Builder", when I enter "Docker URL" as "unix:///var/run/docker.sock", I get the below error :

      javax.servlet.ServletException: java.lang.NoSuchMethodError: org.apache.http.impl.client.HttpClientBuilder.setConnectionManagerShared(Z)Lorg/apache/http/impl/client/HttpClientBuilder;
      at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:796)
      at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)
      at org.kohsuke.stapler.MetaClass$5.doDispatch(MetaClass.java:233)
      at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
      at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746)
      at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)

      So I tried to expose a tcp socket for the docker daemon on the host. I was able to expose "tcp://13.65.82.196:2375" and I made sure that this port was accessible through firewall. I am able to run docker commands against this URL from within the container. I tested that out with the command "curl -X GET http://13.65.82.196:2375/info" and it works. Next, when I enter "tcp://13.65.82.196:2375" as the Docker URL, I get the same error as before.

      Please note that I "Apply" the setting before I hit "Test Connection".
      Can someone please help with this?

            vjuranek vjuranek
            pragya15 Pragya Mehta
            Votes:
            2 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: