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

Agent connection error using nginx proxy with WebSocket

    XMLWordPrintable

    Details

    • Similar Issues:
    • Released As:
      Jenkins 2.248

      Description

      I'm using nginx in a proxy setup. One public/ingress with a single upstream Jenkins instance. The attached docker-compose file can be used to recreate the exact environment. My test docker is running on Windows 10. The domain "ingress" was added hosts file as "127.0.0.1 ingress" for convenience.

      Basic Jenkins setup steps, root URL is set to _http://ingress/jenkins/

      Agent is connecting via JNPL with WebSocket option enabled. The following error message is reported:

      C:\workdir\jenkins\http\agent-1>java -jar agent.jar -jnlpUrl http://ingress/jenkins/computer/agent-1/slave-agent.jnlp -secret 4068cc653d7d0ca16f72404ac6ad62d5fe19f5798f5b3f0807c6ecf50fba4353 -workDir "c:\workdir\jenkins\http\agent-1"
      Jul 08, 2020 8:33:25 PM org.jenkinsci.remoting.engine.WorkDirManager initializeWorkDir
      INFO: Using c:\workdir\jenkins\http\agent-1\remoting as a remoting work directory
      Jul 08, 2020 8:33:26 PM org.jenkinsci.remoting.engine.WorkDirManager setupLogging
      INFO: Both error and output logs will be printed to c:\workdir\jenkins\http\agent-1\remoting
      JNLP file http://ingress/jenkins/computer/agent-1/slave-agent.jnlp?encrypt=true has invalid arguments: [4068cc653d7d0ca16f72404ac6ad62d5fe19f5798f5b3f0807c6ecf50fba4353, agent-1, -webSocket, -workDir, c:\workdir\jenkins\http\agent-1, -internalDir, remoting, -url, http://ingress/jenkins/, -url, http://jenkins:8080/jenkins/, -headless, -workDir, c:\workdir\jenkins\http\agent-1, -internalDir, remoting]
      Most likely a configuration error in the master
      -webSocket supports only a single -url
      

      There are 2 URLs in the parameter list which is rejected.

      I cannot rule out the possibility of nginx configuration issue, but I followed all the guidelines.

       

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              jglick Jesse Glick
              Reporter:
              balazs_varnai Balazs Varnai
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: