Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Spring Boot fails to start

I have a Spring Boot app, which ran fine on my Windows machine, but is now failing to start on my xUbuntu VM running on Virtual Box.
I call it using following command:

java -Djava.net.preferIPv4Stack=true -jar -Xmx1500m highlighter-0.0.1.jar

I added -Djava.net.preferIPv4Stack=true after reading these multiple answers, but it did not solve the issue.

I get following error:

2015-01-28 17:20:02.844 DEBUG 18612 --- [           main] o.s.w.s.resource.ResourceUrlProvider     : Looking for resource handler mappings
2015-01-28 17:20:02.845 DEBUG 18612 --- [           main] o.s.b.f.s.DefaultListableBeanFactory     : Returning cached instance of singleton bean 'viewControllerHandlerMapping'
2015-01-28 17:20:02.845 DEBUG 18612 --- [           main] o.s.b.f.s.DefaultListableBeanFactory     : Returning cached instance of singleton bean 'resourceHandlerMapping'
2015-01-28 17:20:02.845 DEBUG 18612 --- [           main] o.s.b.f.s.DefaultListableBeanFactory     : Returning cached instance of singleton bean 'faviconHandlerMapping'
2015-01-28 17:20:02.845 DEBUG 18612 --- [           main] o.s.w.s.resource.ResourceUrlProvider     : Found resource handler mapping: URL pattern="/**/favicon.ico", locations=[class path resource [META-INF/resources/], class path resource [resources/], class path resource [static/], class path resource [public/], class path resource []], resolvers=[org.springframework.web.servlet.resource.PathResourceResolver@2e9e8b52]
2015-01-28 17:20:02.845 DEBUG 18612 --- [           main] o.s.w.s.resource.ResourceUrlProvider     : Found resource handler mapping: URL pattern="/webjars/**", locations=[class path resource [META-INF/resources/webjars/]], resolvers=[org.springframework.web.servlet.resource.PathResourceResolver@6a90f803]
2015-01-28 17:20:02.846 DEBUG 18612 --- [           main] o.s.w.s.resource.ResourceUrlProvider     : Found resource handler mapping: URL pattern="/**", locations=[ServletContext resource [/], class path resource [META-INF/resources/], class path resource [resources/], class path resource [static/], class path resource [public/]], resolvers=[org.springframework.web.servlet.resource.PathResourceResolver@c09fd55]
2015-01-28 17:20:02.847 DEBUG 18612 --- [           main] o.s.c.e.PropertySourcesPropertyResolver  : Searching for key 'spring.liveBeansView.mbeanDomain' in [servletConfigInitParams]
2015-01-28 17:20:02.847 DEBUG 18612 --- [           main] o.s.c.e.PropertySourcesPropertyResolver  : Searching for key 'spring.liveBeansView.mbeanDomain' in [servletContextInitParams]
2015-01-28 17:20:02.847 DEBUG 18612 --- [           main] o.s.c.e.PropertySourcesPropertyResolver  : Searching for key 'spring.liveBeansView.mbeanDomain' in [systemProperties]
2015-01-28 17:20:02.847 DEBUG 18612 --- [           main] o.s.c.e.PropertySourcesPropertyResolver  : Searching for key 'spring.liveBeansView.mbeanDomain' in [systemEnvironment]
2015-01-28 17:20:02.847 DEBUG 18612 --- [           main] o.s.c.e.PropertySourcesPropertyResolver  : Searching for key 'spring.liveBeansView.mbeanDomain' in [random]
2015-01-28 17:20:02.847 DEBUG 18612 --- [           main] o.s.c.e.PropertySourcesPropertyResolver  : Searching for key 'spring.liveBeansView.mbeanDomain' in [applicationConfig: [file:./application.properties]]
2015-01-28 17:20:02.847 DEBUG 18612 --- [           main] o.s.c.e.PropertySourcesPropertyResolver  : Could not find key 'spring.liveBeansView.mbeanDomain' in any property source. Returning [null]
2015-01-28 17:20:02.870 ERROR 18612 --- [           main] o.a.coyote.http11.Http11NioProtocol      : Failed to start end point associated with ProtocolHandler ["http-nio-80"]

java.net.SocketException: Permission denied
   at sun.nio.ch.Net.bind0(Native Method)
   at sun.nio.ch.Net.bind(Net.java:436)
   at sun.nio.ch.Net.bind(Net.java:428)
   at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:214)
   at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
   at org.apache.tomcat.util.net.NioEndpoint.bind(NioEndpoint.java:343)
   at org.apache.tomcat.util.net.AbstractEndpoint.start(AbstractEndpoint.java:737)
   at org.apache.coyote.AbstractProtocol.start(AbstractProtocol.java:471)
   at org.apache.coyote.http11.Http11NioProtocol.start(Http11NioProtocol.java:80)
   at org.apache.catalina.connector.Connector.startInternal(Connector.java:986)
   at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
   at org.apache.catalina.core.StandardService.addConnector(StandardService.java:237)
   at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainer.addPreviouslyRemovedConnectors(TomcatEmbeddedServletContainer.java:186)
   at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainer.start(TomcatEmbeddedServletContainer.java:149)
   at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.startEmbeddedServletContainer(EmbeddedWebApplicationContext.java:287)
   at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.finishRefresh(EmbeddedWebApplicationContext.java:141)
   at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:483)
   at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:118)
   at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:691)
   at org.springframework.boot.SpringApplication.run(SpringApplication.java:321)
   at org.springframework.boot.SpringApplication.run(SpringApplication.java:961)
   at org.springframework.boot.SpringApplication.run(SpringApplication.java:950)
   at com.dash.nlpHighlight.web.App.main(App.java:16)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   at java.lang.reflect.Method.invoke(Method.java:483)
   at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:53)
   at java.lang.Thread.run(Thread.java:745)

2015-01-28 17:20:02.872 ERROR 18612 --- [           main] o.apache.catalina.core.StandardService   : Failed to start connector [Connector[HTTP/1.1-80]]

org.apache.catalina.LifecycleException: Failed to start component [Connector[HTTP/1.1-80]]
   at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
   at org.apache.catalina.core.StandardService.addConnector(StandardService.java:237)
   at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainer.addPreviouslyRemovedConnectors(TomcatEmbeddedServletContainer.java:186)
   at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainer.start(TomcatEmbeddedServletContainer.java:149)
   at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.startEmbeddedServletContainer(EmbeddedWebApplicationContext.java:287)
   at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.finishRefresh(EmbeddedWebApplicationContext.java:141)
   at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:483)
   at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:118)
   at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:691)
   at org.springframework.boot.SpringApplication.run(SpringApplication.java:321)
   at org.springframework.boot.SpringApplication.run(SpringApplication.java:961)
   at org.springframework.boot.SpringApplication.run(SpringApplication.java:950)
   at com.dash.nlpHighlight.web.App.main(App.java:16)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   at java.lang.reflect.Method.invoke(Method.java:483)
   at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:53)
   at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.catalina.LifecycleException: service.getName(): "Tomcat";  Protocol handler start failed
   at org.apache.catalina.connector.Connector.startInternal(Connector.java:993)
   at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
   ... 18 common frames omitted
Caused by: java.net.SocketException: Permission denied
   at sun.nio.ch.Net.bind0(Native Method)
   at sun.nio.ch.Net.bind(Net.java:436)
   at sun.nio.ch.Net.bind(Net.java:428)
   at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:214)
   at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
   at org.apache.tomcat.util.net.NioEndpoint.bind(NioEndpoint.java:343)
   at org.apache.tomcat.util.net.AbstractEndpoint.start(AbstractEndpoint.java:737)
   at org.apache.coyote.AbstractProtocol.start(AbstractProtocol.java:471)
   at org.apache.coyote.http11.Http11NioProtocol.start(Http11NioProtocol.java:80)
   at org.apache.catalina.connector.Connector.startInternal(Connector.java:986)
   ... 19 common frames omitted

2015-01-28 17:20:02.886  INFO 18612 --- [           main] o.apache.catalina.core.StandardService   : Stopping service Tomcat
2015-01-28 17:20:02.911  INFO 18612 --- [           main] .b.l.ClasspathLoggingApplicationListener : Application failed to start with classpath: [jar:file:/home/dash/Dropbox/Projects/NLP/highlighter/build/libs/highlighter-0.0.1.jar!/, jar:file:/home/dash/Dropbox/Projects/NLP/highlighter/build/libs/highlighter-0.0.1.jar!/lib/spring-boot-starter-web-1.2.1.RELEASE.jar!/, jar:file:/home/dash/Dropbox/Projects/NLP/highlighter/build/libs/highlighter-0.0.1.jar!/lib/stanford-corenlp-3.5.0.jar!/, jar:file:/home/dash/Dropbox/Projects/NLP/highlighter/build/libs/highlighter-0.0.1.jar!/lib/stanford-corenlp-3.5.0-models.jar!/, jar:file:/home/dash/Dropbox/Projects/NLP/highlighter/build/libs/highlighter-0.0.1.jar!/lib/junit-4.12.jar!/, jar:file:/home/dash/Dropbox/Projects/NLP/highlighter/build/libs/highlighter-0.0.1.jar!/lib/spring-boot-starter-1.2.1.RELEASE.jar!/, jar:file:/home/dash/Dropbox/Projects/NLP/highlighter/build/libs/highlighter-0.0.1.jar!/lib/spring-boot-starter-tomcat-1.2.1.RELEASE.jar!/, jar:file:/home/dash/Dropbox/Projects/NLP/highlighter/build/libs/highlighter-0.0.1.jar!/lib/jackson-databind-2.4.4.jar!/, jar:file:/home/dash/Dropbox/Projects/NLP/highlighter/build/libs/highlighter-0.0.1.jar!/lib/hibernate-validator-5.1.3.Final.jar!/, jar:file:/home/dash/Dropbox/Projects/NLP/highlighter/build/libs/highlighter-0.0.1.jar!/lib/spring-core-4.1.4.RELEASE.jar!/, jar:file:/home/dash/Dropbox/Projects/NLP/highlighter/build/libs/highlighter-0.0.1.jar!/lib/spring-web-4.1.4.RELEASE.jar!/, jar:file:/home/dash/Dropbox/Projects/NLP/highlighter/build/libs/highlighter-0.0.1.jar!/lib/spring-webmvc-4.1.4.RELEASE.jar!/, jar:file:/home/dash/Dropbox/Projects/NLP/highlighter/build/libs/highlighter-0.0.1.jar!/lib/xom-1.2.10.jar!/, jar:file:/home/dash/Dropbox/Projects/NLP/highlighter/build/libs/highlighter-0.0.1.jar!/lib/joda-time-2.1.jar!/, jar:file:/home/dash/Dropbox/Projects/NLP/highlighter/build/libs/highlighter-0.0.1.jar!/lib/jollyday-0.4.7.jar!/, jar:file:/home/dash/Dropbox/Projects/NLP/highlighter/build/libs/highlighter-0.0.1.jar!/lib/ejml-0.23.jar!/, jar:file:/home/dash/Dropbox/Projects/NLP/highlighter/build/libs/highlighter-0.0.1.jar!/lib/javax.json-api-1.0.jar!/, jar:file:/home/dash/Dropbox/Projects/NLP/highlighter/build/libs/highlighter-0.0.1.jar!/lib/hamcrest-core-1.3.jar!/, jar:file:/home/dash/Dropbox/Projects/NLP/highlighter/build/libs/highlighter-0.0.1.jar!/lib/spring-boot-1.2.1.RELEASE.jar!/, jar:file:/home/dash/Dropbox/Projects/NLP/highlighter/build/libs/highlighter-0.0.1.jar!/lib/spring-boot-autoconfigure-1.2.1.RELEASE.jar!/, jar:file:/home/dash/Dropbox/Projects/NLP/highlighter/build/libs/highlighter-0.0.1.jar!/lib/spring-boot-starter-logging-1.2.1.RELEASE.jar!/, jar:file:/home/dash/Dropbox/Projects/NLP/highlighter/build/libs/highlighter-0.0.1.jar!/lib/snakeyaml-1.14.jar!/, jar:file:/home/dash/Dropbox/Projects/NLP/highlighter/build/libs/highlighter-0.0.1.jar!/lib/tomcat-embed-core-8.0.15.jar!/, jar:file:/home/dash/Dropbox/Projects/NLP/highlighter/build/libs/highlighter-0.0.1.jar!/lib/tomcat-embed-el-8.0.15.jar!/, jar:file:/home/dash/Dropbox/Projects/NLP/highlighter/build/libs/highlighter-0.0.1.jar!/lib/tomcat-embed-logging-juli-8.0.15.jar!/, jar:file:/home/dash/Dropbox/Projects/NLP/highlighter/build/libs/highlighter-0.0.1.jar!/lib/tomcat-embed-websocket-8.0.15.jar!/, jar:file:/home/dash/Dropbox/Projects/NLP/highlighter/build/libs/highlighter-0.0.1.jar!/lib/jackson-annotations-2.4.0.jar!/, jar:file:/home/dash/Dropbox/Projects/NLP/highlighter/build/libs/highlighter-0.0.1.jar!/lib/jackson-core-2.4.4.jar!/, jar:file:/home/dash/Dropbox/Projects/NLP/highlighter/build/libs/highlighter-0.0.1.jar!/lib/validation-api-1.1.0.Final.jar!/, jar:file:/home/dash/Dropbox/Projects/NLP/highlighter/build/libs/highlighter-0.0.1.jar!/lib/jboss-logging-3.1.3.GA.jar!/, jar:file:/home/dash/Dropbox/Projects/NLP/highlighter/build/libs/highlighter-0.0.1.jar!/lib/classmate-1.0.0.jar!/, jar:file:/home/dash/Dropbox/Projects/NLP/highlighter/build/libs/highlighter-0.0.1.jar!/lib/spring-aop-4.1.4.RELEASE.jar!/, jar:file:/home/dash/Dropbox/Projects/NLP/highlighter/build/libs/highlighter-0.0.1.jar!/lib/spring-beans-4.1.4.RELEASE.jar!/, jar:file:/home/dash/Dropbox/Projects/NLP/highlighter/build/libs/highlighter-0.0.1.jar!/lib/spring-context-4.1.4.RELEASE.jar!/, jar:file:/home/dash/Dropbox/Projects/NLP/highlighter/build/libs/highlighter-0.0.1.jar!/lib/spring-expression-4.1.4.RELEASE.jar!/, jar:file:/home/dash/Dropbox/Projects/NLP/highlighter/build/libs/highlighter-0.0.1.jar!/lib/xercesImpl-2.8.0.jar!/, jar:file:/home/dash/Dropbox/Projects/NLP/highlighter/build/libs/highlighter-0.0.1.jar!/lib/xalan-2.7.0.jar!/, jar:file:/home/dash/Dropbox/Projects/NLP/highlighter/build/libs/highlighter-0.0.1.jar!/lib/jaxb-api-2.2.7.jar!/, jar:file:/home/dash/Dropbox/Projects/NLP/highlighter/build/libs/highlighter-0.0.1.jar!/lib/jcl-over-slf4j-1.7.8.jar!/, jar:file:/home/dash/Dropbox/Projects/NLP/highlighter/build/libs/highlighter-0.0.1.jar!/lib/jul-to-slf4j-1.7.8.jar!/, jar:file:/home/dash/Dropbox/Projects/NLP/highlighter/build/libs/highlighter-0.0.1.jar!/lib/log4j-over-slf4j-1.7.8.jar!/, jar:file:/home/dash/Dropbox/Projects/NLP/highlighter/build/libs/highlighter-0.0.1.jar!/lib/logback-classic-1.1.2.jar!/, jar:file:/home/dash/Dropbox/Projects/NLP/highlighter/build/libs/highlighter-0.0.1.jar!/lib/aopalliance-1.0.jar!/, jar:file:/home/dash/Dropbox/Projects/NLP/highlighter/build/libs/highlighter-0.0.1.jar!/lib/slf4j-api-1.7.8.jar!/, jar:file:/home/dash/Dropbox/Projects/NLP/highlighter/build/libs/highlighter-0.0.1.jar!/lib/logback-core-1.1.2.jar!/, jar:file:/home/dash/Dropbox/Projects/NLP/highlighter/build/libs/highlighter-0.0.1.jar!/lib/xml-apis-2.0.2.jar!/]
2015-01-28 17:20:02.913 DEBUG 18612 --- [           main] utoConfigurationReportLoggingInitializer : 


=========================
AUTO-CONFIGURATION REPORT
=========================
...
2015-01-28 17:20:02.918 ERROR 18612 --- [           main] o.s.boot.SpringApplication               : Application startup failed

java.lang.IllegalStateException: Tomcat connector in failed state
   at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainer.start(TomcatEmbeddedServletContainer.java:157)
   at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.startEmbeddedServletContainer(EmbeddedWebApplicationContext.java:287)
   at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.finishRefresh(EmbeddedWebApplicationContext.java:141)
   at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:483)
   at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:118)
   at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:691)
   at org.springframework.boot.SpringApplication.run(SpringApplication.java:321)
   at org.springframework.boot.SpringApplication.run(SpringApplication.java:961)
   at org.springframework.boot.SpringApplication.run(SpringApplication.java:950)
   at com.dash.nlpHighlight.web.App.main(App.java:16)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   at java.lang.reflect.Method.invoke(Method.java:483)
   at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:53)
   at java.lang.Thread.run(Thread.java:745)

2015-01-28 17:20:02.919  INFO 18612 --- [           main] ationConfigEmbeddedWebApplicationContext : Closing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@5b5ba2dc: startup date [Wed Jan 28 17:19:37 EST 2015]; root of context hierarchy
2015-01-28 17:20:02.919 DEBUG 18612 --- [           main] o.s.b.f.s.DefaultListableBeanFactory     : Returning cached instance of singleton bean 'lifecycleProcessor'
2015-01-28 17:20:02.920 DEBUG 18612 --- [           main] o.s.b.f.s.DefaultListableBeanFactory     : Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@3e1057f5: defining beans [org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,sampleController,org.springframework.context.annotation.ConfigurationClassPostProcessor.importAwareProcessor,org.springframework.context.annotation.ConfigurationClassPostProcessor.enhancedConfigurationProcessor,org.springframework.boot.autoconfigure.AutoConfigurationPackages,org.springframework.boot.autoconfigure.PropertyPlaceholderAutoConfiguration,org.springframework.boot.autoconfigure.condition.BeanTypeRegistry,propertySourcesPlaceholderConfigurer,org.springframework.boot.autoconfigure.web.EmbeddedServletContainerAutoConfiguration$EmbeddedTomcat,tomcatEmbeddedServletContainerFactory,org.springframework.boot.autoconfigure.web.EmbeddedServletContainerAutoConfiguration,embeddedServletContainerCustomizerBeanPostProcessor,org.springframework.boot.autoconfigure.web.DispatcherServletAutoConfiguration$DispatcherServletConfiguration,dispatcherServlet,dispatcherServletRegistration,org.springframework.boot.autoconfigure.web.DispatcherServletAutoConfiguration,org.springframework.boot.autoconfigure.web.ErrorMvcAutoConfiguration$WhitelabelErrorViewConfiguration,error,beanNameViewResolver,org.springframework.boot.autoconfigure.web.ErrorMvcAutoConfiguration,errorAttributes,basicErrorController,org.springframework.boot.autoconfigure.web.WebMvcAutoConfiguration$EnableWebMvcConfiguration,requestMappingHandlerAdapter,requestMappingHandlerMapping,mvcContentNegotiationManager,viewControllerHandlerMapping,beanNameHandlerMapping,resourceHandlerMapping,mvcResourceUrlProvider,defaultServletHandlerMapping,mvcConversionService,mvcValidator,mvcPathMatcher,mvcUrlPathHelper,mvcUriComponentsContributor,httpRequestHandlerAdapter,simpleControllerHandlerAdapter,handlerExceptionResolver,mvcViewResolver,org.springframework.boot.autoconfigure.web.WebMvcAutoConfiguration$WebMvcAutoConfigurationAdapter$FaviconConfiguration,faviconHandlerMapping,faviconRequestHandler,org.springframework.boot.autoconfigure.web.WebMvcAutoConfiguration$WebMvcAutoConfigurationAdapter,defaultViewResolver,requestContextListener,viewResolver,spring.mvc.CONFIGURATION_PROPERTIES,spring.resources.CONFIGURATION_PROPERTIES,org.springframework.boot.context.properties.ConfigurationPropertiesBindingPostProcessor,org.springframework.boot.context.properties.ConfigurationPropertiesBindingPostProcessor.store,org.springframework.boot.autoconfigure.web.WebMvcAutoConfiguration,hiddenHttpMethodFilter,org.springframework.boot.autoconfigure.jackson.JacksonAutoConfiguration$JacksonObjectMapperBuilderConfiguration,jacksonObjectMapperBuilder,http.mappers.CONFIGURATION_PROPERTIES,spring.jackson.CONFIGURATION_PROPERTIES,org.springframework.boot.autoconfigure.jackson.JacksonAutoConfiguration$JacksonObjectMapperConfiguration,jacksonObjectMapper,org.springframework.boot.autoconfigure.jackson.JacksonAutoConfiguration,org.springframework.boot.autoconfigure.web.HttpMessageConvertersAutoConfiguration$StringHttpMessageConverterConfiguration,stringHttpMessageConverter,spring.http.encoding.CONFIGURATION_PROPERTIES,org.springframework.boot.autoconfigure.web.HttpMessageConvertersAutoConfiguration$MappingJackson2HttpMessageConverterConfiguration,mappingJackson2HttpMessageConverter,org.springframework.boot.autoconfigure.web.HttpMessageConvertersAutoConfiguration,messageConverters,org.springframework.boot.autoconfigure.jmx.JmxAutoConfiguration,mbeanExporter,objectNamingStrategy,mbeanServer,org.springframework.boot.autoconfigure.web.HttpEncodingAutoConfiguration,characterEncodingFilter,org.springframework.boot.autoconfigure.web.MultipartAutoConfiguration,multipartConfigElement,multipartResolver,multipart.CONFIGURATION_PROPERTIES,org.springframework.boot.autoconfigure.web.ServerPropertiesAutoConfiguration,serverProperties]; root of factory hierarchy
2015-01-28 17:20:02.922 DEBUG 18612 --- [           main] o.s.b.f.support.DisposableBeanAdapter    : Invoking destroy() on bean with name 'mbeanExporter'
2015-01-28 17:20:02.922  INFO 18612 --- [           main] o.s.j.e.a.AnnotationMBeanExporter        : Unregistering JMX-exposed beans on shutdown
2015-01-28 17:20:02.923 DEBUG 18612 --- [           main] o.s.b.f.support.DisposableBeanAdapter    : Invoking destroy() on bean with name 'mvcValidator'
2015-01-28 17:20:02.924 DEBUG 18612 --- [           main] o.s.b.f.support.DisposableBeanAdapter    : Invoking destroy() on bean with name 'characterEncodingFilter'
2015-01-28 17:20:02.924 DEBUG 18612 --- [           main] o.s.b.f.support.DisposableBeanAdapter    : Invoking destroy() on bean with name 'hiddenHttpMethodFilter'
2015-01-28 17:20:02.924 DEBUG 18612 --- [           main] o.s.b.f.support.DisposableBeanAdapter    : Invoking destroy() on bean with name 'org.springframework.boot.context.properties.ConfigurationPropertiesBindingPostProcessor'
java.lang.reflect.InvocationTargetException
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   at java.lang.reflect.Method.invoke(Method.java:483)
   at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:53)
   at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.IllegalStateException: Tomcat connector in failed state
   at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainer.start(TomcatEmbeddedServletContainer.java:157)
   at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.startEmbeddedServletContainer(EmbeddedWebApplicationContext.java:287)
   at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.finishRefresh(EmbeddedWebApplicationContext.java:141)
   at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:483)
   at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:118)
   at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:691)
   at org.springframework.boot.SpringApplication.run(SpringApplication.java:321)
   at org.springframework.boot.SpringApplication.run(SpringApplication.java:961)
   at org.springframework.boot.SpringApplication.run(SpringApplication.java:950)
   at com.dash.nlpHighlight.web.App.main(App.java:16)
   ... 6 more
like image 745
Daniil Shevelev Avatar asked Dec 02 '22 17:12

Daniil Shevelev


1 Answers

I found the answer here:

According to w3.org doc ports below 1024 are priviledged on Linux. Only root can bind to such ports. You should either use ports >1024 or run under root account (not recommended).

The solution is to set different port in "application.properties" file, e.g. server.port=${port:8181} or to run as root using sudo (not recommended).

like image 136
Daniil Shevelev Avatar answered Dec 18 '22 09:12

Daniil Shevelev