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

            balazs_varnai Balazs Varnai created issue -
            balazs_varnai Balazs Varnai made changes -
            Field Original Value New Value
            Labels agents websocket
            balazs_varnai Balazs Varnai made changes -
            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:
            {code:java}
            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
            {code}
            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.

             
            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/|http://ingress/jenkins/_]

            Agent is connecting via JNPL with WebSocket option enabled. The following error message is reported:
            {code:java}
            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
            {code}
            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.

             
            jglick Jesse Glick made changes -
            Component/s core [ 15593 ]
            Component/s remoting [ 15489 ]
            jglick Jesse Glick made changes -
            Assignee Jeff Thompson [ jthompson ] Jesse Glick [ jglick ]
            jglick Jesse Glick made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            jglick Jesse Glick made changes -
            Remote Link This issue links to "jenkins 4839 (Web Link)" [ 25320 ]
            jglick Jesse Glick made changes -
            Status In Progress [ 3 ] In Review [ 10005 ]
            jglick Jesse Glick made changes -
            Labels agents websocket agents lts-candidate websocket
            jglick Jesse Glick made changes -
            Released As 2.245
            Resolution Fixed [ 1 ]
            Status In Review [ 10005 ] Fixed but Unreleased [ 10203 ]
            oleg_nenashev Oleg Nenashev made changes -
            Released As 2.245 Jenkins 2.248
            Status Fixed but Unreleased [ 10203 ] Resolved [ 5 ]
            oleg_nenashev Oleg Nenashev made changes -
            Labels agents lts-candidate websocket agents lts-candidate non-trivial-lts-backporting websocket
            oleg_nenashev Oleg Nenashev made changes -
            Link This issue causes JENKINS-63222 [ JENKINS-63222 ]
            olivergondza Oliver Gondža made changes -
            Labels agents lts-candidate non-trivial-lts-backporting websocket 2.235.4-fixed agents non-trivial-lts-backporting websocket
            markewaite Mark Waite made changes -
            Link This issue causes JENKINS-63671 [ JENKINS-63671 ]

              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: