Impossible to connect a node to jenkins master : INFO: Protocol JNLP4-connect encountered an unexpected exception

Jenkins setup:
Jenkins: 2.235.1
OS: Linux - 3.10.0-1160.el7.x86_64
Java: 1.8.0_262 - Oracle Corporation (OpenJDK 64-Bit Server VM)

ace-editor:1.1
active-directory:2.16.1
analysis-model-api:9.8.0
ant:1.8
antisamy-markup-formatter:2.1
apache-httpcomponents-client-4-api:4.5.13-1.0
authorize-project:1.4.0
bootstrap4-api:4.6.0-1
bouncycastle-api:2.20
branch-api:2.6.2
caffeine-api:2.9.1-23.v51c4e2c879c8
checks-api:1.5.0
cloudbees-folder:6.15
command-launcher:1.6
credentials:2.5
data-tables-api:1.10.23-2
disk-usage:0.28
display-url-api:2.3.5
echarts-api:4.9.0-3
external-monitor-job:1.4
flexible-publish:0.15.2
font-awesome-api:5.15.2-1
forensics-api:0.10.1
fstrigger:0.41
greenballs:1.15.1
jackson2-api:2.12.3
javadoc:1.1
jdk-tool:1.5
jquery3-api:3.5.1-2
junit:1.50
ldap:1.11
log-parser:2.1
mailer:1.32.1
matrix-auth:2.6.7
matrix-project:1.18
mentor-questa-vrm:1.13
pam-auth:1.5.1
plugin-util-api:1.7.1
popper-api:1.16.1-1
run-condition:1.2
scm-api:2.6.4
script-security:1.77
snakeyaml-api:1.29.1
structs:1.23
token-macro:2.13
trilead-api:1.0.13
warnings-ng:8.9.2
windows-slaves:1.6
workflow-api:2.44
workflow-cps:2.92
workflow-job:2.41
workflow-multibranch:2.24
workflow-scm-step:2.12
workflow-step-api:2.23
workflow-support:3.8

I have a problem to connect my node to my jenkins server. It worked since years for this client and it is still working for other client on the same machine.

here is my command :

java -jar agent.jar -noCertificateCheck -jnlpUrl https://XXXXXXX:8446/computer/srv_linux_87_fpga_xxxx_t1a/slave-agent.jnlp -secret yyyyyyyyyyyy
 -workDir "/home/XXXXXXX/slave_jenkins_srv87"

I have then the error :

INFO: Protocol JNLP4-connect encountered an unexpected exception

here is the full log :

Skipping HTTPS certificate checks altogether. Note that this is not secure at all.
Jun 27, 2024 10:49:56 AM org.jenkinsci.remoting.engine.WorkDirManager initializeWorkDir
INFO: Using /home/xxxxx/slave_jenkins_srv87/remoting as a remoting work directory
Jun 27, 2024 10:49:57 AM org.jenkinsci.remoting.engine.WorkDirManager setupLogging
INFO: Both error and output logs will be printed to /home/xxxxx/slave_jenkins_srv87/remoting
Jun 27, 2024 10:49:57 AM hudson.remoting.jnlp.Main createEngine
INFO: Setting up agent: srv_linux_87_fpga_xxxx_t1a
Jun 27, 2024 10:49:57 AM hudson.remoting.jnlp.Main$CuiListener <init>
INFO: Jenkins agent is running in headless mode.
Jun 27, 2024 10:49:57 AM hudson.remoting.jnlp.Main createEngine
WARNING: Certificate validation for HTTPs endpoints is disabled
Jun 27, 2024 10:49:57 AM hudson.remoting.Engine startEngine
INFO: Using Remoting version: 4.3
Jun 27, 2024 10:49:57 AM org.jenkinsci.remoting.engine.WorkDirManager initializeWorkDir
INFO: Using /home/xxxxx/slave_jenkins_srv87/remoting as a remoting work directory
Jun 27, 2024 10:49:57 AM hudson.remoting.jnlp.Main$CuiListener status
INFO: Locating server among [https://xxxxxx:8446/]
Jun 27, 2024 10:49:57 AM org.jenkinsci.remoting.engine.JnlpAgentEndpointResolver openURLConnection
WARNING: HTTPs certificate check is disabled for the endpoint.
Jun 27, 2024 10:49:57 AM org.jenkinsci.remoting.engine.JnlpAgentEndpointResolver resolve
INFO: Remoting server accepts the following protocols: [JNLP4-connect, Ping]
Jun 27, 2024 10:49:57 AM hudson.remoting.jnlp.Main$CuiListener status
INFO: Agent discovery successful
  Agent address: xxxxx
  Agent port:    42780
  Identity:      xxxxxxx
Jun 27, 2024 10:49:57 AM hudson.remoting.jnlp.Main$CuiListener status
INFO: Handshaking
Jun 27, 2024 10:49:57 AM hudson.remoting.jnlp.Main$CuiListener status
INFO: Connecting to srv1990.ad.sds.safran:42780
Jun 27, 2024 10:49:57 AM hudson.remoting.jnlp.Main$CuiListener status
INFO: Trying protocol: JNLP4-connect
Jun 27, 2024 10:49:57 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: Connection closed before acknowledgement sent
    at org.jenkinsci.remoting.util.SettableFuture.get(SettableFuture.java:223)
    at hudson.remoting.Engine.innerRun(Engine.java:743)
    at hudson.remoting.Engine.run(Engine.java:518)
Caused by: org.jenkinsci.remoting.protocol.impl.ConnectionRefusalException: Connection closed before acknowledgement sent
    at org.jenkinsci.remoting.protocol.impl.AckFilterLayer.onRecvClosed(AckFilterLayer.java:283)
    at org.jenkinsci.remoting.protocol.ProtocolStack$Ptr.onRecvClosed(ProtocolStack.java:816)
    at org.jenkinsci.remoting.protocol.NetworkLayer.onRecvClosed(NetworkLayer.java:154)
    at org.jenkinsci.remoting.protocol.impl.BIONetworkLayer.access$1800(BIONetworkLayer.java:48)
    at org.jenkinsci.remoting.protocol.impl.BIONetworkLayer$Reader.run(BIONetworkLayer.java:264)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at hudson.remoting.Engine$1.lambda$newThread$0(Engine.java:117)
    at java.lang.Thread.run(Thread.java:748)

Jun 27, 2024 10:49:57 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:828)
    at hudson.remoting.Engine.innerRun(Engine.java:768)
at hudson.remoting.Engine.run(Engine.java:518)

and inside jenkins log I have :

Connection #15 failed: java.io.EOFException

To help the debug, for another node to the same server, I have the same log when it is successfull :

Skipping HTTPS certificate checks altogether. Note that this is not secure at all.
Jun 13, 2024 9:25:25 AM org.jenkinsci.remoting.engine.WorkDirManager initializeWorkDir
INFO: Using /home/xxxxxx/slave_jenkins_srv89/remoting as a remoting work directory
Jun 13, 2024 9:25:25 AM org.jenkinsci.remoting.engine.WorkDirManager setupLogging
INFO: Both error and output logs will be printed to /home/xxxxxx/slave_jenkins_srv89/remoting
Jun 13, 2024 9:25:25 AM hudson.remoting.jnlp.Main createEngine
INFO: Setting up agent: srv_linux_89_fpga_xxxxx_t1a
Jun 13, 2024 9:25:25 AM hudson.remoting.jnlp.Main$CuiListener <init>
INFO: Jenkins agent is running in headless mode.
Jun 13, 2024 9:25:25 AM hudson.remoting.jnlp.Main createEngine
WARNING: Certificate validation for HTTPs endpoints is disabled
Jun 13, 2024 9:25:25 AM hudson.remoting.Engine startEngine
INFO: Using Remoting version: 4.3
Jun 13, 2024 9:25:25 AM org.jenkinsci.remoting.engine.WorkDirManager initializeWorkDir
INFO: Using /home/sds.safran/F559710T1A/slave_jenkins_srv89/remoting as a remoting work directory
Jun 13, 2024 9:25:25 AM hudson.remoting.jnlp.Main$CuiListener status
INFO: Locating server among [https://xxxxxxxxxx]
Jun 13, 2024 9:25:25 AM org.jenkinsci.remoting.engine.JnlpAgentEndpointResolver openURLConnection
WARNING: HTTPs certificate check is disabled for the endpoint.
Jun 13, 2024 9:25:26 AM org.jenkinsci.remoting.engine.JnlpAgentEndpointResolver resolve
INFO: Remoting server accepts the following protocols: [JNLP4-connect, Ping]
Jun 13, 2024 9:25:26 AM hudson.remoting.jnlp.Main$CuiListener status
INFO: Agent discovery successful
  Agent address: xxxxxx
  Agent port:    43632
  Identity:      xxxxxx
Jun 13, 2024 9:25:26 AM hudson.remoting.jnlp.Main$CuiListener status
INFO: Handshaking
Jun 13, 2024 9:25:26 AM hudson.remoting.jnlp.Main$CuiListener status
INFO: Connecting to srv1990.ad.sds.safran:43632
Jun 13, 2024 9:25:26 AM hudson.remoting.jnlp.Main$CuiListener status
INFO: Trying protocol: JNLP4-connect
Jun 13, 2024 9:25:26 AM hudson.remoting.jnlp.Main$CuiListener status
INFO: Remote identity confirmed: xxxxxxx
Jun 13, 2024 9:25:26 AM hudson.remoting.jnlp.Main$CuiListener status
INFO: Connected

And inside the jenkins server log when connection is correct, I have :

Accepted JNLP4-connect connection #18 from XXXX/xxxx:yyyyy

it is very strange. as I said I have another client on the same physical machine than me (multi user linux server) that can be connected to the jenkins server.

jenkins server has been rebooted. linux session for the client has been rebooted also. nothing change.

the error

Connection #15 failed: java.io.EOFException

make me think that maybe there is an error when accessing a file ? file too huge ? no more disk space or something like this ?

the jenkins controller is on a server that is no restarted very often and maybe some files to store log are too big ?

also I tried to create another node and I have the same problem.

I don’t succeed to have more detail about the defect in the log, how can I have more detail about the : java.io.EOFException that seems to be a very generic error message that could have several root cause.

I have more log in the server side during the failure of the jenkins node connection :


Jul 02, 2024 12:31:16 PM INFO hudson.TcpSlaveAgentListener$ConnectionHandler run

Connection #47 failed: java.io.EOFException

Jul 02, 2024 12:31:16 PM WARNING hudson.TcpSlaveAgentListener$ConnectionHandler run

Connection #48 failed
java.io.IOException: Connection reset by peer
	at sun.nio.ch.FileDispatcherImpl.read0(Native Method)
	at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:39)
	at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:223)
	at sun.nio.ch.IOUtil.read(IOUtil.java:197)
	at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:377)
	at sun.nio.ch.SocketAdaptor$SocketInputStream.read(SocketAdaptor.java:205)
	at sun.nio.ch.ChannelInputStream.read(ChannelInputStream.java:103)
	at java.io.DataInputStream.readFully(DataInputStream.java:195)
	at java.io.DataInputStream.readFully(DataInputStream.java:169)
	at hudson.TcpSlaveAgentListener$ConnectionHandler.run(TcpSlaveAgentListener.java:270)

but I didn’t help me a lot :frowning:

hello, no one could help me ? i saw some answer on internet but they didn’t matched my case.

the error

Protocol JNLP4-connect encountered an unexpected exception

is common but I didn’t find any answer when this error is associated with error

Connection #47 failed: java.io.EOFException
java.io.IOException: Connection reset by peer

do you how to debug this ?

the behavior is very strange as one node suddently start to work (without me having done anything special for this) but I have still one node that is not working…
:

Problem resolved it was a network issue. the switch between the controller and the node had a firewall that was incorrectly configured

1 Like

I have also encountered this problem now, and I have no way to start from the log, but my old environment is no problem, and the new environment I have deployed now has this problem all the time, because of this problem, I have restored my cloud host twice


The firewall of my server is closed, but this problem still occurs. My two machines are under a switch, the same LAN, and VMware makes virtual machines