404 Error - Jenkins not running but Tomcat is - jenkins

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.

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.

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)

Deploying web application in tomcat on Jenkins

I am using Jenkins to deploy web application on Tomcat7.
Tomcat installed as windows service and it has SWebServer name(installation path: C:\Program Files (x86)\SWebServer).
Jenkins also installed as windows service. Application war file location is:C:\Program Files (x86)\Jenkins\jobs\test4\workspace\target\prj.war
This is my configuration:
But I am getting the following exception
Deploying C:\Program Files (x86)\Jenkins\jobs\test4\workspace\target\prj.war to container Tomcat 7.x Remote
ERROR: Build step failed with exception
org.codehaus.cargo.container.ContainerException: Failed to redeploy [C:\Program Files (x86)\Jenkins\jobs\test4\workspace\target\prj.war]
at org.codehaus.cargo.container.tomcat.internal.AbstractTomcatManagerDeployer.redeploy(AbstractTomcatManagerDeployer.java:193)
at hudson.plugins.deploy.CargoContainerAdapter.deploy(CargoContainerAdapter.java:73)
at hudson.plugins.deploy.CargoContainerAdapter$1.invoke(CargoContainerAdapter.java:116)
at hudson.plugins.deploy.CargoContainerAdapter$1.invoke(CargoContainerAdapter.java:103)
at hudson.FilePath.act(FilePath.java:989)
at hudson.FilePath.act(FilePath.java:967)
at hudson.plugins.deploy.CargoContainerAdapter.redeploy(CargoContainerAdapter.java:103)
at hudson.plugins.deploy.DeployPublisher.perform(DeployPublisher.java:61)
at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:45)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:761)
at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:721)
at hudson.model.Build$BuildExecution.post2(Build.java:183)
at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:670)
at hudson.model.Run.execute(Run.java:1743)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:89)
at hudson.model.Executor.run(Executor.java:240)
Caused by: 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.<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 org.codehaus.cargo.container.tomcat.internal.TomcatManager.invoke(TomcatManager.java:534)
at org.codehaus.cargo.container.tomcat.internal.TomcatManager.list(TomcatManager.java:686)
at org.codehaus.cargo.container.tomcat.internal.TomcatManager.getStatus(TomcatManager.java:699)
at org.codehaus.cargo.container.tomcat.internal.AbstractTomcatManagerDeployer.redeploy(AbstractTomcatManagerDeployer.java:174)
... 16 more
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.<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 org.codehaus.cargo.container.tomcat.internal.TomcatManager.invoke(TomcatManager.java:534)
at org.codehaus.cargo.container.tomcat.internal.TomcatManager.list(TomcatManager.java:686)
at org.codehaus.cargo.container.tomcat.internal.TomcatManager.getStatus(TomcatManager.java:699)
at org.codehaus.cargo.container.tomcat.internal.AbstractTomcatManagerDeployer.redeploy(AbstractTomcatManagerDeployer.java:174)
at hudson.plugins.deploy.CargoContainerAdapter.deploy(CargoContainerAdapter.java:73)
at hudson.plugins.deploy.CargoContainerAdapter$1.invoke(CargoContainerAdapter.java:116)
at hudson.plugins.deploy.CargoContainerAdapter$1.invoke(CargoContainerAdapter.java:103)
at hudson.FilePath.act(FilePath.java:989)
at hudson.FilePath.act(FilePath.java:967)
at hudson.plugins.deploy.CargoContainerAdapter.redeploy(CargoContainerAdapter.java:103)
at hudson.plugins.deploy.DeployPublisher.perform(DeployPublisher.java:61)
at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:45)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:761)
at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:721)
at hudson.model.Build$BuildExecution.post2(Build.java:183)
at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:670)
at hudson.model.Run.execute(Run.java:1743)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:89)
at hudson.model.Executor.run(Executor.java:240)
What is the problem ?
change the follow;
In the conf/tomcat-user add :
<user username="test" password="passTest" roles="manager-script"/>
In Jenkins,
EAR/WAR file: **/*.war
context path: prj
Tomcat URL : http://localhost:8080
So couple of things that you need to understand.
EAR/WAR: Mention the location of the file --> you can use *.war if the WAR is in the parent folder or use **/*.war if its in a sub folder
ContextPath: Where you want the war to be deployed in tomcat --> / will work
prefectly fine
Tomcat URL : port of deploying tomcat, couple of issues you might get like port already in use, change the port in server.xml to the one you like :)
<user username="uname" password="pwd" roles="manager-script,manager-gui"/>
Then above line can be specified in tomcat-users.xml --> your just giving access permission to jenkins with the user who has the following privileges
manager-gui — Access to the HTML interface
manager-script — Access to the tools-friendly plain text interface that is described in this document, and to the "Server Status" page.
P.S. Start tomcat before deploying that's one of the reasons you get connections refused :P

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.

How can I get Jenkins to upgrade automatically on Windows64?

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?

Resources