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

Agent tunnel connection issues after ugrading Jenkins to 2.191

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • remoting
    • Windows 7
      Jenkins 2.191
      Oracle JRE jre1.8.0_171
      AdoptOpenJDK jre-8.0.222.10-hotspot
    • Remoting 3.35

      After updating Jenkins master to 2.191 windows slave thows following exception:

      Aug 27, 2019 8:41:10 AM hudson.remoting.jnlp.Main createEngine
      INFORMATION: Setting up agent: spsde05ws016
      Aug 27, 2019 8:41:10 AM hudson.remoting.jnlp.Main$CuiListener <init>
      INFORMATION: Jenkins agent is running in headless mode.
      Aug 27, 2019 8:41:11 AM hudson.remoting.jnlp.Main createEngine
      WARNUNG: Certificate validation for HTTPs endpoints is disabled
      Aug 27, 2019 8:41:11 AM hudson.remoting.Engine startEngine
      INFORMATION: Using Remoting version: 3.34
      Aug 27, 2019 8:41:11 AM hudson.remoting.Engine startEngine
      WARNUNG: No Working Directory. Using the legacy JAR Cache location: C:\Windows\system32\config\systemprofile\.jenkins\cache\jars
      Aug 27, 2019 8:41:11 AM hudson.remoting.jnlp.Main$CuiListener status
      INFORMATION: Locating server among [https://tools.xxxxx.local/devjenkins/]
      Aug 27, 2019 8:41:11 AM org.jenkinsci.remoting.engine.JnlpAgentEndpointResolver openURLConnection
      WARNUNG: HTTPs certificate check is disabled for the endpoint.
      Aug 27, 2019 8:41:11 AM org.jenkinsci.remoting.engine.JnlpAgentEndpointResolver resolve
      INFORMATION: Remoting server accepts the following protocols: [JNLP4-connect, Ping]
      Aug 27, 2019 8:41:11 AM org.jenkinsci.remoting.engine.JnlpAgentEndpointResolver resolve
      INFORMATION: Remoting TCP connection tunneling is enabled. Skipping the TCP Agent Listener Port availability check
      Aug 27, 2019 8:41:11 AM hudson.remoting.jnlp.Main$CuiListener error
      SCHWERWIEGEND: For input string: ""
      java.lang.NumberFormatException: For input string: ""
      	at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
      	at java.lang.Integer.parseInt(Integer.java:592)
      	at java.lang.Integer.parseInt(Integer.java:615)
      	at org.jenkinsci.remoting.engine.HostPort.splitHostPort(HostPort.java:25)
      	at org.jenkinsci.remoting.engine.HostPort.<init>(HostPort.java:8)
      	at org.jenkinsci.remoting.engine.JnlpAgentEndpointResolver.resolve(JnlpAgentEndpointResolver.java:329)
      	at hudson.remoting.Engine.innerRun(Engine.java:529)
      	at hudson.remoting.Engine.run(Engine.java:490)
      

       

       

          [JENKINS-59094] Agent tunnel connection issues after ugrading Jenkins to 2.191

          Dzianis Mazuronak created issue -
          Oleg Nenashev made changes -
          Summary Original: Windows Slave connection issues after ugrading Jenkins to 2.191 New: Windows Agent connection issues after ugrading Jenkins to 2.191
          Oleg Nenashev made changes -
          Labels New: regression

          Oleg Nenashev added a comment -

          Oleg Nenashev added a comment - It was caused by  https://github.com/jenkinsci/remoting/pull/338/files  . CC jthompson
          Oleg Nenashev made changes -
          Environment Original: Windows 7
          Oracle JRE jre1.8.0_171
          AdoptOpenJDK jre-8.0.222.10-hotspot
          New: Windows 7
          Jenkins 2.191
          Oracle JRE jre1.8.0_171
          AdoptOpenJDK jre-8.0.222.10-hotspot
          Dzianis Mazuronak made changes -
          Description Original: After updating Jenkins master to 2.191 windows slave thows following exception:


          {code:java}
          Aug 27, 2019 8:41:10 AM hudson.remoting.jnlp.Main createEngine
          INFORMATION: Setting up agent: spsde05ws016
          Aug 27, 2019 8:41:10 AM hudson.remoting.jnlp.Main$CuiListener <init>
          INFORMATION: Jenkins agent is running in headless mode.
          Aug 27, 2019 8:41:11 AM hudson.remoting.jnlp.Main createEngine
          WARNUNG: Certificate validation for HTTPs endpoints is disabled
          Aug 27, 2019 8:41:11 AM hudson.remoting.Engine startEngine
          INFORMATION: Using Remoting version: 3.34
          Aug 27, 2019 8:41:11 AM hudson.remoting.Engine startEngine
          WARNUNG: No Working Directory. Using the legacy JAR Cache location: C:\Windows\system32\config\systemprofile\.jenkins\cache\jars
          Aug 27, 2019 8:41:11 AM hudson.remoting.jnlp.Main$CuiListener status
          INFORMATION: Locating server among [https://tools.spsde.local/devjenkins/]
          Aug 27, 2019 8:41:11 AM org.jenkinsci.remoting.engine.JnlpAgentEndpointResolver openURLConnection
          WARNUNG: HTTPs certificate check is disabled for the endpoint.
          Aug 27, 2019 8:41:11 AM org.jenkinsci.remoting.engine.JnlpAgentEndpointResolver resolve
          INFORMATION: Remoting server accepts the following protocols: [JNLP4-connect, Ping]
          Aug 27, 2019 8:41:11 AM org.jenkinsci.remoting.engine.JnlpAgentEndpointResolver resolve
          INFORMATION: Remoting TCP connection tunneling is enabled. Skipping the TCP Agent Listener Port availability check
          Aug 27, 2019 8:41:11 AM hudson.remoting.jnlp.Main$CuiListener error
          SCHWERWIEGEND: For input string: ""
          java.lang.NumberFormatException: For input string: ""
          at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
          at java.lang.Integer.parseInt(Integer.java:592)
          at java.lang.Integer.parseInt(Integer.java:615)
          at org.jenkinsci.remoting.engine.HostPort.splitHostPort(HostPort.java:25)
          at org.jenkinsci.remoting.engine.HostPort.<init>(HostPort.java:8)
          at org.jenkinsci.remoting.engine.JnlpAgentEndpointResolver.resolve(JnlpAgentEndpointResolver.java:329)
          at hudson.remoting.Engine.innerRun(Engine.java:529)
          at hudson.remoting.Engine.run(Engine.java:490)
          {code}
           

           
          New: After updating Jenkins master to 2.191 windows slave thows following exception:
          {code:java}
          Aug 27, 2019 8:41:10 AM hudson.remoting.jnlp.Main createEngine
          INFORMATION: Setting up agent: spsde05ws016
          Aug 27, 2019 8:41:10 AM hudson.remoting.jnlp.Main$CuiListener <init>
          INFORMATION: Jenkins agent is running in headless mode.
          Aug 27, 2019 8:41:11 AM hudson.remoting.jnlp.Main createEngine
          WARNUNG: Certificate validation for HTTPs endpoints is disabled
          Aug 27, 2019 8:41:11 AM hudson.remoting.Engine startEngine
          INFORMATION: Using Remoting version: 3.34
          Aug 27, 2019 8:41:11 AM hudson.remoting.Engine startEngine
          WARNUNG: No Working Directory. Using the legacy JAR Cache location: C:\Windows\system32\config\systemprofile\.jenkins\cache\jars
          Aug 27, 2019 8:41:11 AM hudson.remoting.jnlp.Main$CuiListener status
          INFORMATION: Locating server among [https://tools.xxxxx.local/devjenkins/]
          Aug 27, 2019 8:41:11 AM org.jenkinsci.remoting.engine.JnlpAgentEndpointResolver openURLConnection
          WARNUNG: HTTPs certificate check is disabled for the endpoint.
          Aug 27, 2019 8:41:11 AM org.jenkinsci.remoting.engine.JnlpAgentEndpointResolver resolve
          INFORMATION: Remoting server accepts the following protocols: [JNLP4-connect, Ping]
          Aug 27, 2019 8:41:11 AM org.jenkinsci.remoting.engine.JnlpAgentEndpointResolver resolve
          INFORMATION: Remoting TCP connection tunneling is enabled. Skipping the TCP Agent Listener Port availability check
          Aug 27, 2019 8:41:11 AM hudson.remoting.jnlp.Main$CuiListener error
          SCHWERWIEGEND: For input string: ""
          java.lang.NumberFormatException: For input string: ""
          at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
          at java.lang.Integer.parseInt(Integer.java:592)
          at java.lang.Integer.parseInt(Integer.java:615)
          at org.jenkinsci.remoting.engine.HostPort.splitHostPort(HostPort.java:25)
          at org.jenkinsci.remoting.engine.HostPort.<init>(HostPort.java:8)
          at org.jenkinsci.remoting.engine.JnlpAgentEndpointResolver.resolve(JnlpAgentEndpointResolver.java:329)
          at hudson.remoting.Engine.innerRun(Engine.java:529)
          at hudson.remoting.Engine.run(Engine.java:490)
          {code}
           

           
          Jesse Glick made changes -
          Link New: This issue is caused by JENKINS-53461 [ JENKINS-53461 ]

          Jeff Thompson added a comment -

          I tested on Windows and Unix under a few configurations. Another contributor also tested a variety of other configurations. Somehow this one got missed.

          I'm looking into it.

          Jeff Thompson added a comment - I tested on Windows and Unix under a few configurations. Another contributor also tested a variety of other configurations. Somehow this one got missed. I'm looking into it.

          Jeff Thompson added a comment -

          dmazuronak, could you clarify your configuration? The log messages indicate that you are using tunneling. Based upon the error messages, it looks like your tunnel parameter looks something like "myjenkins:", in other words, no port number is specified. Or it's specified in an unusual way I didn't account for. You could provide the parameters you use in your launch command, particularly anything relating to tunneling.

          You could also provide log messages from an agent connection sequence from a working Jenkins, before 2.191 that shows how the port is handled.

          I've got a change that might make it work like it did before but I want to make sure I'm addressing the problem before submitting.

          On my Windows test system I wasn't able to reproduce the problem with a basic installation.

           

          Jeff Thompson added a comment - dmazuronak , could you clarify your configuration? The log messages indicate that you are using tunneling. Based upon the error messages, it looks like your tunnel parameter looks something like "myjenkins:", in other words, no port number is specified. Or it's specified in an unusual way I didn't account for. You could provide the parameters you use in your launch command, particularly anything relating to tunneling. You could also provide log messages from an agent connection sequence from a working Jenkins, before 2.191 that shows how the port is handled. I've got a change that might make it work like it did before but I want to make sure I'm addressing the problem before submitting. On my Windows test system I wasn't able to reproduce the problem with a basic installation.  

          Hello jthompson

          here is my configuration:

          Jenkins is running on the host J (x.x.3.9). The Jenkins web interface is available over reverse proxy running on the different host P (x.x.3.2). There are DNS alias tools.xxxxx.local, pointing to the host P. Jenkins windows slave runs on the host xxxxx05ws016 (x.x.13.82) as Windows Service, initially installed over Java Web Start.

          Here are some interesting sections from Jenkins Global Security Configuration page:

           

          Agents:
              TCP port for inbound agents:    Random
              Agent protocols:                Java-Web-Start-Agent protocol Version 4 (TLS-encryption)
          SSH Server:
              SSHD Port:         Deactivated
          

          And here are part of the windows agent log, after Jenkins was restored to the version 2.190:

          Aug 27, 2019 8:43:45 AM hudson.remoting.jnlp.Main createEngine
          INFORMATION: Setting up agent: xxxxx05ws016
          Aug 27, 2019 8:43:45 AM hudson.remoting.jnlp.Main$CuiListener <init>
          INFORMATION: Jenkins agent is running in headless mode.
          Aug 27, 2019 8:43:45 AM hudson.remoting.jnlp.Main createEngine
          WARNUNG: Certificate validation for HTTPs endpoints is disabled
          Aug 27, 2019 8:43:45 AM hudson.remoting.Engine startEngine
          INFORMATION: Using Remoting version: 3.33
          Aug 27, 2019 8:43:45 AM hudson.remoting.Engine startEngine
          WARNUNG: No Working Directory. Using the legacy JAR Cache location: C:\Windows\system32\config\systemprofile\.jenkins\cache\jars
          Aug 27, 2019 8:43:45 AM hudson.remoting.jnlp.Main$CuiListener status
          INFORMATION: Locating server among [https://tools.xxx.local/devjenkins/]
          Aug 27, 2019 8:43:45 AM org.jenkinsci.remoting.engine.JnlpAgentEndpointResolver openURLConnection
          WARNUNG: HTTPs certificate check is disabled for the endpoint.
          Aug 27, 2019 8:43:45 AM org.jenkinsci.remoting.engine.JnlpAgentEndpointResolver resolve
          INFORMATION: Remoting server accepts the following protocols: [JNLP4-connect, Ping]
          Aug 27, 2019 8:43:45 AM org.jenkinsci.remoting.engine.JnlpAgentEndpointResolver resolve
          INFORMATION: Remoting TCP connection tunneling is enabled. Skipping the TCP Agent Listener Port availability check
          Aug 27, 2019 8:43:45 AM hudson.remoting.jnlp.Main$CuiListener status
          INFORMATION: Agent discovery successful
            Agent address: x.x.3.9
            Agent port:    33773
            Identity:      f8:2a:3d:5a:d4:22:f4:a0:89:26:4a:a1:34:20:c3:11
          Aug 27, 2019 8:43:45 AM hudson.remoting.jnlp.Main$CuiListener status
          INFORMATION: Handshaking
          Aug 27, 2019 8:43:45 AM hudson.remoting.jnlp.Main$CuiListener status
          INFORMATION: Connecting to x.x.3.9:33773
          Aug 27, 2019 8:43:45 AM hudson.remoting.jnlp.Main$CuiListener status
          INFORMATION: Trying protocol: JNLP4-connect
          Aug 27, 2019 8:43:46 AM hudson.remoting.jnlp.Main$CuiListener status
          INFORMATION: Remote identity confirmed: f8:2a:3d:5a:d4:22:f4:a0:89:26:4a:a1:34:20:c3:11
          Aug 27, 2019 8:43:48 AM hudson.remoting.jnlp.Main$CuiListener status
          INFORMATION: Connected
          
          

           

          Dzianis Mazuronak added a comment - Hello jthompson ,  here is my configuration: Jenkins is running on the host J (x.x.3.9). The Jenkins web interface is available over reverse proxy running on the different host P (x.x.3.2). There are DNS alias tools.xxxxx.local, pointing to the host P. Jenkins windows slave runs on the host xxxxx05ws016 (x.x.13.82) as Windows Service, initially installed over Java Web Start. Here are some interesting sections from Jenkins Global Security Configuration page:   Agents: TCP port for inbound agents: Random    Agent protocols:                Java-Web-Start-Agent protocol Version 4 (TLS-encryption) SSH Server:     SSHD Port:         Deactivated And here are part of the windows agent log, after Jenkins was restored to the version 2.190: Aug 27, 2019 8:43:45 AM hudson.remoting.jnlp.Main createEngine INFORMATION: Setting up agent: xxxxx05ws016 Aug 27, 2019 8:43:45 AM hudson.remoting.jnlp.Main$CuiListener <init> INFORMATION: Jenkins agent is running in headless mode. Aug 27, 2019 8:43:45 AM hudson.remoting.jnlp.Main createEngine WARNUNG: Certificate validation for HTTPs endpoints is disabled Aug 27, 2019 8:43:45 AM hudson.remoting.Engine startEngine INFORMATION: Using Remoting version: 3.33 Aug 27, 2019 8:43:45 AM hudson.remoting.Engine startEngine WARNUNG: No Working Directory. Using the legacy JAR Cache location: C:\Windows\system32\config\systemprofile\.jenkins\cache\jars Aug 27, 2019 8:43:45 AM hudson.remoting.jnlp.Main$CuiListener status INFORMATION: Locating server among [https: //tools.xxx.local/devjenkins/] Aug 27, 2019 8:43:45 AM org.jenkinsci.remoting.engine.JnlpAgentEndpointResolver openURLConnection WARNUNG: HTTPs certificate check is disabled for the endpoint. Aug 27, 2019 8:43:45 AM org.jenkinsci.remoting.engine.JnlpAgentEndpointResolver resolve INFORMATION: Remoting server accepts the following protocols: [JNLP4-connect, Ping] Aug 27, 2019 8:43:45 AM org.jenkinsci.remoting.engine.JnlpAgentEndpointResolver resolve INFORMATION: Remoting TCP connection tunneling is enabled. Skipping the TCP Agent Listener Port availability check Aug 27, 2019 8:43:45 AM hudson.remoting.jnlp.Main$CuiListener status INFORMATION: Agent discovery successful Agent address: x.x.3.9 Agent port: 33773 Identity: f8:2a:3d:5a:d4:22:f4:a0:89:26:4a:a1:34:20:c3:11 Aug 27, 2019 8:43:45 AM hudson.remoting.jnlp.Main$CuiListener status INFORMATION: Handshaking Aug 27, 2019 8:43:45 AM hudson.remoting.jnlp.Main$CuiListener status INFORMATION: Connecting to x.x.3.9:33773 Aug 27, 2019 8:43:45 AM hudson.remoting.jnlp.Main$CuiListener status INFORMATION: Trying protocol: JNLP4-connect Aug 27, 2019 8:43:46 AM hudson.remoting.jnlp.Main$CuiListener status INFORMATION: Remote identity confirmed: f8:2a:3d:5a:d4:22:f4:a0:89:26:4a:a1:34:20:c3:11 Aug 27, 2019 8:43:48 AM hudson.remoting.jnlp.Main$CuiListener status INFORMATION: Connected  

            jthompson Jeff Thompson
            dmazuronak Dzianis Mazuronak
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: