How can I get Jenkins to upgrade automatically on Windows64? - jenkins

I am setting up Jenkins on a Windows 64 bit machine. It's configured to run as a windows service.
Jenkins 1.482
I have another issue with using svn with jenkins and in trying to solve that issue i am trying to upgrade jenkins.
The upgrade fails with:
Checking internet connectivity Checking update center connectivity
java.net.SocketException: Permission denied: 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
and
hudson.util.IOException2: Failed to download from
http://updates.jenkins-ci.org/download/war/1.484/jenkins.war at
hudson.model.UpdateCenter$UpdateCenterConfiguration.download(UpdateCenter.java:716)
at hudson.model.UpdateCenter$DownloadJob._run(UpdateCenter.java:1052)
at hudson.model.UpdateCenter$DownloadJob.run(UpdateCenter.java:1031)
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.runWorker(Unknown Source) at
java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
I am not sure what is wrong.
This fails when running as a service and when running as an exe in my user space.
Can anyone explain how to fix this issue so i can upgrade jenkins and then fix the svn plugin?

Related

Installation of "JavaScript GUI Lib" plugin fails in Jenkins

I am trying to install JavaScript GUI Lib plugin on jenkins. I am getting the following errors.
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.HttpURLConnection$10.run(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection$10.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.getInputStream0(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at hudson.model.UpdateCenter$UpdateCenterConfiguration.download(UpdateCenter.java:1243)
Failed to load http://updates.jenkins-ci.org/download/plugins/ace-editor/1.1/ace-editor.hpi to C:\Program Files (x86)\Jenkins\plugins\ace-editor.jpi.tmp
at hudson.model.UpdateCenter$UpdateCenterConfiguration.download(UpdateCenter.java:1250)
Failed to download from http://updates.jenkins-ci.org/download/plugins/ace-editor/1.1/ace-editor.hpi (redirected to: http://mirror.serverion.com/jenkins/plugins/ace-editor/1.1/ace-editor.hpi)
at hudson.model.UpdateCenter$UpdateCenterConfiguration.download(UpdateCenter.java:1284)
at hudson.model.UpdateCenter$DownloadJob._run(UpdateCenter.java:1832)"
I checked if I have access to http://updates.jenkins-ci.org/download/plugins/ace-editor/1.1/ace-editor.hpi""using curl. I was able to reach the URL.
Issue is resolved. Looks like there was a problem with restart. I downloaded the plugin and restarted Jenkins and installed it explicitly. It is working now.

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

Failing Git and Github plugin and its dependency installation in Jenkins

I was trying to install GitHub plugin, but am getting status as failed with error,
java.net.SocketTimeoutException: Read timed out
at java.net.SocketInputStream.socketRead0(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.read1(Unknown Source)
at java.io.BufferedInputStream.read(Unknown Source)
at sun.net.www.MeteredStream.read(Unknown Source)
at java.io.FilterInputStream.read(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection$HttpInputStream.read(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection$HttpInputStream.read(Unknown Source)
at org.apache.commons.io.input.ProxyInputStream.read(ProxyInputStream.java:77)
at hudson.model.UpdateCenter$UpdateCenterConfiguration.download(UpdateCenter.java:1139)
Caused: java.io.IOException: Failed to load http://updates.jenkins-ci.org/download/plugins/git/3.9.1/git.hpi to C:\Program Files (x86)\Jenkins\plugins\git.jpi.tmp
at hudson.model.UpdateCenter$UpdateCenterConfiguration.download(UpdateCenter.java:1144)
Caused: java.io.IOException: Failed to download from http://updates.jenkins-ci.org/download/plugins/git/3.9.1/git.hpi (redirected to: http://ftp-nyc.osuosl.org/pub/jenkins/plugins/git/3.9.1/git.hpi)
at hudson.model.UpdateCenter$UpdateCenterConfiguration.download(UpdateCenter.java:1178)
at hudson.model.UpdateCenter$DownloadJob._run(UpdateCenter.java:1715)
at hudson.model.UpdateCenter$InstallationJob._run(UpdateCenter.java:1978)
at hudson.model.UpdateCenter$DownloadJob.run(UpdateCenter.java:1689)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at hudson.remoting.AtmostOneThreadExecutor$Worker.run(AtmostOneThreadExecutor.java:112)
at java.lang.Thread.run(Unknown Source)
I have a working internet connection, but couldn't able to fix the issue.
The issue looks similar to this bug mentioned under the Jenkins Issue. The status shows that this bug is fixed but unreleased.
Check in the comments at the bottom of the page and you can find that it is caused by firewall.

404 Error - Jenkins not running but Tomcat is

I am new in this area. I see that the Tomcat service is running.
I verified that by entering URL http://localhost:8080.
But when I type http://localhost:8080/jenkins I get a 404 error.
I have verified the availability of <TOMCAT_HOME>/webapps/jenkins.war.
Does this mean I have to re-install both Tomcat and Jenkins? Or is there something more that I need to do?
UPDATED:
I downloaded jenkins.war version 1.658 from here - https://updates.jenkins-ci.org/download/war/ and replaced the old jenkins.war (version 1.568) with the relatively new one (version 1.658). I got the Error message with stacktrace when I tried http://localhost:8080/jenkins -
AWT is not properly configured on this server. Perhaps you need to run your container with "-Djava.awt.headless=true"? See also: https://wiki.jenkins-ci.org/display/JENKINS/Jenkins+got+java.awt.headless+problem
java.lang.UnsatisfiedLinkError: no freetype in java.library.path
at java.lang.ClassLoader.loadLibrary(Unknown Source)
at java.lang.Runtime.loadLibrary0(Unknown Source)
at java.lang.System.loadLibrary(Unknown Source)
at sun.font.FontManagerNativeLibrary$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.font.FontManagerNativeLibrary.<clinit>(Unknown Source)
at sun.font.SunFontManager$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.font.SunFontManager.<clinit>(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at sun.font.FontManagerFactory$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.font.FontManagerFactory.getInstance(Unknown Source)
at java.awt.Font.getFont2D(Unknown Source)
at java.awt.Font.getFamily(Unknown Source)
at java.awt.Font.getFamily_NoClientCode(Unknown Source)
at java.awt.Font.getFamily(Unknown Source)
at java.awt.Font.toString(Unknown Source)
at hudson.util.ChartUtil.<clinit>(ChartUtil.java:255)
at hudson.WebAppMain.contextInitialized(WebAppMain.java:186)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4760)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5184)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:724)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:700)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:714)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:919)
at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1704)
at java.util.concurrent.Executors$RunnableAdapter.call(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)
There was a discrepency in the jdk that was installed.
More information: if you are upgrading jdk version, you would have to wipe clean the older versions of jdk and uninstall Jenkins. If you are running Jenkins through Tomcat, that too will have to be uninstalled and everything will have to be re-installed.

Connecting Jenkins slave agent fails from Windows

I have Jenkins installed on a unix server.
I am trying to install a slave on a windows machine.
I tried first on Windows 2008 server, and failed and then I tried on my machine which is Widows 7 and failed.
The URL of the Jenkins server is http://unixserver:9997
I opened port 9997 on my machine through the firewall with no success.
I go to the server, and under the logs, there is a directory with my slave name; inside there is a log file called slave.log
I tried to launch the slave from the web launcher or from the command line:
java -jar slave.jar -jnlpUrl http://unixserver:9997/computer/slave1/slave-agent.jnlp -secret xxxxxxxxxxxxxxxxxxxxx
The error given there is:
java.io.IOException: Remote call on ghas1 failed
at hudson.remoting.Channel.call(Channel.java:723)
at org.jenkinsci.modules.slave_installer.impl.ComputerListenerImpl.onOnline(ComputerListenerImpl.java:32)
at hudson.slaves.SlaveComputer.setChannel(SlaveComputer.java:505)
at hudson.slaves.SlaveComputer.setChannel(SlaveComputer.java:347)
at jenkins.slaves.JnlpSlaveAgentProtocol$Handler.jnlpConnect(JnlpSlaveAgentProtocol.java:122)
at jenkins.slaves.JnlpSlaveAgentProtocol2$Handler2.run(JnlpSlaveAgentProtocol2.java:100)
at jenkins.slaves.JnlpSlaveAgentProtocol2.handle(JnlpSlaveAgentProtocol2.java:44)
at hudson.TcpSlaveAgentListener$ConnectionHandler.run(TcpSlaveAgentListener.java:154)
Caused by: java.lang.NoClassDefFoundError: org/jvnet/localizer/Localizable
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
at java.lang.Class.getDeclaredMethod(Unknown Source)
at java.io.ObjectStreamClass.getPrivateMethod(Unknown Source)
at java.io.ObjectStreamClass.access$1700(Unknown Source)
at java.io.ObjectStreamClass$2.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.io.ObjectStreamClass.<init>(Unknown Source)
at java.io.ObjectStreamClass.lookup(Unknown Source)
at java.io.ObjectStreamClass.initNonProxy(Unknown Source)
at java.io.ObjectInputStream.readNonProxyDesc(Unknown Source)
at java.io.ObjectInputStream.readClassDesc(Unknown Source)
at java.io.ObjectInputStream.readNonProxyDesc(Unknown Source)
at java.io.ObjectInputStream.readClassDesc(Unknown Source)
at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
at java.io.ObjectInputStream.readObject0(Unknown Source)
at java.io.ObjectInputStream.defaultReadFields(Unknown Source)
at java.io.ObjectInputStream.readSerialData(Unknown Source)
at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
at java.io.ObjectInputStream.readObject0(Unknown Source)
at java.io.ObjectInputStream.readObject(Unknown Source)
at hudson.remoting.UserRequest.deserialize(UserRequest.java:182)
at hudson.remoting.UserRequest.perform(UserRequest.java:98)
at hudson.remoting.UserRequest.perform(UserRequest.java:48)
at hudson.remoting.Request$2.run(Request.java:326)
at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
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 hudson.remoting.Engine$1$1.run(Engine.java:63)
at java.lang.Thread.run(Unknown Source)
I had the same exact problem - the slave would connect but then immediately fail; the error in the server log was the same. The slave was behind a firewall so I was starting the slave manually, but I got the same error when starting the slave on the same machine as the Jenkins master process using either ssh or jnlp.
The problem went away when we restarted the Jenkins process on the server.

Resources