Jenkins Slave node failed to connect - jenkins

When launching the node (slave) I get the "Failed to connect error"
The node is configured to run the slave as a windows service.
There are total 3 nodes connected. All of them configured similarly. Just few weeks back the two of the nodes stopped launching. Happened after a windows patching from the IT department.
Is there anyway to figure out if there is any firewall or port issue?
Error Log:
[2017-12-20 04:34:07] [windows-slaves] Connecting to MUNTSTPDSQL1
ERROR: Failed to connect: MUNTSTPDSQL1/172.XX.XX.XXX
jcifs.smb.SmbException: Failed to connect: MUNTSTPDSQL1/172.XX.XX.XXX
jcifs.util.transport.TransportException: Connection in error
jcifs.util.transport.TransportException
java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(Unknown Source)
at java.net.SocketInputStream.read(Unknown Source)
at jcifs.util.transport.Transport.readn(Transport.java:29)
at jcifs.smb.SmbTransport.peekKey(SmbTransport.java:388)
at jcifs.smb.SmbTransport.negotiate(SmbTransport.java:288)
at jcifs.smb.SmbTransport.doConnect(SmbTransport.java:319)
at jcifs.util.transport.Transport.run(Transport.java:241)
at java.lang.Thread.run(Unknown Source)
at jcifs.util.transport.Transport.run(Transport.java:258)
at java.lang.Thread.run(Unknown Source)
at jcifs.util.transport.Transport.connect(Transport.java:154)
at jcifs.smb.SmbTransport.connect(SmbTransport.java:307)
at jcifs.smb.SmbTree.treeConnect(SmbTree.java:156)
at jcifs.smb.SmbFile.doConnect(SmbFile.java:911)
at jcifs.smb.SmbFile.connect(SmbFile.java:954)
at jcifs.smb.SmbFile.connect0(SmbFile.java:880)
at jcifs.smb.SmbFile.queryPath(SmbFile.java:1335)
at jcifs.smb.SmbFile.exists(SmbFile.java:1417)
at hudson.os.windows.ManagedWindowsServiceLauncher.launch(ManagedWindowsServiceLauncher.java:219)
at hudson.slaves.SlaveComputer$1.call(SlaveComputer.java:262)
at jenkins.util.ContextResettingExecutorService$2.call(ContextResettingExecutorService.java:46)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
at jcifs.smb.SmbTransport.connect(SmbTransport.java:309)
at jcifs.smb.SmbTree.treeConnect(SmbTree.java:156)
at jcifs.smb.SmbFile.doConnect(SmbFile.java:911)
at jcifs.smb.SmbFile.connect(SmbFile.java:954)
at jcifs.smb.SmbFile.connect0(SmbFile.java:880)
at jcifs.smb.SmbFile.queryPath(SmbFile.java:1335)
at jcifs.smb.SmbFile.exists(SmbFile.java:1417)
at hudson.os.windows.ManagedWindowsServiceLauncher.launch(ManagedWindowsServiceLauncher.java:219)
at hudson.slaves.SlaveComputer$1.call(SlaveComputer.java:262)
at jenkins.util.ContextResettingExecutorService$2.call(ContextResettingExecutorService.java:46)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

Related

can't launch windows slave agent (Jenkins)

I set my master URL to : http://[master_ip]:8080
I configured the windows slave machine as follows:
slave_config
Now I'm trying to launch the slave using the agent.jar by running the command:
java -jar agent.jar -jnlpUrl http://[master_ip]:8080/computer/slave_node/slave-agent.jnlp -workDir "C:\Jenkins"
and it can't connect for some reason:
Failing to obtain
http://[master_ip]:8080/computer/slave_node/slave-agent.jnlp
java.net.ConnectException: Connection timed out: connect
at java.net.DualStackPlainSocketImpl.connect0(Native Method)
at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source)
at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at sun.net.NetworkClient.doConnect(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown
Source)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(Unknown
Source)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown
Source)
at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
at hudson.remoting.Launcher.parseJnlpArguments(Launcher.java:490)
at hudson.remoting.Launcher.run(Launcher.java:322)
at hudson.remoting.Launcher.main(Launcher.java:283) Waiting 10 seconds before retry
I followed a million tutorials, repeated the same steps over and over...Any ideas?
Are you able to access the Jenkins master form the slave, there could be some connectivity issue, if there is no connectivity issue, try launching the windows slave from the browser

Jenkins slave not stable using jnlp connection

I have small Jenkins Environment of 2 windows servers ( Master and Slave ) .
I want to configure the Slave as a windows service .
while the "java -jar agent.jar -workDir "C:\JENKINS"" command working and getting the Slave running.The Launch agent from browser getting started and looping from connected to Terminated over and over again .
on the jenkins i see the errors :
Ping response time is too long or timed out.
Connection was broken
and :
java.nio.channels.ClosedChannelException at
org.jenkinsci.remoting.protocol.impl.ChannelApplicationLayer.onReadClosed(ChannelApplicationLayer.java:209)
at
org.jenkinsci.remoting.protocol.ApplicationLayer.onRecvClosed(ApplicationLayer.java:222)
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:181)
at
org.jenkinsci.remoting.protocol.impl.SSLEngineFilterLayer.switchToNoSecure(SSLEngineFilterLayer.java:283)
at
org.jenkinsci.remoting.protocol.impl.SSLEngineFilterLayer.processWrite(SSLEngineFilterLayer.java:503)
at
org.jenkinsci.remoting.protocol.impl.SSLEngineFilterLayer.processQueuedWrites(SSLEngineFilterLayer.java:248)
at
org.jenkinsci.remoting.protocol.impl.SSLEngineFilterLayer.doSend(SSLEngineFilterLayer.java:200)
at
org.jenkinsci.remoting.protocol.impl.SSLEngineFilterLayer.doCloseSend(SSLEngineFilterLayer.java:213)
at
org.jenkinsci.remoting.protocol.ProtocolStack$Ptr.doCloseSend(ProtocolStack.java:800)
at
org.jenkinsci.remoting.protocol.ApplicationLayer.doCloseWrite(ApplicationLayer.java:173)
at
org.jenkinsci.remoting.protocol.impl.ChannelApplicationLayer$ByteBufferCommandTransport.closeWrite(ChannelApplicationLayer.java:314)
at hudson.remoting.Channel.close(Channel.java:1450) at
hudson.remoting.Channel.close(Channel.java:1403) at
jenkins.slaves.DefaultJnlpSlaveReceiver.afterChannel(DefaultJnlpSlaveReceiver.java:173)
at
org.jenkinsci.remoting.engine.JnlpConnectionState$4.invoke(JnlpConnectionState.java:421)
at
org.jenkinsci.remoting.engine.JnlpConnectionState.fire(JnlpConnectionState.java:312)
at
org.jenkinsci.remoting.engine.JnlpConnectionState.fireAfterChannel(JnlpConnectionState.java:418)
at
org.jenkinsci.remoting.engine.JnlpProtocol4Handler$Handler$1.run(JnlpProtocol4Handler.java:334)
at
jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
at
jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:59)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source) Connect agent to Jenkins one
of these ways:
in the log file i see :
JNLP agent connected from SERVERMACH/10.10.8.6 Remoting version: 3.20
This is a Windows agent Also:
hudson.remoting.Channel$CallSiteStackTrace: Remote call to
JNLP4-connect connection from SERVERMACH/10.10.8.6:63232 at
hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1741)
at
hudson.remoting.UserRequest$ExceptionResponse.retrieve(UserRequest.java:357)
at hudson.remoting.Channel.call(Channel.java:955) at
hudson.FilePath.act(FilePath.java:1131) at
org.jenkinsci.plugins.envinject.EnvInjectComputerListener.onOnline(EnvInjectComputerListener.java:158)
at hudson.slaves.SlaveComputer.setChannel(SlaveComputer.java:620)
at
jenkins.slaves.DefaultJnlpSlaveReceiver.afterChannel(DefaultJnlpSlaveReceiver.java:168)
at
org.jenkinsci.remoting.engine.JnlpConnectionState$4.invoke(JnlpConnectionState.java:421)
at
org.jenkinsci.remoting.engine.JnlpConnectionState.fire(JnlpConnectionState.java:312)
at
org.jenkinsci.remoting.engine.JnlpConnectionState.fireAfterChannel(JnlpConnectionState.java:418)
at
org.jenkinsci.remoting.engine.JnlpProtocol4Handler$Handler$1.run(JnlpProtocol4Handler.java:334)
at
jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
at
jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:59)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown
Source) hudson.remoting.ProxyException:
java.lang.reflect.InaccessibleObjectException: Unable to make field
private int java.lang.reflect.Field.modifiers accessible: module
java.base does not "opens java.lang.reflect" to unnamed module
#7d9a7b14 at
java.lang.reflect.AccessibleObject.checkCanSetAccessible(Unknown
Source) at
java.lang.reflect.AccessibleObject.checkCanSetAccessible(Unknown
Source) at java.lang.reflect.Field.checkCanSetAccessible(Unknown
Source) at java.lang.reflect.Field.setAccessible(Unknown Source) at
org.jenkinsci.plugins.envinject.service.EnvInjectMasterEnvVarsSetter.call(EnvInjectMasterEnvVarsSetter.java:36)
at
org.jenkinsci.plugins.envinject.service.EnvInjectMasterEnvVarsSetter.call(EnvInjectMasterEnvVarsSetter.java:16)
at hudson.remoting.UserRequest.perform(UserRequest.java:212) at
hudson.remoting.UserRequest.perform(UserRequest.java:54) at
hudson.remoting.Request$2.run(Request.java:369) at
hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
at java.util.concurrent.FutureTask.run(Unknown Source) at
java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at
java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at
hudson.remoting.Engine$1.lambda$newThread$0(Engine.java:93) at
java.lang.Thread.run(Unknown Source) ERROR: Connection terminated
java.nio.channels.ClosedChannelException at
org.jenkinsci.remoting.protocol.impl.ChannelApplicationLayer.onReadClosed(ChannelApplicationLayer.java:209)
at
org.jenkinsci.remoting.protocol.ApplicationLayer.onRecvClosed(ApplicationLayer.java:222)
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:181)
at
org.jenkinsci.remoting.protocol.impl.SSLEngineFilterLayer.switchToNoSecure(SSLEngineFilterLayer.java:283)
at
org.jenkinsci.remoting.protocol.impl.SSLEngineFilterLayer.processWrite(SSLEngineFilterLayer.java:503)
at
org.jenkinsci.remoting.protocol.impl.SSLEngineFilterLayer.processQueuedWrites(SSLEngineFilterLayer.java:248)
at
org.jenkinsci.remoting.protocol.impl.SSLEngineFilterLayer.doSend(SSLEngineFilterLayer.java:200)
at
org.jenkinsci.remoting.protocol.impl.SSLEngineFilterLayer.doCloseSend(SSLEngineFilterLayer.java:213)
at
org.jenkinsci.remoting.protocol.ProtocolStack$Ptr.doCloseSend(ProtocolStack.java:800)
at
org.jenkinsci.remoting.protocol.ApplicationLayer.doCloseWrite(ApplicationLayer.java:173)
at
org.jenkinsci.remoting.protocol.impl.ChannelApplicationLayer$ByteBufferCommandTransport.closeWrite(ChannelApplicationLayer.java:314)
at hudson.remoting.Channel.close(Channel.java:1450) at
hudson.remoting.Channel.close(Channel.java:1403) at
jenkins.slaves.DefaultJnlpSlaveReceiver.afterChannel(DefaultJnlpSlaveReceiver.java:173)
at
org.jenkinsci.remoting.engine.JnlpConnectionState$4.invoke(JnlpConnectionState.java:421)
at
org.jenkinsci.remoting.engine.JnlpConnectionState.fire(JnlpConnectionState.java:312)
at
org.jenkinsci.remoting.engine.JnlpConnectionState.fireAfterChannel(JnlpConnectionState.java:418)
at
org.jenkinsci.remoting.engine.JnlpProtocol4Handler$Handler$1.run(JnlpProtocol4Handler.java:334)
at
jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
at
jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:59)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Tested :Java Versions, added parameters to the JVM configuration , network connectivity and JNLP port .
Any directions will be great !
thanks !

Some builds are failing due to java.net.ConnectException: Connection refused: connect exception in Jenkins

Some times I am getting below exception for Jenkin build. Please help me how to resolve this issue.
java.net.ConnectException: Connection refused: connect at
java.net.DualStackPlainSocketImpl.connect0(Native Method) at
java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source) at
java.net.AbstractPlainSocketImpl.doConnect(Unknown Source) at
java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source) at
java.net.AbstractPlainSocketImpl.connect(Unknown Source) at
java.net.PlainSocketImpl.connect(Unknown Source) at
java.net.SocksSocketImpl.connect(Unknown Source) at
java.net.Socket.connect(Unknown Source) at
java.net.Socket.connect(Unknown Source) at
sun.net.NetworkClient.doConnect(Unknown Source) at
sun.net.www.http.HttpClient.openServer(Unknown Source) at
sun.net.www.http.HttpClient.openServer(Unknown Source) at
sun.net.www.http.HttpClient.(Unknown Source) at
sun.net.www.http.HttpClient.New(Unknown Source) at
sun.net.www.http.HttpClient.New(Unknown Source) at
sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown
Source) at
sun.net.www.protocol.http.HttpURLConnection.plainConnect0(Unknown
Source) at
sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown
Source) at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown
Source) at
sun.net.www.protocol.http.HttpURLConnection.getInputStream0(Unknown
Source) at
sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown
Source) at java.net.HttpURLConnection.getResponseCode(Unknown Source)
at
hudson.plugins.fitnesse.FitnesseExecutor.getHttpBytes(FitnesseExecutor.java:247)
at
hudson.plugins.fitnesse.FitnesseExecutor$1.run(FitnesseExecutor.java:231)
at java.lang.Thread.run(Unknown Source) Xml results saved as
windows-1252 to
D:\Automation\JenkinWorkspace\test-reports\fitnesse-results.xml
See if this is related to issue JENKINS-13696:
If I understand this issue correctly, I am having the same problem.
It appears that the plugin is trying to connect to FitNesse on the master (the FitNesse server is started correctly on the slave).
As a work around, I need to start the FitNesse server manually on the slave machine, and specify the option "Fitnesse instance is already running".
My error is
Connnecting to http://localhost:8085/RiskManagement.SomeSuitePage.AnotherSuitePage?suite&format=xml&includehtml
java.net.ConnectException: Connection refused: connect
The OP ramesh sriram mentions in the comments the cause of the error:
The port is closed/down.

Unable to connect a windows system as slave using JNLP

I have the Jenkins master running on SUSE linux. I want to connect a Windows 8.1 system as a slave using JNLP. I followed the Jenkins CLI Connection mechanism guide and changed the Jenkins global security configuration.
Under TCP-Port for JNLP-Slave, I selected Static and entered the port as 49187. When the launch the JNLP connection on Slave system, after a while I get the "Read Timeout" error.
Could someone suggest what I am doing wrong?
Error
java.net.SocketTimeoutException: Read timed out
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnectionS10.run(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnectionS10.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.net.www.protocol.http.HttpURLConnection.getChainedException(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getInputStreamO(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at java.net.HttpURLConnection.getResponseCode(Unknown Source)
at hudson.remoting.Engine.run(Engine.java:206) Caused by: java.net.SocketTimeoutException: Read timed out at java.net.SocketInputStream.socketReadO(Native Method)
at java.net.SocketInputStream.socketRead(Unknown Source)
at java.net.SocketInputStream.read(Unknown Source)
at java.net.SocketInputStream.read(Unknown Source)
at java.io.BufferedInputStream.fill(Unknown Source)
at java.io.BufferedInputStream.read1(Unknown Source)
at java.io.BufferedInputStream.read(Unknown Source)
at sun.net.www.http.HttpClient.parseHTTPHeader(Unknown Source)
at sun.net.www.http.HttpClient.parseHTTP(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getInputStreamO(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getHeaderField(Unknown Source)
at hudson.remoting.Engine.run(Engine.java:205)

jenkins slave on server with custom port

I've installed jenkins on suse 12.1 and changed the port in the config to 8081
/etc/sysconfig/jenkins
JENKINS_PORT="8081"
The webinterface works without any problem on this port, but when I want to start the client with JNLP he gives me the standardport:
javaws http://192.168.1.137:8080/computer/192.168.1.190/slave-agent.jnlp
Now I tried to run it with the right port:
javaws http://192.168.1.137:8081/computer/192.168.1.190/slave-agent.jnlp
But after a short time I get an error:
java.io.FileNotFoundException: http://192.168.1.137:8080/jnlpJars/remoting.jar
at sun.reflect.GeneratedConstructorAccessor1.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection$6.run(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection$6.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.net.www.protocol.http.HttpURLConnection.getChainedException(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at com.sun.deploy.net.BasicHttpRequest.doRequest(Unknown Source)
at com.sun.deploy.net.BasicHttpRequest.doGetRequestEX(Unknown Source)
at com.sun.deploy.net.DownloadEngine.actionDownload(Unknown Source)
at com.sun.deploy.net.DownloadEngine.getCacheEntry(Unknown Source)
at com.sun.deploy.net.DownloadEngine.getCacheEntry(Unknown Source)
at com.sun.deploy.net.DownloadEngine.getResourceCacheEntry(Unknown Source)
at com.sun.deploy.net.DownloadEngine.getResourceCacheEntry(Unknown Source)
at com.sun.deploy.net.DownloadEngine.getResource(Unknown Source)
at com.sun.javaws.LaunchDownload$DownloadTask.call(Unknown Source)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.io.FileNotFoundException: http://192.168.1.137:8080/jnlpJars/remoting.jar
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at java.net.HttpURLConnection.getResponseCode(Unknown Source)
... 14 more
He tries the wrong port. How can I change the port correctly?
Have you updated the URL via the configuration option under Manage Jenkins → Configure System → Jenkins URL?

Resources