Docker Community Forums

Share and learn in the Docker community.

Docker slave connectivity issue in jenkins

build
docker

(Vijaychandran) #1

please find my docker version

image

Facing slave connectivity issue in jenkins

  • cat
  • chmod +x /tmp/init.sh
  • exec /tmp/init.sh
  • export CONFIG=/tmp/config.sh
  • CONFIG=/tmp/config.sh
  • ‘[’ ‘!’ -f /tmp/config.sh ‘]’
  • echo 'No config, sleeping for 1 second’
    No config, sleeping for 1 second
  • sleep 1
  • ‘[’ ‘!’ -f /tmp/config.sh ‘]’
  • echo 'No config, sleeping for 1 second’
    No config, sleeping for 1 second
  • sleep 1
  • ‘[’ ‘!’ -f /tmp/config.sh ‘]’
  • echo 'No config, sleeping for 1 second’
    No config, sleeping for 1 second
  • sleep 1
  • ‘[’ ‘!’ -f /tmp/config.sh ‘]’
  • echo 'No config, sleeping for 1 second’
    No config, sleeping for 1 second
  • sleep 1
  • ‘[’ ‘!’ -f /tmp/config.sh ‘]’
  • echo 'No config, sleeping for 1 second’
    No config, sleeping for 1 second
  • sleep 1
  • ‘[’ ‘!’ -f /tmp/config.sh ‘]’
  • echo 'No config, sleeping for 1 second’
    No config, sleeping for 1 second
  • sleep 1
  • ‘[’ ‘!’ -f /tmp/config.sh ‘]’
  • echo 'No config, sleeping for 1 second’
    No config, sleeping for 1 second
  • sleep 1
  • ‘[’ ‘!’ -f /tmp/config.sh ‘]’
  • echo 'No config, sleeping for 1 second’
    No config, sleeping for 1 second
  • sleep 1
  • ‘[’ ‘!’ -f /tmp/config.sh ‘]’
  • echo 'No config, sleeping for 1 second’
    No config, sleeping for 1 second
  • sleep 1
  • ‘[’ ‘!’ -f /tmp/config.sh ‘]’
  • echo 'No config, sleeping for 1 second’
    No config, sleeping for 1 second
  • sleep 1
  • ‘[’ ‘!’ -f /tmp/config.sh ‘]’
  • echo 'Found config file’
    Found config file
  • source /tmp/config.sh
    ++ JENKINS_URL=http://172.16.102.234:8080/
    ++ JENKINS_USER=
    ++ JENKINS_HOME=/home/jenkins
    ++ COMPUTER_URL=computer/vj-docker-97a802c1b484/
    ++ COMPUTER_SECRET=8a1edafa6d62fbe8d168e95a6f7d98f4aa4c812869389e1d43fc50693245842f
  • ‘[’ -z http://172.16.102.234:8080/ ‘]’
  • ‘[’ -z computer/vj-docker-97a802c1b484/ ‘]’
  • ‘[’ ‘!’ -d /home/jenkins ‘]’
  • ‘[’ -z /home/jenkins ‘]’
    ++ command -v curl
  • ‘[’ -x ‘’ ‘]’
  • wget http://172.16.102.234:8080//jnlpJars/slave.jar -O /home/jenkins/slave.jar
    –2017-09-25 05:35:36-- http://172.16.102.234:8080//jnlpJars/slave.jar
    Connecting to 172.16.102.234:8080… connected.
    HTTP request sent, awaiting response… 200 OK
    Length: 719269 (702K) [application/java-archive]
    Saving to: '/home/jenkins/slave.jar’
    0% [ ] 0 --.-K/s 100%[======================================>] 719,269 --.-K/s in 0.01s
    2017-09-25 05:35:36 (50.2 MB/s) - ‘/home/jenkins/slave.jar’ saved [719269/719269]
  • env
    HOSTNAME=97a802c1b484
    TERM=xterm
    CONFIG=/tmp/config.sh
    PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
    PWD=/
    HOME=/root
    SHLVL=1
    _=/usr/bin/env
  • RUN_OPTS=’-jnlpUrl http://172.16.102.234:8080//computer/vj-docker-97a802c1b484//slave-agent.jnlp
  • ‘[’ ‘!’ -z 8a1edafa6d62fbe8d168e95a6f7d98f4aa4c812869389e1d43fc50693245842f ‘]’
  • RUN_OPTS+=’ -secret 8a1edafa6d62fbe8d168e95a6f7d98f4aa4c812869389e1d43fc50693245842f ’
  • RUN_CMD='java -jar /home/jenkins/slave.jar -jnlpUrl http://172.16.102.234:8080//computer/vj-docker-97a802c1b484//slave-agent.jnlp -secret 8a1edafa6d62fbe8d168e95a6f7d98f4aa4c812869389e1d43fc50693245842f ’
  • ‘[’ ‘!’ -z ‘’ ‘]’
  • java -jar /home/jenkins/slave.jar -jnlpUrl http://172.16.102.234:8080//computer/vj-docker-97a802c1b484//slave-agent.jnlp -secret 8a1edafa6d62fbe8d168e95a6f7d98f4aa4c812869389e1d43fc50693245842f
    Sep 25, 2017 5:35:37 AM hudson.remoting.jnlp.Main createEngine
    INFO: Setting up slave: vj-docker-97a802c1b484
    Sep 25, 2017 5:35:37 AM hudson.remoting.jnlp.Main$CuiListener
    INFO: Jenkins agent is running in headless mode.
    Sep 25, 2017 5:35:37 AM hudson.remoting.jnlp.Main$CuiListener status
    INFO: Locating server among [http://172.16.102.234:8080/]
    Sep 25, 2017 5:35:37 AM org.jenkinsci.remoting.engine.JnlpAgentEndpointResolver resolve
    INFO: Remoting server accepts the following protocols: [Ping, JNLP4-connect]
    Sep 25, 2017 5:35:37 AM hudson.remoting.jnlp.Main$CuiListener status
    INFO: Agent discovery successful
    Agent address: 172.16.102.234
    Agent port: 59282
    Identity: 88:ed:5f:bf:01:a1:c9:aa:e1:1d:a3:50:44:a5:d4:af
    Sep 25, 2017 5:35:37 AM hudson.remoting.jnlp.Main$CuiListener status
    INFO: Handshaking
    Sep 25, 2017 5:35:37 AM hudson.remoting.jnlp.Main$CuiListener status
    INFO: Connecting to 172.16.102.234:59282
    Sep 25, 2017 5:35:37 AM hudson.remoting.jnlp.Main$CuiListener status
    INFO: Trying protocol: JNLP4-connect
    Sep 25, 2017 5:35:38 AM hudson.remoting.jnlp.Main$CuiListener status
    INFO: Remote identity confirmed: 88:ed:5f:bf:01:a1:c9:aa:e1:1d:a3:50:44:a5:d4:af
    Sep 25, 2017 5:35:38 AM org.jenkinsci.remoting.protocol.impl.ConnectionHeadersFilterLayer onRecv
    INFO: [JNLP4-connect connection to 172.16.102.234/172.16.102.234:59282] Local headers refused by remote: vj-docker-97a802c1b484 is not a JNLP agent
    Sep 25, 2017 5:35:38 AM hudson.remoting.jnlp.Main$CuiListener status
    INFO: Protocol JNLP4-connect encountered an unexpected exception
    java.util.concurrent.ExecutionException: org.jenkinsci.remoting.protocol.impl.ConnectionRefusalException: vj-docker-97a802c1b484 is not a JNLP agent
    at org.jenkinsci.remoting.util.SettableFuture.get(SettableFuture.java:223)
    at hudson.remoting.Engine.innerRun(Engine.java:385)
    at hudson.remoting.Engine.run(Engine.java:287)
    Caused by: org.jenkinsci.remoting.protocol.impl.ConnectionRefusalException: vj-docker-97a802c1b484 is not a JNLP agent
    at org.jenkinsci.remoting.protocol.impl.ConnectionHeadersFilterLayer.newAbortCause(ConnectionHeadersFilterLayer.java:375)
    at org.jenkinsci.remoting.protocol.impl.ConnectionHeadersFilterLayer.onRecvClosed(ConnectionHeadersFilterLayer.java:432)
    at org.jenkinsci.remoting.protocol.ProtocolStack$Ptr.onRecvClosed(ProtocolStack.java:832)
    at org.jenkinsci.remoting.protocol.FilterLayer.onRecvClosed(FilterLayer.java:287)
    at org.jenkinsci.remoting.protocol.impl.SSLEngineFilterLayer.onRecvClosed(SSLEngineFilterLayer.java:172)
    at org.jenkinsci.remoting.protocol.ProtocolStack$Ptr.onRecvClosed(ProtocolStack.java:832)
    at org.jenkinsci.remoting.protocol.NetworkLayer.onRecvClosed(NetworkLayer.java:154)
    at org.jenkinsci.remoting.protocol.impl.BIONetworkLayer.access$1500(BIONetworkLayer.java:48)
    at org.jenkinsci.remoting.protocol.impl.BIONetworkLayer$Reader.run(BIONetworkLayer.java:247)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at hudson.remoting.Engine$1$1.run(Engine.java:94)
    at java.lang.Thread.run(Thread.java:745)
    Suppressed: java.nio.channels.ClosedChannelException
    … 7 more
    Sep 25, 2017 5:35:38 AM hudson.remoting.jnlp.Main$CuiListener status
    INFO: Connecting to 172.16.102.234:59282
    Sep 25, 2017 5:35:38 AM hudson.remoting.jnlp.Main$CuiListener status
    INFO: Server reports protocol JNLP4-plaintext not supported, skipping
    Sep 25, 2017 5:35:38 AM hudson.remoting.jnlp.Main$CuiListener status
    INFO: Server reports protocol JNLP3-connect not supported, skipping
    Sep 25, 2017 5:35:38 AM hudson.remoting.jnlp.Main$CuiListener status
    INFO: Server reports protocol JNLP2-connect not supported, skipping
    Sep 25, 2017 5:35:38 AM hudson.remoting.jnlp.Main$CuiListener status
    INFO: Server reports protocol JNLP-connect not supported, skipping
    Sep 25, 2017 5:35:38 AM hudson.remoting.jnlp.Main$CuiListener error
    SEVERE: The server rejected the connection: None of the protocols were accepted
    java.lang.Exception: The server rejected the connection: None of the protocols were accepted
    at hudson.remoting.Engine.onConnectionRejected(Engine.java:484)
    at hudson.remoting.Engine.innerRun(Engine.java:448)
    at hudson.remoting.Engine.run(Engine.java:287)

(Alexander Trauzzi) #2

Getting this same error as well. Agent seems to die after a brief period in a Windows container.