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

Jenkins 2.249.1 agents unable to connect to alternate URL

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • core
    • Jenkins running on Windows Server 2016
      New version of Jenkins (2.249.1)
      Java jdk1.8.0_101\bin\java.exe

      After upgrade all workers fail to connect:

      Sep 11, 2020 7:54:48 PM hudson.remoting.jnlp.Main$CuiListener <init>
      Sep 11, 2020 7:54:48 PM hudson.remoting.jnlp.Main$CuiListener <init>
      INFO: Jenkins agent is running in headless mode.
      Sep 11, 2020 7:54:48 PM hudson.remoting.Engine startEngine
      INFO: Using Remoting version: 3.29
      Sep 11, 2020 7:54:48 PM org.jenkinsci.remoting.engine.WorkDirManager initializeWorkDir
      INFO: Using D:\Jenkins\remoting as a remoting work directory
      Sep 11, 2020 7:54:48 PM hudson.remoting.jnlp.Main$CuiListener status
      INFO: Locating server among [https://jenkins.cdl.af.mil/]
      Sep 11, 2020 7:54:48 PM org.jenkinsci.remoting.engine.JnlpAgentEndpointResolver resolve
      INFO: Remoting server accepts the following protocols: [JNLP4-connect, Ping]
      Sep 11, 2020 7:54:53 PM org.jenkinsci.remoting.engine.JnlpAgentEndpointResolver isPortVisible
      WARNING: connect timed out
      Sep 11, 2020 7:54:53 PM hudson.remoting.jnlp.Main$CuiListener error
      SEVERE: https://jenkins.cdl.af.mil/ provided port:51001 is not reachable
      java.io.IOException: https://jenkins.cdl.af.mil/ provided port:51001 is not reachable 
      at org.jenkinsci.remoting.engine.JnlpAgentEndpointResolver.resolve(JnlpAgentEndpointResolver.java:287) 
      at hudson.remoting.Engine.innerRun(Engine.java:523) 
      at hudson.remoting.Engine.run(Engine.java:474)
      Sep 11, 2020 7:54:55 PM hudson.remoting.jnlp.Main createEngine
      INFO: Setting up agent: JenkinsWorkerOne
      Sep 11, 2020 7:54:55 PM hudson.remoting.jnlp.Main$CuiListener <init>
      INFO: Jenkins agent is running in headless mode.
      Sep 11, 2020 7:54:55 PM hudson.remoting.Engine startEngine
      INFO: Using Remoting version: 3.29
      Sep 11, 2020 7:54:55 PM org.jenkinsci.remoting.engine.WorkDirManager initializeWorkDir
      INFO: Using D:\Jenkins\remoting as a remoting work directory
      Sep 11, 2020 7:54:55 PM hudson.remoting.jnlp.Main$CuiListener status
      INFO: Locating server among [https://jenkins.cdl.af.mil/]
      

       
      After reverting to previous version (Jenkins 2.235.5) they all connect again.

       

      Sep 11, 2020 8:37:00 PM org.jenkinsci.remoting.engine.JnlpAgentEndpointResolver resolve
      INFO: Remoting server accepts the following protocols: [JNLP4-connect, Ping]
      Sep 11, 2020 8:37:00 PM hudson.remoting.jnlp.Main$CuiListener status
      INFO: Agent discovery successful
      Agent address: 10.101.0.203
      Agent port: 52142
      Identity: 40:97:48:b3:eb:09:11:33:91:c9:18:ab:c5:f2:91:25
      Sep 11, 2020 8:37:00 PM hudson.remoting.jnlp.Main$CuiListener status
      INFO: Handshaking
      Sep 11, 2020 8:37:00 PM hudson.remoting.jnlp.Main$CuiListener status
      INFO: Connecting to 10.101.0.203:52142
      Sep 11, 2020 8:37:00 PM hudson.remoting.jnlp.Main$CuiListener status
      INFO: Trying protocol: JNLP4-connect
      Sep 11, 2020 8:37:00 PM hudson.remoting.jnlp.Main$CuiListener status
      INFO: Remote identity confirmed: 40:97:48:b3:eb:09:11:33:91:c9:18:ab:c5:f2:91:25
      Sep 11, 2020 8:37:01 PM hudson.remoting.jnlp.Main$CuiListener status
      INFO: Connected

        1. image-2020-09-13-10-25-16-349.png
          image-2020-09-13-10-25-16-349.png
          5 kB
        2. jenkins-slave.xml
          4 kB
        3. remoting.log.0
          1 kB
        4. remoting.log.4
          0.8 kB

          [JENKINS-63656] Jenkins 2.249.1 agents unable to connect to alternate URL

          Mark Waite added a comment -

          Good insight. I wonder if that is related to the comment in the Jenkins 2.245.1 changelog that says:

          Remove the fallback Jenkins URL from the JNLP launch file so that WebSocket agents can be connected over Java Web Start

          The agent.jar still accepts the -jnlpUrl argument, but possibly the Jenkins controller is ignoring the argument?

          JENKINS-63014 seems like it might be related

          Mark Waite added a comment - Good insight. I wonder if that is related to the comment in the Jenkins 2.245.1 changelog that says: Remove the fallback Jenkins URL from the JNLP launch file so that WebSocket agents can be connected over Java Web Start The agent.jar still accepts the -jnlpUrl argument, but possibly the Jenkins controller is ignoring the argument? JENKINS-63014 seems like it might be related

          So is there anything we can do?  Or does it need a Jenkins change?

          Larry Charbonneau added a comment - So is there anything we can do?  Or does it need a Jenkins change?

          Mark Waite added a comment -

          I think that the comment from jglick in JENKINS-63014 hints that there may be a different set of arguments you can pass to agent.jar that will cause it to connect to the 10.101.0.203 address and port.

          You might try configuring your Jenkins server to use a fixed port for inbound agents ("Manage Jenkins" -> "Configure Global Security"), then use that fixed port in the agent.jar command line.

          Mark Waite added a comment - I think that the comment from jglick in JENKINS-63014 hints that there may be a different set of arguments you can pass to agent.jar that will cause it to connect to the 10.101.0.203 address and port. You might try configuring your Jenkins server to use a fixed port for inbound agents ("Manage Jenkins" -> "Configure Global Security"), then use that fixed port in the agent.jar command line.

          The port is not the issue.  I need for the URL to be the IP 10.101.0.203 ..... that's whats in the agent config.  How else can I tell it to use the correct URL?

           

          I don't know what Jesse Glick is referring to "you can still do that with TCP agents, using the lower-level and more explicit launch mode" .... any insight?

          Larry Charbonneau added a comment - The port is not the issue.  I need for the URL to be the IP 10.101.0.203 ..... that's whats in the agent config.  How else can I tell it to use the correct URL?   I don't know what Jesse Glick is referring to "you can still do that with TCP agents, using the lower-level and more explicit launch mode" .... any insight?

          Mark Waite added a comment -

          I think he is referring to the command line argument listed by (with apologies that I deleted most of the output so that the specific options were more visible)

          mwaite@mark-pc2:~/bin$ java -jar agent-4.5.jar -help
           -auth user:pass                 : If your Jenkins is security-enabled, specify
                                             a valid user name and password.
           -connectTo HOST:PORT            : make a TCP connection to the given host and
                                             port, then start communication.
           -secret HEX_SECRET              : Agent connection secret to use instead of
                                             -jnlpCredentials.
          

          Mark Waite added a comment - I think he is referring to the command line argument listed by (with apologies that I deleted most of the output so that the specific options were more visible) mwaite@mark-pc2:~/bin$ java -jar agent-4.5.jar -help -auth user:pass : If your Jenkins is security-enabled, specify a valid user name and password. -connectTo HOST:PORT : make a TCP connection to the given host and port, then start communication. -secret HEX_SECRET : Agent connection secret to use instead of -jnlpCredentials.

          So it looks like this worked .... in the config for the agent, I added the following under the advanced 

           

          Larry Charbonneau added a comment - So it looks like this worked .... in the config for the agent, I added the following under the advanced   

          Mark Waite added a comment -

          That's great charbl2007. I'll include that information in the Jenkins 2.249.1 upgrade guide.

          Mark Waite added a comment - That's great charbl2007 . I'll include that information in the Jenkins 2.249.1 upgrade guide .

          Mark Waite added a comment - - edited

          Documented in the Jenkins 2.249.1 upgrade guide.

          Thanks for your help understanding the issue charbl2007!

          Mark Waite added a comment - - edited Documented in the Jenkins 2.249.1 upgrade guide. Thanks for your help understanding the issue charbl2007 !

          Claus Köll added a comment -

          I think we have the same problem reported in JENKINS-63671

          Claus Köll added a comment - I think we have the same problem reported in JENKINS-63671

          Mark Waite added a comment -

          Resolved by an entry in the Jenkins 2.249.1 upgrade guide describing the change and how to adapt to the change.

          Mark Waite added a comment - Resolved by an entry in the Jenkins 2.249.1 upgrade guide describing the change and how to adapt to the change.

            Unassigned Unassigned
            charbl2007 Larry Charbonneau
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: