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

404 when trying to connect Windows node to Linux Master

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Not A Defect
    • Component/s: remoting
    • Labels:
    • Environment:
    • Similar Issues:

      Description

       

       

      When I try to run a Windows Node to a Jenkins Linux master I get a 404 that tcpSlaveAgentListener can not be found.  I connect to my Jenkins master from the Windows node and go to the node's computer page I copy the java command to a powershell command window and then run like below:

      java -jar agent.jar -jnlpUrl https://xxx-yyy-build-jenkins-0.zzz.cloud/computer/jslave-win-fw-0/slave-agent.jnlp -secret secret -workDir "C:\data\jenkins"
      

      I get the following:

      INFO: Using C:\data\jenkins\remoting as a remoting work directory
      Both error and output logs will be printed to C:\data\jenkins\remoting
      Sep 16, 2019 7:55:01 PM hudson.remoting.jnlp.Main createEngine
      INFO: Setting up agent: jslave-win-fw-0
      Sep 16, 2019 7:55:01 PM hudson.remoting.jnlp.Main$CuiListener <init>
      INFO: Jenkins agent is running in headless mode.
      Sep 16, 2019 7:55:01 PM hudson.remoting.Engine startEngine
      INFO: Using Remoting version: 3.29
      Sep 16, 2019 7:55:01 PM org.jenkinsci.remoting.engine.WorkDirManager initializeWorkDir
      INFO: Using C:\data\jenkins\remoting as a remoting work directory
      Sep 16, 2019 7:55:01 PM hudson.remoting.jnlp.Main$CuiListener status
      INFO: Locating server among [https://bnr-eastus-build-jenkins-0.bossanova.cloud/]
      Sep 16, 2019 7:55:01 PM hudson.remoting.jnlp.Main$CuiListener error
      SEVERE: https://bnr-eastus-build-jenkins-0.bossanova.cloud/tcpSlaveAgentListener/ is invalid: 404 Not Found
      java.io.IOException:
      https://xxx-yyy-build-jenkins-0.zzz.cloud/tcpSlaveAgentListener/ is invalid: 404 Not Found at org.jenkinsci.remoting.engine.JnlpAgentEndpointResolver.resolve(JnlpAgentEndpointResolver.java:202)
       at  hudson.remoting.Engine.innerRun(Engine.java:523)
       at hudson.remoting.Engine.run(Engine.java:474)
      

      OS: (all machines are running in Azure)

      Master: Ubuntu Ubuntu 16.04.2 LTS

      Node: Windows 2019-Datacenter

      Plugins installed:

      "ace-editor":
      version: "1.1"
      "analysis-model-api":
      version: "4.0.0"
      "ansicolor":
      version: "0.6.2"
      "antisamy-markup-formatter":
      version: "1.5"
      "ant":
      version: "1.9"
      "apache-httpcomponents-client-4-api":
      version: "4.5.5-3.0"
      "artifactory":
      version: "3.2.2"
      "authentication-tokens":
      version: "1.3"
      "azure-commons":
      version: "0.2.10"
      "azure-credentials":
      version: "1.6.1"
      "azure-vm-agents":
      version: "0.9.0"
      "badge":
      version: "1.7"
      "basic-branch-build-strategies":
      version: "1.3.0"
      "bouncycastle-api":
      version: "2.17"
      "branch-api":
      version: "2.4.0"
      "build-monitor-plugin":
      version: "1.12+build.201809061734"
      "build-timeout":
      version: "1.19"
      "cloud-stats":
      version: "0.23"
      "cloudbees-folder":
      version: "6.8"
      "cobertura":
      version: "1.13"
      "code-coverage-api":
      version: "1.0.9"
      "command-launcher":
      version: "1.3"
      "config-file-provider":
      version: "3.6"
      "credentials-binding":
      version: "1.18"
      "credentials":
      version: "2.1.18"
      "dashboard-view":
      version: "2.10"
      "display-url-api":
      version: "2.3.1"
      "docker-commons":
      version: "1.14"
      "docker-workflow":
      version: "1.18"
      "doxygen":
      version: "0.18"
      "durable-task":
      version: "1.29"
      "email-ext":
      version: "2.66"
      "external-monitor-job":
      version: "1.7"
      "git":
      version: "3.9.3"
      "git-client":
      version: "2.7.6"
      "github":
      version: "1.29.4"
      "github-api":
      version: "1.95"
      "github-branch-source":
      version: "2.4.5"
      "github-pr-coverage-status":
      version: "2.0.0"
      "git-server":
      version: "1.7"
      "gradle":
      version: "1.31"
      "handlebars":
      version: "1.1.1"
      "icon-shim":
      version: "2.0.3"
      "ivy":
      version: "2.0"
      "jackson2-api":
      version: "2.9.8"
      "jacoco":
      version: "3.0.4"
      "javadoc":
      version: "1.5"
      "jdk-tool":
      version: "1.2"
      "jquery-detached":
      version: "1.2.1"
      "jsch":
      version: "0.1.55"
      "junit":
      version: "1.27"
      "ldap":
      version: "1.14"
      "lockable-resources":
      version: "2.5"
      "mailer":
      version: "1.23"
      "mapdb-api":
      version: "1.0.9.0"
      "matrix-auth":
      version: "2.3"
      "matrix-project":
      version: "1.14"
      "maven-plugin":
      version: "3.2"
      "metrics":
      version: "4.0.2.3"
      "momentjs":
      version: "1.1.1"
      "monitoring":
      version: "1.76.0"
      "pam-auth":
      version: "1.5"
      "pipeline-build-step":
      version: "2.8"
      "pipeline-github-lib":
      version: "1.0"
      "pipeline-graph-analysis":
      version: "1.9"
      "pipeline-input-step":
      version: "2.10"
      "pipeline-milestone-step":
      version: "1.3.1"
      "pipeline-model-api":
      version: "1.3.7"
      "pipeline-model-declarative-agent":
      version: "1.1.1"
      "pipeline-model-definition":
      version: "1.3.7"
      "pipeline-model-extensions":
      version: "1.3.7"
      "pipeline-rest-api":
      version: "2.10"
      "pipeline-stage-step":
      version: "2.3"
      "pipeline-stage-tags-metadata":
      version: "1.3.7"
      "pipeline-stage-view":
      version: "2.10"
      "pipeline-utility-steps":
      version: "2.3.0"
      "plain-credentials":
      version: "1.5"
      "plot":
      version: "2.1.0"
      "resource-disposer":
      version: "0.12"
      "scm-api":
      version: "2.4.1"
      "script-security":
      version: "1.56"
      "slack":
      version: "2.21"
      "ssh-agent":
      version: "1.17"
      "ssh-credentials":
      version: "1.15"
      "ssh-slaves":
      version: "1.29.4"
      "structs":
      version: "1.17"
      "subversion":
      version: "2.11.1"
      state: "absent"
      "timestamper":
      version: "1.9"
      "token-macro":
      version: "2.7"
      "variant":
      version: "1.2"
      "view-job-filters":
      version: "2.1.1"
      "warnings-ng":
      version: "4.0.0"
      "windows-slaves":
      version: "1.4"
      "workflow-aggregator":
      version: "2.6"
      "workflow-api":
      version: "2.33"
      "workflow-basic-steps":
      version: "2.15"
      "workflow-cps":
      version: "2.66"
      "workflow-cps-global-lib":
      version: "2.13"
      "workflow-durable-task-step":
      version: "2.30"
      "workflow-job":
      version: "2.32"
      "workflow-multibranch":
      version: "2.21"
      "workflow-scm-step":
      version: "2.7"
      "workflow-step-api":
      version: "2.19"
      "workflow-support":
      version: "3.2"
      "ws-cleanup":
      version: "0.37"

       

      I am getting a 404 so the connection is getting to the server.  Any suggestions on why the windows node will not connect and how to troubleshoot this would be great.  What loggers should I turn on to help trouble shoot this?

        Attachments

          Activity

          Hide
          mark_russell Mark Russell added a comment -

          when I run curl on the Jenkins master I get this:

          curl -k --user jenkins_master:access_token https://localhost/cpSlaveAgentListener
          <html> 
          <head> 
          <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/> 
          <title>Error 404 Not Found</title> 
          </head> 
          <body>
          <h2>HTTP ERROR 404</h2> 
          <p>Problem accessing /cpSlaveAgentListener. Reason: 
          <pre> Not Found</pre></p><hr><a href="http://eclipse.org/jetty">Powered by Jetty:// 9.4.z-SNAPSHOT</a><hr/>
          </body> 
          </html>
          

          this should take out all of the nginx and firewall issues.  Jenkins is Just responding with a 404 for this URL.

          This has me Blocked moving forward please give me a 

          Show
          mark_russell Mark Russell added a comment - when I run curl on the Jenkins master I get this: curl -k --user jenkins_master:access_token https://localhost/cpSlaveAgentListener <html> <head> <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/> <title>Error 404 Not Found</title> </head> <body> <h2>HTTP ERROR 404</h2> <p>Problem accessing /cpSlaveAgentListener. Reason: <pre> Not Found</pre></p><hr><a href="http://eclipse.org/jetty">Powered by Jetty:// 9.4.z-SNAPSHOT</a><hr/> </body> </html> this should take out all of the nginx and firewall issues.  Jenkins is Just responding with a 404 for this URL. This has me Blocked moving forward please give me a 
          Hide
          mark_russell Mark Russell added a comment -

          I would love any suggestions on how to trouble shoot this.

          Show
          mark_russell Mark Russell added a comment - I would love any suggestions on how to trouble shoot this.
          Hide
          mark_russell Mark Russell added a comment -

          I realized I ran the curl with the wrong URL I tried it with run on the Jenkins master:

          curl -k --user jenkins_master:access_token https://localhost/tcpSlaveAgentListener

          and 

          curl -k --user jenkins_master:access_token http://localhost:8080/tcpSlaveAgentListener

          and they both failed with the error already reported

          Show
          mark_russell Mark Russell added a comment - I realized I ran the curl with the wrong URL I tried it with run on the Jenkins master: curl -k --user jenkins_master:access_token https://localhost/tcpSlaveAgentListener and  curl -k --user jenkins_master:access_token http://localhost:8080/tcpSlaveAgentListener and they both failed with the error already reported
          Hide
          mark_russell Mark Russell added a comment -

          My coworker and I solved this.  We tried changing the port the JNLP used to 8008 but it got a bind exception because Jenkins uses that port. I changed it back to 8090 (which it was originally) and then like magic the Windows slave connected.

           

          We did a sudo netstat -tulnp and noticed that port 8090 was not listening that is what caused us to change the JNLP port to 8080 in the first place. This is the first time in a long while that we added a windows node.  When we changed it back to 8090 and did the netstat port 8090 was in the listen list and the node connected.

           

          If anyone in the future sees this issue then try changing the JNLP port to a different port and then change it back. I believe a restart of Jenkins would also have fixed this.

          Show
          mark_russell Mark Russell added a comment - My coworker and I solved this.  We tried changing the port the JNLP used to 8008 but it got a bind exception because Jenkins uses that port. I changed it back to 8090 (which it was originally) and then like magic the Windows slave connected.   We did a  sudo netstat -tulnp and noticed that port 8090 was not listening that is what caused us to change the JNLP port to 8080 in the first place. This is the first time in a long while that we added a windows node.  When we changed it back to 8090 and did the netstat port 8090 was in the listen list and the node connected.   If anyone in the future sees this issue then try changing the JNLP port to a different port and then change it back. I believe a restart of Jenkins would also have fixed this.
          Hide
          mark_russell Mark Russell added a comment -

          It is working now.  See previous comment.

          Show
          mark_russell Mark Russell added a comment - It is working now.  See previous comment.
          Hide
          jthompson Jeff Thompson added a comment -

          I'm glad you got it working. Thanks for sharing your steps to resolve this and the results.

          In the future, posting to the Jenkins Users email list or the Gitter channel would probably be better places to get responses on issues like this.

          Show
          jthompson Jeff Thompson added a comment - I'm glad you got it working. Thanks for sharing your steps to resolve this and the results. In the future, posting to the Jenkins Users email list or the Gitter channel would probably be better places to get responses on issues like this.

            People

            Assignee:
            jthompson Jeff Thompson
            Reporter:
            mark_russell Mark Russell
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: