title: Jenkins Slave JNLP connection gets terminated
body: <p>Looking for some help here!</p>
  
  <p>I am running Jenkins(v2.134) as a docker container managed by Rancher(v1.6.16); and i am using haproxy(HA-Proxy version 1.6.3 2015/12/25) as my loadbalancer. Jenkins JNLP port is configured as 50000. haproxy got the rule for TCP port forwarding(8081 > 50000)</p>
  
  <p>My slave (macmini) is in different network and behind firewall (This network can make reach my Jenkins Infra). I am using "Tunnel connection through" property and specified port ":8081". The port 8081 is already opened in the firewall.</p>
  
  <p>My Jenkins Java version is -</p>
  
  <pre><code>openjdk version "1.8.0_151"
  OpenJDK Runtime Environment (build 1.8.0_151-8u151-b12-1~deb9u1-b12)
  </code></pre>
  
  <p>My Slave Java version is -</p>
  
  <pre><code>Sun JDK "1.8.0_151"
  </code></pre>
  
  <p>Here are the agent logs -</p>
  
  <pre><code>*INFO: Setting up agent: my-slave-01*
      Sep 26, 2018 2:48:50 PM hudson.remoting.jnlp.Main$CuiListener &lt;init&gt;
      INFO: Jenkins agent is running in headless mode.
      Sep 26, 2018 2:48:50 PM hudson.remoting.Engine startEngine
      INFO: Using Remoting version: 3.23
      Sep 26, 2018 2:48:50 PM hudson.remoting.Engine startEngine
      WARNING: No Working Directory. Using the legacy JAR Cache location: /Users/jenkins/.jenkins/cache/jars
      Sep 26, 2018 2:48:51 PM hudson.remoting.jnlp.Main$CuiListener status
      INFO: Locating server among [http://&lt;My Jenkins URL&gt;/]
      Sep 26, 2018 2:48:51 PM org.jenkinsci.remoting.engine.JnlpAgentEndpointResolver resolve
      INFO: Remoting server accepts the following protocols: [JNLP4-connect, Ping]
      Sep 26, 2018 2:48:51 PM hudson.remoting.jnlp.Main$CuiListener status
      *INFO: Agent discovery successful*
       *Agent address: &lt;My Jenkins DNS Name&gt;*
       *Agent port:    8081*
       Identity:      b5:c7:33:8d:9c:97:41:3f:e1:b1:b5:31:25:ea:b5:2e
      Sep 26, 2018 2:48:51 PM hudson.remoting.jnlp.Main$CuiListener status
      INFO: Handshaking
      Sep 26, 2018 2:48:51 PM hudson.remoting.jnlp.Main$CuiListener status
      INFO: Connecting to &lt;My Jenkins DNS&gt;:8081
      Sep 26, 2018 2:48:51 PM hudson.remoting.jnlp.Main$CuiListener status
      INFO: Trying protocol: JNLP4-connect
      Sep 26, 2018 2:48:51 PM hudson.remoting.jnlp.Main$CuiListener status
      INFO: Remote identity confirmed: b5:c7:33:8d:9c:97:41:3f:e1:b1:b5:31:25:ea:b5:2e
      Sep 26, 2018 2:48:52 PM hudson.remoting.jnlp.Main$CuiListener status
      *INFO: Connected*
      Sep 26, 2018 2:48:54 PM org.jenkinsci.remoting.util.AnonymousClassWarnings warn
      WARNING: Attempt to (de-)serialize anonymous class org.jenkinsci.plugins.envinject.EnvInjectComputerListener$2; see: https://jenkins.io/redirect/serialization-of-anonymous-classes/
      Sep 26, 2018 2:49:49 PM hudson.remoting.jnlp.Main$CuiListener status
      *INFO: Terminated*
  </code></pre>
  
  <p>Any help will be appreciated.</p>
  
  <p>Is there is a way to get more verbose logs?</p>