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

Exec Failure: HTTP:404. Message:Not Found

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • kubernetes-plugin
    • Jenkins 2.35, Kubernetes Plugin 0.9, Minikube 0.13.1

      I'm trying to run a simple pipeline based on the example on the README:

      podTemplate(label: 'mypod', containers: [
          containerTemplate(name: 'maven', image: 'maven:3.3.9-jdk-8-alpine', ttyEnabled: true, command: 'cat'),
          containerTemplate(name: 'jnlp', image: 'jenkinsci/jnlp-slave', args: '${computer.jnlpmac} ${computer.name}'),
      ]) {
      
          node ('mypod') {
              stage 'Get a Maven project'
              git 'https://github.com/jenkinsci/kubernetes-plugin.git'
              container('maven') {
                  stage 'Build a Maven project'
                  sh 'mvn clean install'
              }
          }
      }
      

      The pod is created and started, but when Jenkins tries to run the shell script for the build, I get:

      [kubernetes-plugin-pipeline-example] Running shell script
      Executing shell script inside container [maven] of pod [kubernetes-f914ee7f49c44f7eaa182af5fda74c93-60beb1f2a295]
      java.net.ProtocolException: Expected HTTP 101 response but was '404 Not Found'
      	at com.squareup.okhttp.ws.WebSocketCall.createWebSocket(WebSocketCall.java:123)
      	at com.squareup.okhttp.ws.WebSocketCall.access$000(WebSocketCall.java:40)
      	at com.squareup.okhttp.ws.WebSocketCall$1.onResponse(WebSocketCall.java:98)
      	at com.squareup.okhttp.Call$AsyncCall.execute(Call.java:177)
      	at com.squareup.okhttp.internal.NamedRunnable.run(NamedRunnable.java:33)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      	at java.lang.Thread.run(Thread.java:745)
      

      The relevant section from Jenkins' log is attached. I increased the log verbosity of io.fabric8.kubernetes, org.csanchez.jenkins.plugins.kubernetes, com.squareup.okhttp and org.apache.http to ALL but it doesn't show which HTTP request got a 404 response.

        1. image-2019-09-18-14-04-48-431.png
          225 kB
          runze xia
        2. jenkins-kubernetes.log
          18 kB
          Daniel Serodio

            csanchez Carlos Sanchez
            dserodio Daniel Serodio
            Votes:
            1 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved: