Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to start Jenkins [duplicate]

Tags:

jenkins

Can’t start Jenkins using [java -jar jenkins.war]

Thrown with below exception:

C:\Praveen Kumar Subramaniyan\07. Automation\99. Others>java -jar jenkins.war
Running from: C:\Praveen Kumar Subramaniyan\07. Automation\99. Others\jenkins.war
webroot: $user.home/.jenkins
Jun 15, 2015 6:16:52 PM winstone.Logger logInternal
INFO: Beginning extraction from war file
Jun 15, 2015 6:16:52 PM org.eclipse.jetty.util.log.JavaUtilLog info
INFO: jetty-winstone-2.8
Jun 15, 2015 6:17:01 PM org.eclipse.jetty.util.log.JavaUtilLog info
INFO: NO JSP Support for , did not find org.apache.jasper.servlet.JspServlet
Jenkins home directory: C:\Users\subramaniyanpk\.jenkins found at: $user.home/.jenkins
?[33mJun 15, 2015 6:17:02 PM org.eclipse.jetty.util.log.JavaUtilLog warn
WARNING: FAILED [email protected]:8080: java.net.BindException: Address already in use: bind
java.net.BindException: Address already in use: bind
        at sun.nio.ch.Net.bind0(Native Method)
        at sun.nio.ch.Net.bind(Unknown Source)
        at sun.nio.ch.Net.bind(Unknown Source)
        at sun.nio.ch.ServerSocketChannelImpl.bind(Unknown Source)
        at sun.nio.ch.ServerSocketAdaptor.bind(Unknown Source)
        at org.eclipse.jetty.server.nio.SelectChannelConnector.open(SelectChannelConnector.java:187)
        at org.eclipse.jetty.server.AbstractConnector.doStart(AbstractConnector.java:316)
        at org.eclipse.jetty.server.nio.SelectChannelConnector.doStart(SelectChannelConnector.java:265)
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
        at org.eclipse.jetty.server.Server.doStart(Server.java:293)
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
        at winstone.Launcher.<init>(Launcher.java:154)
        at winstone.Launcher.main(Launcher.java:354)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at Main._main(Main.java:293)
        at Main.main(Main.java:98)

?[0m?[33mJun 15, 2015 6:17:02 PM org.eclipse.jetty.util.log.JavaUtilLog warn
WARNING: FAILED org.eclipse.jetty.server.Server@1b0fd6f: java.net.BindException:
 Address already in use: bind
java.net.BindException: Address already in use: bind
        at sun.nio.ch.Net.bind0(Native Method)
        at sun.nio.ch.Net.bind(Unknown Source)
        at sun.nio.ch.Net.bind(Unknown Source)
        at sun.nio.ch.ServerSocketChannelImpl.bind(Unknown Source)
        at sun.nio.ch.ServerSocketAdaptor.bind(Unknown Source)
        at org.eclipse.jetty.server.nio.SelectChannelConnector.open(SelectChannelConnector.java:187)
        at org.eclipse.jetty.server.AbstractConnector.doStart(AbstractConnector.java:316)
        at org.eclipse.jetty.server.nio.SelectChannelConnector.doStart(SelectChannelConnector.java:265)
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
        at org.eclipse.jetty.server.Server.doStart(Server.java:293)
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
        at winstone.Launcher.<init>(Launcher.java:154)
        at winstone.Launcher.main(Launcher.java:354)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at Main._main(Main.java:293)
        at Main.main(Main.java:98)

?[0mJun 15, 2015 6:17:02 PM org.eclipse.jetty.util.log.JavaUtilLog info
INFO: stopped w.{,file:/C:/Users/subramaniyanpk/.jenkins/war/},C:\Users\subramaniyanpk\.jenkins\war
Jun 15, 2015 6:17:02 PM winstone.Logger logInternal
INFO: Winstone shutdown successfully
?[31mJun 15, 2015 6:17:02 PM winstone.Logger logInternal
SEVERE: Container startup failed
java.io.IOException: Failed to start Jetty
        at winstone.Launcher.<init>(Launcher.java:156)
        at winstone.Launcher.main(Launcher.java:354)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at Main._main(Main.java:293)
        at Main.main(Main.java:98)
Caused by: java.net.BindException: Address already in use: bind
        at sun.nio.ch.Net.bind0(Native Method)
        at sun.nio.ch.Net.bind(Unknown Source)
        at sun.nio.ch.Net.bind(Unknown Source)
        at sun.nio.ch.ServerSocketChannelImpl.bind(Unknown Source)
        at sun.nio.ch.ServerSocketAdaptor.bind(Unknown Source)
        at org.eclipse.jetty.server.nio.SelectChannelConnector.open(SelectChannelConnector.java:187)
        at org.eclipse.jetty.server.AbstractConnector.doStart(AbstractConnector.java:316)
        at org.eclipse.jetty.server.nio.SelectChannelConnector.doStart(SelectChannelConnector.java:265)
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
        at org.eclipse.jetty.server.Server.doStart(Server.java:293)
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
        at winstone.Launcher.<init>(Launcher.java:154)
        ... 7 more

?[0mJun 15, 2015 6:17:02 PM jenkins.InitReactorRunner$1 onAttained
INFO: Started initialization
?[31mJun 15, 2015 6:17:02 PM hudson.util.BootFailure publish
SEVERE: Failed to initialize Jenkins
hudson.util.HudsonFailedToLoad: java.lang.InterruptedException
        at hudson.WebAppMain$3.run(WebAppMain.java:237)
Caused by: java.lang.InterruptedException
        at java.lang.Object.wait(Native Method)
        at java.lang.Object.wait(Unknown Source)
        at org.jvnet.hudson.reactor.Reactor.execute(Reactor.java:267)
        at jenkins.InitReactorRunner.run(InitReactorRunner.java:44)
        at jenkins.model.Jenkins.executeReactor(Jenkins.java:916)
        at jenkins.model.Jenkins.<init>(Jenkins.java:815)
        at hudson.model.Hudson.<init>(Hudson.java:85)
        at hudson.model.Hudson.<init>(Hudson.java:81)
        at hudson.WebAppMain$3.run(WebAppMain.java:225)

Understand that the port 8080 is used by some other service as below; however, not sure how to kill this and start Jenkins.

Can someone kindly help me on this, please.

C:\Praveen Kumar Subramaniyan\07. Automation\99. Others>netstat -ano | find "8080"
  TCP    0.0.0.0:8080           0.0.0.0:0              LISTENING       3532
  TCP    [::]:8080              [::]:0                 LISTENING       3532
like image 203
PraveenKS Avatar asked Jun 15 '15 13:06

PraveenKS


People also ask

Why is Jenkins not starting?

One of the most common reasons why Jenkins server can't start in Windows computers is because the version of the Java language was updated after the last shutdown of Jenkins server.

Why my Jenkins is not starting in Linux?

If the tomcat was running on port 8080, then Jenkins would not be able to start because it defaults to port 8080. There is a configuration setting in the /etc/default/jenkins file that will change the port number.

How do I fix failed to start Jenkins continuous integration server?

Run the apt-get update command in the LTS install instructions. Install Java 11 with apt install openjdk-11-jre as described in the install instructions. Run the apt-get install jenkins command in the LTS install instructions. Confirm that Jenkins is running with the command systemctl status jenkins.


1 Answers

  1. Use the --httpPort command-line parameter to start Jenkins on a different port.
  2. Add the -p switch to netstat to see IDs of the processes that the connections belong to. You may need to use sudo to see all processes.
like image 98
Vadim Landa Avatar answered Sep 27 '22 16:09

Vadim Landa