The server rejected the connection: None of the protocols were accepted

Sid picture Sid · Feb 10, 2016 · Viewed 27.2k times · Source

I'm facing a weird issue when I launch Jenkins as Windows service in my client VM.

1) I have launched Jenkins as Windows service in my client side master machine (a Windows VM) and configured my local machine as a slave and I'm unable to establish the connection between master and slave. I'm getting the following error:

"java.lang.Exception: The server rejected the connection: None of the protocols were accepted"

Both master and slave are in same network (client's network, connected slave using VPN).

Client Master machine's domain name ABC
Local machine domain name xyz

console output

2) I have stopped the Jenkins as Windows service and launched again through command prompt using

"java -jar jenkins.war"

now I'm able to establish connection between master and slave without any issues.

3) Now I have launched Jenkins as Windows service in my **local machine as master and one of the local machine as slave, and successfully established the connection between master and slave.

What exactly is the reason for not establishing the connection between master and slave using point (1)?

Answer

Max picture Max · Jan 16, 2020

In my case that was linked to disabled protocol.

Check next: If your Jenkins is supporting JNLPv4, enable it before use.

Jenkins -> Global Security Configuration -> Agents -> Agent protocols -> Inbound TCP Agent Protocol/4 (TLS encryption)

enter image description here