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

Slave can't connect to master using swarm swarm-client-2.2

    • Post-launch

      i have one slave on one data center can connect to master(using swarm client) using public conncetion,
      here is log:
      INFO: Attempting to connect to https://xxxxxx/ 371e2634-ff28-4e97-a20d-e91910259504 with ID
      Feb 02, 2017 6:16:19 PM hudson.plugins.swarm.SwarmClient getCsrfCrumb
      SEVERE: Could not obtain CSRF crumb. Response code: 404
      Feb 02, 2017 6:16:20 PM hudson.remoting.jnlp.Main createEngine
      INFO: Setting up slave: SLAVE-JAVA-AWS-STAGING-TUNN
      Feb 02, 2017 6:16:20 PM hudson.remoting.jnlp.Main$CuiListener <init>
      INFO: Jenkins agent is running in headless mode.
      Feb 02, 2017 6:16:20 PM hudson.remoting.jnlp.Main$CuiListener status
      INFO: Locating server among https://xxxxxx/
      Feb 02, 2017 6:16:20 PM hudson.remoting.jnlp.Main$CuiListener status
      INFO: Handshaking
      Feb 02, 2017 6:16:20 PM hudson.remoting.jnlp.Main$CuiListener status
      INFO: Connecting to xxxxxx:50000
      Feb 02, 2017 6:16:20 PM hudson.remoting.jnlp.Main$CuiListener status
      INFO: Trying protocol: JNLP3-connect
      Feb 02, 2017 6:16:20 PM hudson.remoting.jnlp.Main$CuiListener status
      INFO: Server didn't accept the handshake: Disabled protocol:Protocol:JNLP3-connect
      Feb 02, 2017 6:16:20 PM hudson.remoting.jnlp.Main$CuiListener status
      INFO: Connecting to xxxxx:50000
      Feb 02, 2017 6:16:20 PM hudson.remoting.jnlp.Main$CuiListener status
      INFO: Trying protocol: JNLP2-connect
      Feb 02, 2017 6:16:20 PM hudson.remoting.jnlp.Main$CuiListener status
      INFO: Connected
      Feb 02, 2017 6:16:21 PM com.youdevise.hudson.slavestatus.SlaveListener call
      INFO: Slave-status listener starting
      Feb 02, 2017 6:16:21 PM com.youdevise.hudson.slavestatus.SocketHTTPListener waitForConnection
      INFO: Slave-status listener ready on port 3141

      but when i have other slave on other data center can't connect to master(using swarm client) using tunnel conncetion,
      here is log
      INFO: Attempting to connect to https://xxxxx/371e2634-ff28-4e97-a20d-e91910259504 with ID
      Feb 02, 2017 6:09:35 PM hudson.plugins.swarm.SwarmClient getCsrfCrumb
      SEVERE: Could not obtain CSRF crumb. Response code: 404
      Feb 02, 2017 6:09:36 PM hudson.remoting.jnlp.Main createEngine
      INFO: Setting up slave: SLAVE-JAVA-AWS-STAGING-TUNN
      Feb 02, 2017 6:09:36 PM hudson.remoting.jnlp.Main$CuiListener <init>
      INFO: Jenkins agent is running in headless mode.
      Feb 02, 2017 6:09:36 PM hudson.remoting.jnlp.Main$CuiListener status
      INFO: Locating server among https://xxxxxx/
      Feb 02, 2017 6:09:36 PM hudson.remoting.jnlp.Main$CuiListener status
      INFO: Handshaking
      Feb 02, 2017 6:09:36 PM hudson.remoting.jnlp.Main$CuiListener status
      INFO: Connecting to xxxxxx:50000
      Feb 02, 2017 6:09:36 PM hudson.remoting.jnlp.Main$CuiListener status
      INFO: Trying protocol: JNLP3-connect
      Feb 02, 2017 6:09:36 PM hudson.remoting.jnlp.Main$CuiListener status
      INFO: Server didn't accept the handshake: Disabled protocol:Protocol:JNLP3-connect
      Feb 02, 2017 6:09:36 PM hudson.remoting.jnlp.Main$CuiListener status
      INFO: Connecting to xxxxxx:50000
      Feb 02, 2017 6:09:36 PM hudson.remoting.jnlp.Main$CuiListener status
      INFO: Trying protocol: JNLP2-connect
      Feb 02, 2017 6:09:36 PM hudson.remoting.jnlp.Main$CuiListener status
      INFO: Connected
      ..............
      [stack here]

      Could you help me?

          [JENKINS-41694] Slave can't connect to master using swarm swarm-client-2.2

          Halasson Simatupang created issue -
          Halasson Simatupang made changes -
          Epic Link New: INFRA-697 [ 170246 ]
          Halasson Simatupang made changes -
          Description Original: i have one slave on one data center can connect to master(using swarm client) using public conncetion,
          here is log:
          INFO: Attempting to connect to https://xxxxxx/ 371e2634-ff28-4e97-a20d-e91910259504 with ID
          Feb 02, 2017 6:16:19 PM hudson.plugins.swarm.SwarmClient getCsrfCrumb
          SEVERE: Could not obtain CSRF crumb. Response code: 404
          Feb 02, 2017 6:16:20 PM hudson.remoting.jnlp.Main createEngine
          INFO: Setting up slave: SLAVE-JAVA-AWS-STAGING-TUNN
          Feb 02, 2017 6:16:20 PM hudson.remoting.jnlp.Main$CuiListener <init>
          INFO: Jenkins agent is running in headless mode.
          Feb 02, 2017 6:16:20 PM hudson.remoting.jnlp.Main$CuiListener status
          INFO: Locating server among [https://xxxxxx/]
          Feb 02, 2017 6:16:20 PM hudson.remoting.jnlp.Main$CuiListener status
          INFO: Handshaking
          Feb 02, 2017 6:16:20 PM hudson.remoting.jnlp.Main$CuiListener status
          INFO: Connecting to xxxxxx:50000
          Feb 02, 2017 6:16:20 PM hudson.remoting.jnlp.Main$CuiListener status
          INFO: Trying protocol: JNLP3-connect
          Feb 02, 2017 6:16:20 PM hudson.remoting.jnlp.Main$CuiListener status
          INFO: Server didn't accept the handshake: Disabled protocol:Protocol:JNLP3-connect
          Feb 02, 2017 6:16:20 PM hudson.remoting.jnlp.Main$CuiListener status
          INFO: Connecting to xxxxx:50000
          Feb 02, 2017 6:16:20 PM hudson.remoting.jnlp.Main$CuiListener status
          INFO: Trying protocol: JNLP2-connect
          Feb 02, 2017 6:16:20 PM hudson.remoting.jnlp.Main$CuiListener status
          INFO: Connected
          Feb 02, 2017 6:16:21 PM com.youdevise.hudson.slavestatus.SlaveListener call
          INFO: Slave-status listener starting
          Feb 02, 2017 6:16:21 PM com.youdevise.hudson.slavestatus.SocketHTTPListener waitForConnection
          INFO: Slave-status listener ready on port 3141



          but when i have other slave on other data center can't connect to master(using swarm client) using tunnel conncetion,
          here is log
          INFO: Attempting to connect to https://xxxxx/371e2634-ff28-4e97-a20d-e91910259504 with ID
          Feb 02, 2017 6:09:35 PM hudson.plugins.swarm.SwarmClient getCsrfCrumb
          SEVERE: Could not obtain CSRF crumb. Response code: 404
          Feb 02, 2017 6:09:36 PM hudson.remoting.jnlp.Main createEngine
          INFO: Setting up slave: SLAVE-JAVA-AWS-STAGING-TUNN
          Feb 02, 2017 6:09:36 PM hudson.remoting.jnlp.Main$CuiListener <init>
          INFO: Jenkins agent is running in headless mode.
          Feb 02, 2017 6:09:36 PM hudson.remoting.jnlp.Main$CuiListener status
          INFO: Locating server among [https://xxxxxx/]
          Feb 02, 2017 6:09:36 PM hudson.remoting.jnlp.Main$CuiListener status
          INFO: Handshaking
          Feb 02, 2017 6:09:36 PM hudson.remoting.jnlp.Main$CuiListener status
          INFO: Connecting to xxxxxx:50000
          Feb 02, 2017 6:09:36 PM hudson.remoting.jnlp.Main$CuiListener status
          INFO: Trying protocol: JNLP3-connect
          Feb 02, 2017 6:09:36 PM hudson.remoting.jnlp.Main$CuiListener status
          INFO: Server didn't accept the handshake: Disabled protocol:Protocol:JNLP3-connect
          Feb 02, 2017 6:09:36 PM hudson.remoting.jnlp.Main$CuiListener status
          INFO: Connecting to xxxxxx:50000
          Feb 02, 2017 6:09:36 PM hudson.remoting.jnlp.Main$CuiListener status
          INFO: Trying protocol: JNLP2-connect
          Feb 02, 2017 6:09:36 PM hudson.remoting.jnlp.Main$CuiListener status
          INFO: Connected
          ..............
          [stack here]
          New: i have one slave on one data center can connect to master(using swarm client) using public conncetion,
          here is log:
          INFO: Attempting to connect to https://xxxxxx/ 371e2634-ff28-4e97-a20d-e91910259504 with ID
          Feb 02, 2017 6:16:19 PM hudson.plugins.swarm.SwarmClient getCsrfCrumb
          SEVERE: Could not obtain CSRF crumb. Response code: 404
          Feb 02, 2017 6:16:20 PM hudson.remoting.jnlp.Main createEngine
          INFO: Setting up slave: SLAVE-JAVA-AWS-STAGING-TUNN
          Feb 02, 2017 6:16:20 PM hudson.remoting.jnlp.Main$CuiListener <init>
          INFO: Jenkins agent is running in headless mode.
          Feb 02, 2017 6:16:20 PM hudson.remoting.jnlp.Main$CuiListener status
          INFO: Locating server among [https://xxxxxx/]
          Feb 02, 2017 6:16:20 PM hudson.remoting.jnlp.Main$CuiListener status
          INFO: Handshaking
          Feb 02, 2017 6:16:20 PM hudson.remoting.jnlp.Main$CuiListener status
          INFO: Connecting to xxxxxx:50000
          Feb 02, 2017 6:16:20 PM hudson.remoting.jnlp.Main$CuiListener status
          INFO: Trying protocol: JNLP3-connect
          Feb 02, 2017 6:16:20 PM hudson.remoting.jnlp.Main$CuiListener status
          INFO: Server didn't accept the handshake: Disabled protocol:Protocol:JNLP3-connect
          Feb 02, 2017 6:16:20 PM hudson.remoting.jnlp.Main$CuiListener status
          INFO: Connecting to xxxxx:50000
          Feb 02, 2017 6:16:20 PM hudson.remoting.jnlp.Main$CuiListener status
          INFO: Trying protocol: JNLP2-connect
          Feb 02, 2017 6:16:20 PM hudson.remoting.jnlp.Main$CuiListener status
          INFO: Connected
          Feb 02, 2017 6:16:21 PM com.youdevise.hudson.slavestatus.SlaveListener call
          INFO: Slave-status listener starting
          Feb 02, 2017 6:16:21 PM com.youdevise.hudson.slavestatus.SocketHTTPListener waitForConnection
          INFO: Slave-status listener ready on port 3141



          but when i have other slave on other data center can't connect to master(using swarm client) using tunnel conncetion,
          here is log
          INFO: Attempting to connect to https://xxxxx/371e2634-ff28-4e97-a20d-e91910259504 with ID
          Feb 02, 2017 6:09:35 PM hudson.plugins.swarm.SwarmClient getCsrfCrumb
          SEVERE: Could not obtain CSRF crumb. Response code: 404
          Feb 02, 2017 6:09:36 PM hudson.remoting.jnlp.Main createEngine
          INFO: Setting up slave: SLAVE-JAVA-AWS-STAGING-TUNN
          Feb 02, 2017 6:09:36 PM hudson.remoting.jnlp.Main$CuiListener <init>
          INFO: Jenkins agent is running in headless mode.
          Feb 02, 2017 6:09:36 PM hudson.remoting.jnlp.Main$CuiListener status
          INFO: Locating server among [https://xxxxxx/]
          Feb 02, 2017 6:09:36 PM hudson.remoting.jnlp.Main$CuiListener status
          INFO: Handshaking
          Feb 02, 2017 6:09:36 PM hudson.remoting.jnlp.Main$CuiListener status
          INFO: Connecting to xxxxxx:50000
          Feb 02, 2017 6:09:36 PM hudson.remoting.jnlp.Main$CuiListener status
          INFO: Trying protocol: JNLP3-connect
          Feb 02, 2017 6:09:36 PM hudson.remoting.jnlp.Main$CuiListener status
          INFO: Server didn't accept the handshake: Disabled protocol:Protocol:JNLP3-connect
          Feb 02, 2017 6:09:36 PM hudson.remoting.jnlp.Main$CuiListener status
          INFO: Connecting to xxxxxx:50000
          Feb 02, 2017 6:09:36 PM hudson.remoting.jnlp.Main$CuiListener status
          INFO: Trying protocol: JNLP2-connect
          Feb 02, 2017 6:09:36 PM hudson.remoting.jnlp.Main$CuiListener status
          INFO: Connected
          ..............
          [stack here]

          Could you help me?
          R. Tyler Croy made changes -
          Component/s New: swarm-plugin [ 15741 ]
          Component/s Original: github [ 18925 ]
          Key Original: INFRA-1056 New: JENKINS-41694
          Workflow Original: classic default workflow [ 215719 ] New: JNJira + In-Review [ 215742 ]
          Project Original: Infrastructure [ 10301 ] New: Jenkins [ 10172 ]

          Oleg Nenashev added a comment -

          The log says the agent connects successfully, there is no other info which could help to analyze the issue

          Oleg Nenashev added a comment - The log says the agent connects successfully, there is no other info which could help to analyze the issue
          Basil Crow made changes -
          Assignee Original: Benjamin Marosan [ 0120 ]
          Basil Crow made changes -
          Priority Original: Critical [ 2 ] New: Major [ 3 ]
          Basil Crow made changes -
          Priority Original: Major [ 3 ] New: Minor [ 4 ]
          Basil Crow made changes -
          Status Original: Open [ 1 ] New: In Progress [ 3 ]

          Basil Crow added a comment -

          Hey halasson0907, thanks for reporting this. While there isn't enough information above for me to be able to determine the root cause, may I suggest that you try starting the Swarm client with more verbose logging. This page provides an example of a verbose logging.properties file that logs as much as possible. Also check the Jenkins server logs for the same time period. Perhaps the additional logs will shed more light into what the Swarm client was doing at the time of the failure.

          Basil Crow added a comment - Hey halasson0907 , thanks for reporting this. While there isn't enough information above for me to be able to determine the root cause, may I suggest that you try starting the Swarm client with more verbose logging. This page provides an example of a verbose logging.properties file that logs as much as possible. Also check the Jenkins server logs for the same time period. Perhaps the additional logs will shed more light into what the Swarm client was doing at the time of the failure.
          Basil Crow made changes -
          Resolution New: Cannot Reproduce [ 5 ]
          Status Original: In Progress [ 3 ] New: Closed [ 6 ]

            Unassigned Unassigned
            halasson0907 Halasson Simatupang
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: