Jenkins Docker Slave unable to connect to Jenkins Master

2,014 views
Skip to first unread message

jsand...@gmail.com

unread,
Mar 22, 2016, 10:26:58 AM3/22/16
to Jenkins Users
HI,

Issue:  Jenkin Slave running in a Docker Container unable to connect to the Jenkins Master.

I have Jenkins Master in Docker Container on AWS EC2 Instance.  I have installed AWS ECS (Container Plugin).   Jenkins Slaves are running in the Docker container.   

Here is the log:

Jenkins Master Log:


Mar 21, 2016 11:18:41 PM WARNING jenkins.slaves.JnlpSlaveHandshake error

TCP slave agent connection handler #10 with /10.231.5.122:56870 is aborted: JNLP2-connect: rejected connection for node: my-slave-13

Mar 21, 2016 11:18:41 PM INFO hudson.TcpSlaveAgentListener$ConnectionHandler run

Accepted connection #11 from /10.231.5.122:56871

Mar 21, 2016 11:18:41 PM WARNING jenkins.slaves.JnlpSlaveHandshake error

TCP slave agent connection handler #11 with /10.231.5.122:56871 is aborted: Unauthorized access

Mar 21, 2016 11:18:41 PM INFO hudson.TcpSlaveAgentListener$ConnectionHandler run

Accepted connection #12 from /10.231.5.122:56872

Mar 21, 2016 11:18:41 PM WARNING hudson.TcpSlaveAgentListener$ConnectionHandler run

Connection #12 failed

java.io.EOFException

                at java.io.DataInputStream.readUnsignedShort(DataInputStream.java:340)

                at java.io.DataInputStream.readUTF(DataInputStream.java:589)

                at java.io.DataInputStream.readUTF(DataInputStream.java:564)

                at hudson.TcpSlaveAgentListener$ConnectionHandler.run(TcpSlaveAgentListener.java:150)

 

Jenkins Slave Log:


On the slave, I am getting the following error

ar 21, 2016 11:18:41 PM hudson.remoting.jnlp.Main createEngine

INFO: Setting up slave: my-slave-13

Mar 21, 2016 11:18:41 PM hudson.remoting.jnlp.Main$CuiListener <init>

INFO: Jenkins agent is running in headless mode.

Mar 21, 2016 11:18:41 PM hudson.remoting.jnlp.Main$CuiListener status

INFO: Locating server among [http://10.231.1.123:8080/jenkins/]

Mar 21, 2016 11:18:41 PM hudson.remoting.jnlp.Main$CuiListener status

INFO: Handshaking

Mar 21, 2016 11:18:41 PM hudson.remoting.jnlp.Main$CuiListener status

INFO: Connecting to 10.231.1.123:50000

Mar 21, 2016 11:18:41 PM hudson.remoting.jnlp.Main$CuiListener status

INFO: Trying protocol: JNLP2-connect

Mar 21, 2016 11:18:41 PM hudson.remoting.jnlp.Main$CuiListener status

INFO: Server didn't understand the protocol: JNLP2-connect: rejected connection for node: my-slave-13

Mar 21, 2016 11:18:41 PM hudson.remoting.jnlp.Main$CuiListener status

INFO: Connecting to 10.231.1.123:50000

Mar 21, 2016 11:18:41 PM hudson.remoting.jnlp.Main$CuiListener status

INFO: Trying protocol: JNLP-connect

Mar 21, 2016 11:18:41 PM hudson.remoting.jnlp.Main$CuiListener status

INFO: Server didn't understand the protocol: Unauthorized access

Mar 21, 2016 11:18:41 PM hudson.remoting.jnlp.Main$CuiListener status

INFO: Connecting to 10.231.1.123:50000

Mar 21, 2016 11:18:41 PM 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:297)

        at hudson.remoting.Engine.run(Engine.java:268)

Harikrishnan Gopalakrishnan

unread,
Sep 28, 2016, 2:53:27 PM9/28/16
to Jenkins Users
Hi,

I am also facing similar issue. Where you able to resolve this issue. Could you please let me know how this was fixed?

jsand...@gmail.com

unread,
Sep 29, 2016, 7:25:49 PM9/29/16
to Jenkins Users
Hi,

We use AutoScalingGroup in AWS.  ASG simply deleted that instance and created new one.  I have never seen any issue after that.

Please provide more information. 

I am facing OutofMemory New Threads etc.  I have increased the Ulimits on OS and Docker Container.  So far so good.

Thanks
Jaspal sandhu
Reply all
Reply to author
Forward
0 new messages