Skip to content

Jetty fails to launch with BindException in FreeBSD #968

@ericdahl

Description

@ericdahl

I'm having difficulty running the spring-boot demo with jetty due to BindException: Address already in use errors. Port 8080 is open when I run the command.

I receive this issue 90% of the time when running on FreeBSD 10.0-STABLE with openjdk-7.55.13_4,1. I found that when debugging the problem will sometimes cause it to not occur (race condition?). It seems to work fine when I repeat the steps on a Ubuntu VM.

I've tried using 1.0.2.RELEASE , 1.0.1.RELEASE, 1.0.0.RELEASE as well with no change.

$ sockstat -4 -p 8080 # showing nothing listening on 8080
USER     COMMAND    PID   FD PROTO  LOCAL ADDRESS         FOREIGN ADDRESS
$ git clone git@github.com:spring-projects/spring-boot.git
$ cd spring-boot/spring-boot-samples/spring-boot-sample-jetty
$ git log --pretty=format:'%h' -n 1
d20ed65
$ mvn clean install
...
$ java -jar target/*.jar

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::  (v1.1.0.BUILD-SNAPSHOT)

2014-05-27 20:25:31.884  INFO 6086 --- [           main] sample.jetty.SampleJettyApplication      : Starting SampleJettyApplication on qk.local with PID 6086 (/usr/home/ecd/repos/misc/spring-boot/spring-boot-samples/spring-boot-sample-jetty/target/spring-boot-sample-jetty-1.1.0.BUILD-SNAPSHOT.jar started by ecd in /usr/home/ecd/repos/misc/spring-boot/spring-boot-samples/spring-boot-sample-jetty)
2014-05-27 20:25:31.941  INFO 6086 --- [           main] ationConfigEmbeddedWebApplicationContext : Refreshing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@6596f6ef: startup date [Tue May 27 20:25:31 CDT 2014]; root of context hierarchy
2014-05-27 20:25:32.575  INFO 6086 --- [           main] o.s.b.f.s.DefaultListableBeanFactory     : Overriding bean definition for bean 'beanNameViewResolver': replacing [Root bean: class [null]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=org.springframework.boot.autoconfigure.web.ErrorMvcAutoConfiguration$WhitelabelErrorViewConfiguration; factoryMethodName=beanNameViewResolver; initMethodName=null; destroyMethodName=(inferred); defined in class path resource [org/springframework/boot/autoconfigure/web/ErrorMvcAutoConfiguration$WhitelabelErrorViewConfiguration.class]] with [Root bean: class [null]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=org.springframework.boot.autoconfigure.web.WebMvcAutoConfiguration$WebMvcAutoConfigurationAdapter; factoryMethodName=beanNameViewResolver; initMethodName=null; destroyMethodName=(inferred); defined in class path resource [org/springframework/boot/autoconfigure/web/WebMvcAutoConfiguration$WebMvcAutoConfigurationAdapter.class]]
2014-05-27 20:25:33.172  INFO 6086 --- [           main] e.j.JettyEmbeddedServletContainerFactory : Server initialized with port: 8080
2014-05-27 20:25:33.176  INFO 6086 --- [           main] org.eclipse.jetty.server.Server          : jetty-8.1.14.v20131031
2014-05-27 20:25:33.221  INFO 6086 --- [           main] /                                        : Initializing Spring embedded WebApplicationContext
2014-05-27 20:25:33.221  INFO 6086 --- [           main] o.s.web.context.ContextLoader            : Root WebApplicationContext: initialization completed in 1283 ms
2014-05-27 20:25:33.653  INFO 6086 --- [           main] o.s.b.c.e.ServletRegistrationBean        : Mapping servlet: 'dispatcherServlet' to [/]
2014-05-27 20:25:33.658  INFO 6086 --- [           main] o.s.b.c.embedded.FilterRegistrationBean  : Mapping filter: 'hiddenHttpMethodFilter' to: [/*]
2014-05-27 20:25:33.675  INFO 6086 --- [           main] o.e.jetty.server.AbstractConnector       : Started SelectChannelConnector@0.0.0.0:8080
2014-05-27 20:25:33.904  INFO 6086 --- [           main] o.s.w.s.handler.SimpleUrlHandlerMapping  : Mapped URL path [/**/favicon.ico] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2014-05-27 20:25:34.023  INFO 6086 --- [           main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/],methods=[],params=[],headers=[],consumes=[],produces=[],custom=[]}" onto public java.lang.String sample.jetty.web.SampleController.helloWorld()
2014-05-27 20:25:34.026  INFO 6086 --- [           main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error],methods=[],params=[],headers=[],consumes=[],produces=[],custom=[]}" onto public org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, java.lang.Object>> org.springframework.boot.autoconfigure.web.BasicErrorController.error(javax.servlet.http.HttpServletRequest)
2014-05-27 20:25:34.026  INFO 6086 --- [           main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error],methods=[],params=[],headers=[],consumes=[],produces=[text/html],custom=[]}" onto public org.springframework.web.servlet.ModelAndView org.springframework.boot.autoconfigure.web.BasicErrorController.errorHtml(javax.servlet.http.HttpServletRequest)
2014-05-27 20:25:34.053  INFO 6086 --- [           main] o.s.w.s.handler.SimpleUrlHandlerMapping  : Mapped URL path [/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2014-05-27 20:25:34.054  INFO 6086 --- [           main] o.s.w.s.handler.SimpleUrlHandlerMapping  : Mapped URL path [/webjars/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2014-05-27 20:25:34.297  INFO 6086 --- [           main] o.s.j.e.a.AnnotationMBeanExporter        : Registering beans for JMX exposure on startup
2014-05-27 20:25:34.328  INFO 6086 --- [           main] /                                        : Initializing Spring FrameworkServlet 'dispatcherServlet'
2014-05-27 20:25:34.329  INFO 6086 --- [           main] o.s.web.servlet.DispatcherServlet        : FrameworkServlet 'dispatcherServlet': initialization started
2014-05-27 20:25:34.361  INFO 6086 --- [           main] o.s.web.servlet.DispatcherServlet        : FrameworkServlet 'dispatcherServlet': initialization completed in 32 ms
2014-05-27 20:25:34.391  WARN 6086 --- [           main] o.e.j.util.component.AbstractLifeCycle   : FAILED SelectChannelConnector@0.0.0.0:8080: java.net.BindException: Address already in use

java.net.BindException: Address already in use
    at sun.nio.ch.Net.bind0(Native Method)
    at sun.nio.ch.Net.bind(Net.java:444)
    at sun.nio.ch.Net.bind(Net.java:436)
    at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:214)
    at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
    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.springframework.boot.context.embedded.jetty.JettyEmbeddedServletContainer.start(JettyEmbeddedServletContainer.java:95)
    at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.startEmbeddedServletContainer(EmbeddedWebApplicationContext.java:376)
    at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.finishRefresh(EmbeddedWebApplicationContext.java:143)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:485)
    at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:120)
    at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:683)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:313)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:944)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:933)
    at sample.jetty.SampleJettyApplication.main(SampleJettyApplication.java:30)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:53)
    at java.lang.Thread.run(Thread.java:745)

2014-05-27 20:25:34.392  INFO 6086 --- [           main] /                                        : Destroying Spring FrameworkServlet 'dispatcherServlet'
2014-05-27 20:25:34.395  INFO 6086 --- [           main] o.e.jetty.server.handler.ContextHandler  : stopped o.s.b.c.e.j.JettyEmbeddedWebAppContext{/,null}
2014-05-27 20:25:34.495  WARN 6086 --- [           main] o.e.jetty.util.thread.QueuedThreadPool   : 1 threads could not be stopped
2014-05-27 20:25:34.495  INFO 6086 --- [           main] o.e.jetty.util.thread.QueuedThreadPool   : Couldn't stop Thread[qtp1818419723-20 Acceptor0 SelectChannelConnector@0.0.0.0:8080,5,main]
2014-05-27 20:25:34.495  INFO 6086 --- [           main] o.e.jetty.util.thread.QueuedThreadPool   :  at sun.nio.ch.ServerSocketChannelImpl.accept0(Native Method)
2014-05-27 20:25:34.495  INFO 6086 --- [           main] o.e.jetty.util.thread.QueuedThreadPool   :  at sun.nio.ch.ServerSocketChannelImpl.accept(ServerSocketChannelImpl.java:241)
2014-05-27 20:25:34.495  INFO 6086 --- [           main] o.e.jetty.util.thread.QueuedThreadPool   :  at org.eclipse.jetty.server.nio.SelectChannelConnector.accept(SelectChannelConnector.java:109)
2014-05-27 20:25:34.496  INFO 6086 --- [           main] o.e.jetty.util.thread.QueuedThreadPool   :  at org.eclipse.jetty.server.AbstractConnector$Acceptor.run(AbstractConnector.java:938)
2014-05-27 20:25:34.496  INFO 6086 --- [           main] o.e.jetty.util.thread.QueuedThreadPool   :  at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
2014-05-27 20:25:34.496  INFO 6086 --- [           main] o.e.jetty.util.thread.QueuedThreadPool   :  at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
2014-05-27 20:25:34.496  INFO 6086 --- [           main] o.e.jetty.util.thread.QueuedThreadPool   :  at java.lang.Thread.run(Thread.java:745)
2014-05-27 20:25:34.496  INFO 6086 --- [           main] .b.l.ClasspathLoggingApplicationListener : Application failed to start with classpath: [file:/usr/home/ecd/repos/misc/spring-boot/spring-boot-samples/spring-boot-sample-jetty/target/spring-boot-sample-jetty-1.1.0.BUILD-SNAPSHOT.jar, jar:file:/usr/home/ecd/repos/misc/spring-boot/spring-boot-samples/spring-boot-sample-jetty/target/spring-boot-sample-jetty-1.1.0.BUILD-SNAPSHOT.jar!/, jar:file:/usr/home/ecd/repos/misc/spring-boot/spring-boot-samples/spring-boot-sample-jetty/target/spring-boot-sample-jetty-1.1.0.BUILD-SNAPSHOT.jar!/lib/spring-boot-starter-1.1.0.BUILD-SNAPSHOT.jar!/, jar:file:/usr/home/ecd/repos/misc/spring-boot/spring-boot-samples/spring-boot-sample-jetty/target/spring-boot-sample-jetty-1.1.0.BUILD-SNAPSHOT.jar!/lib/spring-boot-1.1.0.BUILD-SNAPSHOT.jar!/, jar:file:/usr/home/ecd/repos/misc/spring-boot/spring-boot-samples/spring-boot-sample-jetty/target/spring-boot-sample-jetty-1.1.0.BUILD-SNAPSHOT.jar!/lib/spring-boot-autoconfigure-1.1.0.BUILD-SNAPSHOT.jar!/, jar:file:/usr/home/ecd/repos/misc/spring-boot/spring-boot-samples/spring-boot-sample-jetty/target/spring-boot-sample-jetty-1.1.0.BUILD-SNAPSHOT.jar!/lib/spring-boot-starter-logging-1.1.0.BUILD-SNAPSHOT.jar!/, jar:file:/usr/home/ecd/repos/misc/spring-boot/spring-boot-samples/spring-boot-sample-jetty/target/spring-boot-sample-jetty-1.1.0.BUILD-SNAPSHOT.jar!/lib/jcl-over-slf4j-1.7.7.jar!/, jar:file:/usr/home/ecd/repos/misc/spring-boot/spring-boot-samples/spring-boot-sample-jetty/target/spring-boot-sample-jetty-1.1.0.BUILD-SNAPSHOT.jar!/lib/slf4j-api-1.7.7.jar!/, jar:file:/usr/home/ecd/repos/misc/spring-boot/spring-boot-samples/spring-boot-sample-jetty/target/spring-boot-sample-jetty-1.1.0.BUILD-SNAPSHOT.jar!/lib/jul-to-slf4j-1.7.7.jar!/, jar:file:/usr/home/ecd/repos/misc/spring-boot/spring-boot-samples/spring-boot-sample-jetty/target/spring-boot-sample-jetty-1.1.0.BUILD-SNAPSHOT.jar!/lib/log4j-over-slf4j-1.7.7.jar!/, jar:file:/usr/home/ecd/repos/misc/spring-boot/spring-boot-samples/spring-boot-sample-jetty/target/spring-boot-sample-jetty-1.1.0.BUILD-SNAPSHOT.jar!/lib/logback-classic-1.1.2.jar!/, jar:file:/usr/home/ecd/repos/misc/spring-boot/spring-boot-samples/spring-boot-sample-jetty/target/spring-boot-sample-jetty-1.1.0.BUILD-SNAPSHOT.jar!/lib/logback-core-1.1.2.jar!/, jar:file:/usr/home/ecd/repos/misc/spring-boot/spring-boot-samples/spring-boot-sample-jetty/target/spring-boot-sample-jetty-1.1.0.BUILD-SNAPSHOT.jar!/lib/snakeyaml-1.13.jar!/, jar:file:/usr/home/ecd/repos/misc/spring-boot/spring-boot-samples/spring-boot-sample-jetty/target/spring-boot-sample-jetty-1.1.0.BUILD-SNAPSHOT.jar!/lib/spring-boot-starter-jetty-1.1.0.BUILD-SNAPSHOT.jar!/, jar:file:/usr/home/ecd/repos/misc/spring-boot/spring-boot-samples/spring-boot-sample-jetty/target/spring-boot-sample-jetty-1.1.0.BUILD-SNAPSHOT.jar!/lib/jetty-webapp-8.1.14.v20131031.jar!/, jar:file:/usr/home/ecd/repos/misc/spring-boot/spring-boot-samples/spring-boot-sample-jetty/target/spring-boot-sample-jetty-1.1.0.BUILD-SNAPSHOT.jar!/lib/jetty-xml-8.1.14.v20131031.jar!/, jar:file:/usr/home/ecd/repos/misc/spring-boot/spring-boot-samples/spring-boot-sample-jetty/target/spring-boot-sample-jetty-1.1.0.BUILD-SNAPSHOT.jar!/lib/jetty-util-8.1.14.v20131031.jar!/, jar:file:/usr/home/ecd/repos/misc/spring-boot/spring-boot-samples/spring-boot-sample-jetty/target/spring-boot-sample-jetty-1.1.0.BUILD-SNAPSHOT.jar!/lib/jetty-servlet-8.1.14.v20131031.jar!/, jar:file:/usr/home/ecd/repos/misc/spring-boot/spring-boot-samples/spring-boot-sample-jetty/target/spring-boot-sample-jetty-1.1.0.BUILD-SNAPSHOT.jar!/lib/jetty-security-8.1.14.v20131031.jar!/, jar:file:/usr/home/ecd/repos/misc/spring-boot/spring-boot-samples/spring-boot-sample-jetty/target/spring-boot-sample-jetty-1.1.0.BUILD-SNAPSHOT.jar!/lib/jetty-server-8.1.14.v20131031.jar!/, jar:file:/usr/home/ecd/repos/misc/spring-boot/spring-boot-samples/spring-boot-sample-jetty/target/spring-boot-sample-jetty-1.1.0.BUILD-SNAPSHOT.jar!/lib/jetty-continuation-8.1.14.v20131031.jar!/, jar:file:/usr/home/ecd/repos/misc/spring-boot/spring-boot-samples/spring-boot-sample-jetty/target/spring-boot-sample-jetty-1.1.0.BUILD-SNAPSHOT.jar!/lib/jetty-http-8.1.14.v20131031.jar!/, jar:file:/usr/home/ecd/repos/misc/spring-boot/spring-boot-samples/spring-boot-sample-jetty/target/spring-boot-sample-jetty-1.1.0.BUILD-SNAPSHOT.jar!/lib/jetty-io-8.1.14.v20131031.jar!/, jar:file:/usr/home/ecd/repos/misc/spring-boot/spring-boot-samples/spring-boot-sample-jetty/target/spring-boot-sample-jetty-1.1.0.BUILD-SNAPSHOT.jar!/lib/jetty-jsp-8.1.14.v20131031.jar!/, jar:file:/usr/home/ecd/repos/misc/spring-boot/spring-boot-samples/spring-boot-sample-jetty/target/spring-boot-sample-jetty-1.1.0.BUILD-SNAPSHOT.jar!/lib/javax.servlet.jsp-2.2.0.v201112011158.jar!/, jar:file:/usr/home/ecd/repos/misc/spring-boot/spring-boot-samples/spring-boot-sample-jetty/target/spring-boot-sample-jetty-1.1.0.BUILD-SNAPSHOT.jar!/lib/javax.servlet-3.0.0.v201112011016.jar!/, jar:file:/usr/home/ecd/repos/misc/spring-boot/spring-boot-samples/spring-boot-sample-jetty/target/spring-boot-sample-jetty-1.1.0.BUILD-SNAPSHOT.jar!/lib/org.apache.jasper.glassfish-2.2.2.v201112011158.jar!/, jar:file:/usr/home/ecd/repos/misc/spring-boot/spring-boot-samples/spring-boot-sample-jetty/target/spring-boot-sample-jetty-1.1.0.BUILD-SNAPSHOT.jar!/lib/javax.servlet.jsp.jstl-1.2.0.v201105211821.jar!/, jar:file:/usr/home/ecd/repos/misc/spring-boot/spring-boot-samples/spring-boot-sample-jetty/target/spring-boot-sample-jetty-1.1.0.BUILD-SNAPSHOT.jar!/lib/org.apache.taglibs.standard.glassfish-1.2.0.v201112081803.jar!/, jar:file:/usr/home/ecd/repos/misc/spring-boot/spring-boot-samples/spring-boot-sample-jetty/target/spring-boot-sample-jetty-1.1.0.BUILD-SNAPSHOT.jar!/lib/javax.el-2.2.0.v201108011116.jar!/, jar:file:/usr/home/ecd/repos/misc/spring-boot/spring-boot-samples/spring-boot-sample-jetty/target/spring-boot-sample-jetty-1.1.0.BUILD-SNAPSHOT.jar!/lib/com.sun.el-2.2.0.v201108011116.jar!/, jar:file:/usr/home/ecd/repos/misc/spring-boot/spring-boot-samples/spring-boot-sample-jetty/target/spring-boot-sample-jetty-1.1.0.BUILD-SNAPSHOT.jar!/lib/org.eclipse.jdt.core-3.7.1.jar!/, jar:file:/usr/home/ecd/repos/misc/spring-boot/spring-boot-samples/spring-boot-sample-jetty/target/spring-boot-sample-jetty-1.1.0.BUILD-SNAPSHOT.jar!/lib/spring-webmvc-4.0.5.RELEASE.jar!/, jar:file:/usr/home/ecd/repos/misc/spring-boot/spring-boot-samples/spring-boot-sample-jetty/target/spring-boot-sample-jetty-1.1.0.BUILD-SNAPSHOT.jar!/lib/spring-beans-4.0.5.RELEASE.jar!/, jar:file:/usr/home/ecd/repos/misc/spring-boot/spring-boot-samples/spring-boot-sample-jetty/target/spring-boot-sample-jetty-1.1.0.BUILD-SNAPSHOT.jar!/lib/spring-context-4.0.5.RELEASE.jar!/, jar:file:/usr/home/ecd/repos/misc/spring-boot/spring-boot-samples/spring-boot-sample-jetty/target/spring-boot-sample-jetty-1.1.0.BUILD-SNAPSHOT.jar!/lib/spring-aop-4.0.5.RELEASE.jar!/, jar:file:/usr/home/ecd/repos/misc/spring-boot/spring-boot-samples/spring-boot-sample-jetty/target/spring-boot-sample-jetty-1.1.0.BUILD-SNAPSHOT.jar!/lib/aopalliance-1.0.jar!/, jar:file:/usr/home/ecd/repos/misc/spring-boot/spring-boot-samples/spring-boot-sample-jetty/target/spring-boot-sample-jetty-1.1.0.BUILD-SNAPSHOT.jar!/lib/spring-core-4.0.5.RELEASE.jar!/, jar:file:/usr/home/ecd/repos/misc/spring-boot/spring-boot-samples/spring-boot-sample-jetty/target/spring-boot-sample-jetty-1.1.0.BUILD-SNAPSHOT.jar!/lib/spring-expression-4.0.5.RELEASE.jar!/, jar:file:/usr/home/ecd/repos/misc/spring-boot/spring-boot-samples/spring-boot-sample-jetty/target/spring-boot-sample-jetty-1.1.0.BUILD-SNAPSHOT.jar!/lib/spring-web-4.0.5.RELEASE.jar!/]
2014-05-27 20:25:34.497  INFO 6086 --- [           main] utoConfigurationReportLoggingInitializer : 

Error starting ApplicationContext. To display the auto-configuration report enabled debug logging (start with --debug)


2014-05-27 20:25:34.497 ERROR 6086 --- [           main] o.s.boot.SpringApplication               : Application startup failed

org.springframework.boot.context.embedded.EmbeddedServletContainerException: Unable to start embedded Jetty servlet container
    at org.springframework.boot.context.embedded.jetty.JettyEmbeddedServletContainer.start(JettyEmbeddedServletContainer.java:100)
    at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.startEmbeddedServletContainer(EmbeddedWebApplicationContext.java:376)
    at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.finishRefresh(EmbeddedWebApplicationContext.java:143)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:485)
    at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:120)
    at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:683)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:313)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:944)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:933)
    at sample.jetty.SampleJettyApplication.main(SampleJettyApplication.java:30)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:53)
    at java.lang.Thread.run(Thread.java:745)
Caused by: java.net.BindException: Address already in use
    at sun.nio.ch.Net.bind0(Native Method)
    at sun.nio.ch.Net.bind(Net.java:444)
    at sun.nio.ch.Net.bind(Net.java:436)
    at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:214)
    at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
    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.springframework.boot.context.embedded.jetty.JettyEmbeddedServletContainer.start(JettyEmbeddedServletContainer.java:95)
    ... 15 common frames omitted

2014-05-27 20:25:34.497  INFO 6086 --- [           main] ationConfigEmbeddedWebApplicationContext : Closing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@6596f6ef: startup date [Tue May 27 20:25:31 CDT 2014]; root of context hierarchy
2014-05-27 20:25:34.498  INFO 6086 --- [           main] o.s.j.e.a.AnnotationMBeanExporter        : Unregistering JMX-exposed beans on shutdown
java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:53)
    at java.lang.Thread.run(Thread.java:745)
Caused by: org.springframework.boot.context.embedded.EmbeddedServletContainerException: Unable to start embedded Jetty servlet container
    at org.springframework.boot.context.embedded.jetty.JettyEmbeddedServletContainer.start(JettyEmbeddedServletContainer.java:100)
    at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.startEmbeddedServletContainer(EmbeddedWebApplicationContext.java:376)
    at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.finishRefresh(EmbeddedWebApplicationContext.java:143)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:485)
    at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:120)
    at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:683)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:313)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:944)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:933)
    at sample.jetty.SampleJettyApplication.main(SampleJettyApplication.java:30)
    ... 6 more
Caused by: java.net.BindException: Address already in use
    at sun.nio.ch.Net.bind0(Native Method)
    at sun.nio.ch.Net.bind(Net.java:444)
    at sun.nio.ch.Net.bind(Net.java:436)
    at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:214)
    at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
    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.springframework.boot.context.embedded.jetty.JettyEmbeddedServletContainer.start(JettyEmbeddedServletContainer.java:95)
    ... 15 more

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions