jenkins slave on server with custom port - jenkins

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?

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

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)

IO error during HTTP execution

I used the web-harvest for 5 month and I tried to get the content of webs with this syntax:
<var-def name="raw">
<html-to-xml outputtype="pretty" usecdata="false">
<http url="${URL.toString()}" />
</html-to-xml>
</var-def>
I'd gotten the content, but recently I get this error:
ERROR - IO error during HTTP execution for URL: http://google.com
org.webharvest.exception.HttpException: IO error during HTTP execution for URL: http://google.com
at org.webharvest.runtime.web.HttpClientManager.execute(Unknown Source)
at org.webharvest.runtime.processors.HttpProcessor.execute(Unknown Source)
at org.webharvest.runtime.processors.BaseProcessor.run(Unknown Source)
at org.webharvest.runtime.processors.BodyProcessor.execute(Unknown Source)
at org.webharvest.runtime.processors.BaseProcessor.getBodyTextContent(Unknown Source)
at org.webharvest.runtime.processors.BaseProcessor.getBodyTextContent(Unknown Source)
at org.webharvest.runtime.processors.BaseProcessor.getBodyTextContent(Unknown Source)
at org.webharvest.runtime.processors.HtmlToXmlProcessor.execute(Unknown Source)
at org.webharvest.runtime.processors.BaseProcessor.run(Unknown Source)
at org.webharvest.runtime.processors.BodyProcessor.execute(Unknown Source)
at org.webharvest.runtime.processors.VarDefProcessor.execute(Unknown Source)
at org.webharvest.runtime.processors.BaseProcessor.run(Unknown Source)
at org.webharvest.runtime.Scraper.execute(Unknown Source)
at org.webharvest.runtime.Scraper.execute(Unknown Source)
at org.webharvest.gui.ScraperExecutionThread.run(Unknown Source)
Caused by: java.net.ConnectException: Connection refused: connect
at java.net.DualStackPlainSocketImpl.waitForConnect(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 sun.reflect.GeneratedMethodAccessor18.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.commons.httpclient.protocol.ReflectionSocketFactory.createSocket(ReflectionSocke tFactory.java:140)
at org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(DefaultProtocolSocketFactory.java:125)
at org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:707)
at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:387)
at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:323)
... 15 more
I tied it on another pc and it worked correctly, but on my pc I got this error.
The same happened to me, update your java version to java 8 and it should fix the issue.
http://www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-2133155.html
Might be a firewall, or internet connection issue. Try accessing the site first, or running the application as an administrator.

Jenkins - Can't download upgrades / plugins - Proxy is already set - Able to reach .hpi via http fine in IE

I got the Windows Native .zip from Jenkins site and installed Jenkins on my machine (Win 7) as Windows service.
The nice dashboard is up and now I want to download some plugins / even upgrade the version (First) as I got the .zip few weeks back.
When I tried to upgrade / download the plugins (under Manage Jenkins), I'm getting the following error messages, any idea what I could be missing.
Under Plugin's ADVANCE tab, I have provided the proxy server and port. Another point I noticed that when I'm downloading a plugin (and it fails) showing the link to the plugin .hpi file, if I use that "http ://../../.hpi" in Internet Explorer, it pops up fine (telling me to open/save etc) so in one sense, I'm able to reach the .hpi file directly. I can download the .hpi file manually and put it under the Jenkins installation/..respective/../../folder and restart Jenkins service everytime I install a new/replace an existing .hpi, but that I dont want to do that.
Installing Plugins/Upgrades
Preparation
Checking internet connectivity
Checking update center connectivity
java.net.ConnectException: Connection refused: connect at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(Unknown Source) at java.net.PlainSocketImpl.connectToAddress(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.plainConnect(Unknown Source) at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source) at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source) at hudson.model.UpdateCenter$UpdateCenterConfiguration.testConnection(UpdateCenter.java:860) at hudson.model.UpdateCenter$UpdateCenterConfiguration.checkUpdateCenter(UpdateCenter.java:709) at hudson.model.UpdateCenter$ConnectionCheckJob.run(UpdateCenter.java:1030) at java.util.concurrent.Executors$RunnableAdapter.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$Worker.runTask(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source)
jenkins.war
Failure -
hudson.util.IOException2: Failed to download from http://updates.jenkins-ci.org/download/war/1.508/jenkins.war
at hudson.model.UpdateCenter$UpdateCenterConfiguration.download(UpdateCenter.java:782)
at hudson.model.UpdateCenter$DownloadJob._run(UpdateCenter.java:1123)
at hudson.model.UpdateCenter$DownloadJob.run(UpdateCenter.java:1101)
at java.util.concurrent.Executors$RunnableAdapter.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$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.net.ConnectException: Connection refused: connect
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.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 hudson.model.UpdateCenter$UpdateCenterConfiguration.download(UpdateCenter.java:752)
... 8 more
Caused by: java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(Unknown Source)
at java.net.PlainSocketImpl.connectToAddress(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.<init>(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.plainConnect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getHeaderField(Unknown Source)
at java.net.URLConnection.getHeaderFieldInt(Unknown Source)
at java.net.URLConnection.getContentLength(Unknown Source)
at hudson.model.UpdateCenter$UpdateCenterConfiguration.download(UpdateCenter.java:751)
... 8 more
Preparation
Checking internet connectivity
Checking update center connectivity
java.io.IOException: Server returned HTTP response code: 403 for URL: http://updates.jenkins-ci.org/update-center.json?uctest at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source) at hudson.model.UpdateCenter$UpdateCenterConfiguration.testConnection(UpdateCenter.java:860) at hudson.model.UpdateCenter$UpdateCenterConfiguration.checkUpdateCenter(UpdateCenter.java:709) at hudson.model.UpdateCenter$ConnectionCheckJob.run(UpdateCenter.java:1030) at java.util.concurrent.Executors$RunnableAdapter.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$Worker.runTask(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source)
Timestamper
Failure -
hudson.util.IOException2: Failed to download from http://updates.jenkins-ci.org/download/plugins/timestamper/1.5.3/timestamper.hpi
at hudson.model.UpdateCenter$UpdateCenterConfiguration.download(UpdateCenter.java:782)
at hudson.model.UpdateCenter$DownloadJob._run(UpdateCenter.java:1123)
at hudson.model.UpdateCenter$InstallationJob._run(UpdateCenter.java:1285)
at hudson.model.UpdateCenter$DownloadJob.run(UpdateCenter.java:1101)
at java.util.concurrent.Executors$RunnableAdapter.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$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: Server returned HTTP response code: 403 for URL: http://updates.jenkins-ci.org/download/plugins/timestamper/1.5.3/timestamper.hpi
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.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 hudson.model.UpdateCenter$UpdateCenterConfiguration.download(UpdateCenter.java:752)
... 9 more
Caused by: java.io.IOException: Server returned HTTP response code: 403 for URL: http://updates.jenkins-ci.org/download/plugins/timestamper/1.5.3/timestamper.hpi
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getHeaderField(Unknown Source)
at java.net.URLConnection.getHeaderFieldInt(Unknown Source)
at java.net.URLConnection.getContentLength(Unknown Source)
at hudson.model.UpdateCenter$UpdateCenterConfiguration.download(UpdateCenter.java:751)
... 9 more
Since our update center server does not do any authentication and therefore never returns 403, most likely the 403 error is returned by your HTTP proxy. If I were you, I'd check the proxy user name and the password.
We should probably add a connectivity check button in the configuration page where you enter the proxy details. If you'd be so kind to file this as a ticket in https://issues.jenkins-ci.org/, I'd be happy to get to that.
Thanks Kohsuke. Issue was I was using the proxy hostname with http://proxyservername.com.
When I put "proxyservername.com", it worked. I'll open a ticket to get that "Test" Proxy connection button in. Would have been nice if (?) shows an example, but my bad.

Resources