Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UpnpListener encountered an error. Shutting down #110

Open
mcwieger opened this issue Sep 5, 2019 · 3 comments
Open

UpnpListener encountered an error. Shutting down #110

mcwieger opened this issue Sep 5, 2019 · 3 comments

Comments

@mcwieger
Copy link

mcwieger commented Sep 5, 2019

I'm trying to use Amazon Echo HA Bridge as an alternative to the regular HA Bridge, as I only use it for Echo and it recently started to act up.

I'm on a Synology DS414 (no Docker). I'm trying to start it with:

/volume1/@appstore/Java8/j2sdk-image/bin/java -jar /volume1/web/aehab/amazon-echo-bridge-0.4.0.jar --upnp.config.address=192.168.2.201 --server.port=8081

The following log shows, with the first error being 'UpnpListener encountered an error. Shutting down'.

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::        (v1.2.6.RELEASE)

2019-09-05 16:27:57.921  INFO 10915 --- [           main] com.armzilla.ha.SpringbootEntry          : Starting SpringbootEntry v0.4.0 on NAS with PID 10915 (/volume1/web/aehab/amazon-echo-bridge-0.4.0.jar started by root in /volume1/web/aehab)
2019-09-05 16:27:58.255  INFO 10915 --- [           main] ationConfigEmbeddedWebApplicationContext : Refreshing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@7c9ce0: startup date [Thu Sep 05 16:27:58 CEST 2019]; root of context hierarchy
2019-09-05 16:28:07.645  INFO 10915 --- [           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]]
2019-09-05 16:28:11.207  INFO 10915 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.scheduling.annotation.SchedulingConfiguration' of type [class org.springframework.scheduling.annotation.SchedulingConfiguration$$EnhancerBySpringCGLIB$$9cfa9584] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-09-05 16:28:14.326  INFO 10915 --- [           main] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat initialized with port(s): 8081 (http) 8081 (http) 8082 (http)
2019-09-05 16:28:16.218  INFO 10915 --- [           main] o.apache.catalina.core.StandardService   : Starting service Tomcat
2019-09-05 16:28:16.224  INFO 10915 --- [           main] org.apache.catalina.core.StandardEngine  : Starting Servlet Engine: Apache Tomcat/8.0.26
2019-09-05 16:28:16.782  INFO 10915 --- [ost-startStop-1] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
2019-09-05 16:28:16.783  INFO 10915 --- [ost-startStop-1] o.s.web.context.ContextLoader            : Root WebApplicationContext: initialization completed in 18547 ms
2019-09-05 16:28:22.865  INFO 10915 --- [ost-startStop-1] o.s.b.c.e.ServletRegistrationBean        : Mapping servlet: 'dispatcherServlet' to [/]
2019-09-05 16:28:22.908  INFO 10915 --- [ost-startStop-1] o.s.b.c.embedded.FilterRegistrationBean  : Mapping filter: 'metricFilter' to: [/*]
2019-09-05 16:28:22.910  INFO 10915 --- [ost-startStop-1] o.s.b.c.embedded.FilterRegistrationBean  : Mapping filter: 'characterEncodingFilter' to: [/*]
2019-09-05 16:28:22.911  INFO 10915 --- [ost-startStop-1] o.s.b.c.embedded.FilterRegistrationBean  : Mapping filter: 'hiddenHttpMethodFilter' to: [/*]
2019-09-05 16:28:22.911  INFO 10915 --- [ost-startStop-1] o.s.b.c.embedded.FilterRegistrationBean  : Mapping filter: 'webRequestLoggingFilter' to: [/*]
2019-09-05 16:28:22.912  INFO 10915 --- [ost-startStop-1] o.s.b.c.embedded.FilterRegistrationBean  : Mapping filter: 'springBootCorsFilter' to: [/*]
2019-09-05 16:28:22.912  INFO 10915 --- [ost-startStop-1] o.s.b.c.embedded.FilterRegistrationBean  : Mapping filter: 'applicationContextIdFilter' to: [/*]
2019-09-05 16:28:25.092  INFO 10915 --- [           main] org.elasticsearch.node                   : [Optoman] version[1.3.2], pid[10915], build[dee175d/2014-08-13T14:29:30Z]
2019-09-05 16:28:25.092  INFO 10915 --- [           main] org.elasticsearch.node                   : [Optoman] initializing ...
2019-09-05 16:28:25.118  INFO 10915 --- [           main] org.elasticsearch.plugins                : [Optoman] loaded [], sites []
2019-09-05 16:28:37.227  INFO 10915 --- [           main] org.elasticsearch.node                   : [Optoman] initialized
2019-09-05 16:28:37.228  INFO 10915 --- [           main] org.elasticsearch.node                   : [Optoman] starting ...
2019-09-05 16:28:37.288  INFO 10915 --- [           main] org.elasticsearch.transport              : [Optoman] bound_address {local[1]}, publish_address {local[1]}
2019-09-05 16:28:37.367  INFO 10915 --- [           main] org.elasticsearch.discovery              : [Optoman] elasticsearch/XchIRi9rRfefzAmprIFY-g
2019-09-05 16:28:37.379  INFO 10915 --- [pdateTask][T#1]] org.elasticsearch.cluster.service        : [Optoman] new_master [Optoman][XchIRi9rRfefzAmprIFY-g][NAS][local[1]]{local=true}, reason: local-disco-initial_connect(master)
2019-09-05 16:28:37.477  INFO 10915 --- [           main] org.elasticsearch.node                   : [Optoman] started
2019-09-05 16:28:41.228  INFO 10915 --- [pdateTask][T#1]] org.elasticsearch.gateway                : [Optoman] recovered [1] indices into cluster_state
2019-09-05 16:28:45.592  INFO 10915 --- [           main] s.w.s.m.m.a.RequestMappingHandlerAdapter : Looking for @ControllerAdvice: org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@7c9ce0: startup date [Thu Sep 05 16:27:58 CEST 2019]; root of context hierarchy
2019-09-05 16:28:46.163  INFO 10915 --- [           main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/api/devices/{lightId}],methods=[PUT],produces=[application/json]}" onto public org.springframework.http.ResponseEntity<com.armzilla.ha.dao.DeviceDescriptor> com.armzilla.ha.devicemanagmeent.DeviceResource.updateDevice(java.lang.String,com.armzilla.ha.api.Device)
2019-09-05 16:28:46.167  INFO 10915 --- [           main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/api/devices],methods=[GET],produces=[application/json]}" onto public org.springframework.http.ResponseEntity<java.util.List<com.armzilla.ha.dao.DeviceDescriptor>> com.armzilla.ha.devicemanagmeent.DeviceResource.findAllDevices()
2019-09-05 16:28:46.169  INFO 10915 --- [           main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/api/devices/{lightId}],methods=[GET],produces=[application/json]}" onto public org.springframework.http.ResponseEntity<com.armzilla.ha.dao.DeviceDescriptor> com.armzilla.ha.devicemanagmeent.DeviceResource.findByDevicId(java.lang.String)
2019-09-05 16:28:46.170  INFO 10915 --- [           main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/api/devices],methods=[POST],produces=[application/json]}" onto public org.springframework.http.ResponseEntity<com.armzilla.ha.dao.DeviceDescriptor> com.armzilla.ha.devicemanagmeent.DeviceResource.createDevice(com.armzilla.ha.api.Device)
2019-09-05 16:28:46.172  INFO 10915 --- [           main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/api/devices/{lightId}],methods=[DELETE],produces=[application/json]}" onto public org.springframework.http.ResponseEntity<java.lang.String> com.armzilla.ha.devicemanagmeent.DeviceResource.deleteDeviceById(java.lang.String)
2019-09-05 16:28:46.179  INFO 10915 --- [           main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/api/{userId}/lights],methods=[GET],produces=[application/json]}" onto public org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, java.lang.String>> com.armzilla.ha.hue.HueMulator.getUpnpConfiguration(java.lang.String,javax.servlet.http.HttpServletRequest)
2019-09-05 16:28:46.181  INFO 10915 --- [           main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/api/*],methods=[POST],produces=[application/json]}" onto public org.springframework.http.ResponseEntity<java.lang.String> com.armzilla.ha.hue.HueMulator.postAPI(javax.servlet.http.HttpServletRequest)
2019-09-05 16:28:46.182  INFO 10915 --- [           main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/api/{userId}],methods=[GET],produces=[application/json]}" onto public org.springframework.http.ResponseEntity<com.armzilla.ha.api.hue.HueApiResponse> com.armzilla.ha.hue.HueMulator.getApi(java.lang.String,javax.servlet.http.HttpServletRequest)
2019-09-05 16:28:46.183  INFO 10915 --- [           main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/api/{userId}/lights/{lightId}],methods=[GET],produces=[application/json]}" onto public org.springframework.http.ResponseEntity<com.armzilla.ha.api.hue.DeviceResponse> com.armzilla.ha.hue.HueMulator.getLigth(java.lang.String,java.lang.String,javax.servlet.http.HttpServletRequest)
2019-09-05 16:28:46.185  INFO 10915 --- [           main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/api/{userId}/lights/{lightId}/state],methods=[PUT]}" onto public org.springframework.http.ResponseEntity<java.lang.String> com.armzilla.ha.hue.HueMulator.stateChange(java.lang.String,java.lang.String,javax.servlet.http.HttpServletRequest,java.lang.String)
2019-09-05 16:28:46.188  INFO 10915 --- [           main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/upnp/{deviceId}/setup.xml],methods=[GET],produces=[application/xml]}" onto public org.springframework.http.ResponseEntity<java.lang.String> com.armzilla.ha.upnp.UpnpSettingsResource.getUpnpConfiguration(java.lang.String,javax.servlet.http.HttpServletRequest)
2019-09-05 16:28:46.198  INFO 10915 --- [           main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error]}" 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)
2019-09-05 16:28:46.199  INFO 10915 --- [           main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error],produces=[text/html]}" onto public org.springframework.web.servlet.ModelAndView org.springframework.boot.autoconfigure.web.BasicErrorController.errorHtml(javax.servlet.http.HttpServletRequest)
2019-09-05 16:28:46.473  INFO 10915 --- [           main] o.s.w.s.handler.SimpleUrlHandlerMapping  : Mapped URL path [/webjars/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2019-09-05 16:28:46.474  INFO 10915 --- [           main] o.s.w.s.handler.SimpleUrlHandlerMapping  : Mapped URL path [/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2019-09-05 16:28:46.841  INFO 10915 --- [           main] o.s.w.s.handler.SimpleUrlHandlerMapping  : Mapped URL path [/**/favicon.ico] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2019-09-05 16:28:51.467  INFO 10915 --- [           main] o.s.b.a.e.mvc.EndpointHandlerMapping     : Mapped "{[/health]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.HealthMvcEndpoint.invoke(java.security.Principal)
2019-09-05 16:28:51.470  INFO 10915 --- [           main] o.s.b.a.e.mvc.EndpointHandlerMapping     : Mapped "{[/beans],methods=[GET]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
2019-09-05 16:28:51.473  INFO 10915 --- [           main] o.s.b.a.e.mvc.EndpointHandlerMapping     : Mapped "{[/metrics/{name:.*}],methods=[GET]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.MetricsMvcEndpoint.value(java.lang.String)
2019-09-05 16:28:51.474  INFO 10915 --- [           main] o.s.b.a.e.mvc.EndpointHandlerMapping     : Mapped "{[/metrics],methods=[GET]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
2019-09-05 16:28:51.475  INFO 10915 --- [           main] o.s.b.a.e.mvc.EndpointHandlerMapping     : Mapped "{[/mappings],methods=[GET]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
2019-09-05 16:28:51.477  INFO 10915 --- [           main] o.s.b.a.e.mvc.EndpointHandlerMapping     : Mapped "{[/autoconfig],methods=[GET]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
2019-09-05 16:28:51.480  INFO 10915 --- [           main] o.s.b.a.e.mvc.EndpointHandlerMapping     : Mapped "{[/env/{name:.*}],methods=[GET]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EnvironmentMvcEndpoint.value(java.lang.String)
2019-09-05 16:28:51.481  INFO 10915 --- [           main] o.s.b.a.e.mvc.EndpointHandlerMapping     : Mapped "{[/env],methods=[GET]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
2019-09-05 16:28:51.482  INFO 10915 --- [           main] o.s.b.a.e.mvc.EndpointHandlerMapping     : Mapped "{[/configprops],methods=[GET]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
2019-09-05 16:28:51.484  INFO 10915 --- [           main] o.s.b.a.e.mvc.EndpointHandlerMapping     : Mapped "{[/info],methods=[GET]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
2019-09-05 16:28:51.486  INFO 10915 --- [           main] o.s.b.a.e.mvc.EndpointHandlerMapping     : Mapped "{[/trace],methods=[GET]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
2019-09-05 16:28:51.488  INFO 10915 --- [           main] o.s.b.a.e.mvc.EndpointHandlerMapping     : Mapped "{[/dump],methods=[GET]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
2019-09-05 16:28:51.753  INFO 10915 --- [           main] o.s.j.e.a.AnnotationMBeanExporter        : Registering beans for JMX exposure on startup
2019-09-05 16:28:51.794  INFO 10915 --- [           main] o.s.c.support.DefaultLifecycleProcessor  : Starting beans in phase 0
2019-09-05 16:28:52.396  INFO 10915 --- [pool-1-thread-1] com.armzilla.ha.upnp.UpnpListener        : Starting UPNP Discovery Listener
2019-09-05 16:28:52.425 ERROR 10915 --- [pool-1-thread-1] com.armzilla.ha.upnp.UpnpListener        : UpnpListener encountered an error. Shutting down

java.net.BindException: Address already in use (Bind failed)
        at java.net.PlainDatagramSocketImpl.bind0(Native Method)
        at java.net.AbstractPlainDatagramSocketImpl.bind(AbstractPlainDatagramSocketImpl.java:93)
        at java.net.DatagramSocket.bind(DatagramSocket.java:392)
        at java.net.DatagramSocket.<init>(DatagramSocket.java:242)
        at java.net.DatagramSocket.<init>(DatagramSocket.java:299)
        at java.net.DatagramSocket.<init>(DatagramSocket.java:271)
        at com.armzilla.ha.upnp.UpnpListener.startListening(UpnpListener.java:52)
        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:498)
        at org.springframework.scheduling.support.ScheduledMethodRunnable.run(ScheduledMethodRunnable.java:65)
        at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)

2019-09-05 16:28:52.762 ERROR 10915 --- [           main] o.a.coyote.http11.Http11NioProtocol      : Failed to initialize end point associated with ProtocolHandler ["http-nio-8081"]

java.net.BindException: Address already in use
        at sun.nio.ch.Net.bind0(Native Method)
        at sun.nio.ch.Net.bind(Net.java:433)
        at sun.nio.ch.Net.bind(Net.java:425)
        at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223)
        at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
        at org.apache.tomcat.util.net.NioEndpoint.bind(NioEndpoint.java:339)
        at org.apache.tomcat.util.net.AbstractEndpoint.init(AbstractEndpoint.java:737)
        at org.apache.coyote.AbstractProtocol.init(AbstractProtocol.java:457)
        at org.apache.coyote.http11.AbstractHttp11JsseProtocol.init(AbstractHttp11JsseProtocol.java:120)
        at org.apache.catalina.connector.Connector.initInternal(Connector.java:960)
        at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:139)
        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:288)
        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:687)
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:321)
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:967)
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:956)
        at com.armzilla.ha.SpringbootEntry.main(SpringbootEntry.java:22)
        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:498)
        at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:53)
        at java.lang.Thread.run(Thread.java:748)

2019-09-05 16:28:52.769 ERROR 10915 --- [           main] o.apache.catalina.core.StandardService   : Failed to start connector [Connector[HTTP/1.1-8081]]

org.apache.catalina.LifecycleException: Failed to initialize component [Connector[HTTP/1.1-8081]]
        at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:106)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:139)
        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:288)
        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:687)
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:321)
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:967)
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:956)
        at com.armzilla.ha.SpringbootEntry.main(SpringbootEntry.java:22)
        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:498)
        at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:53)
        at java.lang.Thread.run(Thread.java:748)
Caused by: org.apache.catalina.LifecycleException: Protocol handler initialization failed
        at org.apache.catalina.connector.Connector.initInternal(Connector.java:962)
        at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
        ... 19 common frames omitted
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:433)
        at sun.nio.ch.Net.bind(Net.java:425)
        at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223)
        at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
        at org.apache.tomcat.util.net.NioEndpoint.bind(NioEndpoint.java:339)
        at org.apache.tomcat.util.net.AbstractEndpoint.init(AbstractEndpoint.java:737)
        at org.apache.coyote.AbstractProtocol.init(AbstractProtocol.java:457)
        at org.apache.coyote.http11.AbstractHttp11JsseProtocol.init(AbstractHttp11JsseProtocol.java:120)
        at org.apache.catalina.connector.Connector.initInternal(Connector.java:960)
        ... 20 common frames omitted

2019-09-05 16:28:52.967  INFO 10915 --- [           main] o.apache.catalina.core.StandardService   : Stopping service Tomcat
2019-09-05 16:28:53.030  INFO 10915 --- [pool-1-thread-1] ationConfigEmbeddedWebApplicationContext : Closing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@7c9ce0: startup date [Thu Sep 05 16:27:58 CEST 2019]; root of context hierarchy
2019-09-05 16:28:53.036  INFO 10915 --- [pool-1-thread-1] o.s.c.support.DefaultLifecycleProcessor  : Stopping beans in phase 0
2019-09-05 16:28:53.048  INFO 10915 --- [           main] .b.l.ClasspathLoggingApplicationListener : Application failed to start with classpath: [jar:file:/volume1/web/aehab/amazon-echo-bridge-0.4.0.jar!/, jar:file:/volume1/web/aehab/amazon-echo-bridge-0.4.0.jar!/lib/spring-boot-starter-actuator-1.2.6.RELEASE.jar!/, jar:file:/volume1/web/aehab/amazon-echo-bridge-0.4.0.jar!/lib/spring-boot-starter-1.2.6.RELEASE.jar!/, jar:file:/volume1/web/aehab/amazon-echo-bridge-0.4.0.jar!/lib/spring-boot-1.2.6.RELEASE.jar!/, jar:file:/volume1/web/aehab/amazon-echo-bridge-0.4.0.jar!/lib/spring-boot-autoconfigure-1.2.6.RELEASE.jar!/, jar:file:/volume1/web/aehab/amazon-echo-bridge-0.4.0.jar!/lib/spring-boot-starter-logging-1.2.6.RELEASE.jar!/, jar:file:/volume1/web/aehab/amazon-echo-bridge-0.4.0.jar!/lib/jul-to-slf4j-1.7.12.jar!/, jar:file:/volume1/web/aehab/amazon-echo-bridge-0.4.0.jar!/lib/log4j-over-slf4j-1.7.12.jar!/, jar:file:/volume1/web/aehab/amazon-echo-bridge-0.4.0.jar!/lib/logback-classic-1.1.3.jar!/, jar:file:/volume1/web/aehab/amazon-echo-bridge-0.4.0.jar!/lib/logback-core-1.1.3.jar!/, jar:file:/volume1/web/aehab/amazon-echo-bridge-0.4.0.jar!/lib/snakeyaml-1.14.jar!/, jar:file:/volume1/web/aehab/amazon-echo-bridge-0.4.0.jar!/lib/spring-boot-actuator-1.2.6.RELEASE.jar!/, jar:file:/volume1/web/aehab/amazon-echo-bridge-0.4.0.jar!/lib/spring-core-4.1.7.RELEASE.jar!/, jar:file:/volume1/web/aehab/amazon-echo-bridge-0.4.0.jar!/lib/spring-boot-starter-web-1.2.6.RELEASE.jar!/, jar:file:/volume1/web/aehab/amazon-echo-bridge-0.4.0.jar!/lib/spring-boot-starter-tomcat-1.2.6.RELEASE.jar!/, jar:file:/volume1/web/aehab/amazon-echo-bridge-0.4.0.jar!/lib/tomcat-embed-core-8.0.26.jar!/, jar:file:/volume1/web/aehab/amazon-echo-bridge-0.4.0.jar!/lib/tomcat-embed-el-8.0.26.jar!/, jar:file:/volume1/web/aehab/amazon-echo-bridge-0.4.0.jar!/lib/tomcat-embed-logging-juli-8.0.26.jar!/, jar:file:/volume1/web/aehab/amazon-echo-bridge-0.4.0.jar!/lib/tomcat-embed-websocket-8.0.26.jar!/, jar:file:/volume1/web/aehab/amazon-echo-bridge-0.4.0.jar!/lib/jackson-databind-2.4.6.jar!/, jar:file:/volume1/web/aehab/amazon-echo-bridge-0.4.0.jar!/lib/jackson-annotations-2.4.6.jar!/, jar:file:/volume1/web/aehab/amazon-echo-bridge-0.4.0.jar!/lib/hibernate-validator-5.1.3.Final.jar!/, jar:file:/volume1/web/aehab/amazon-echo-bridge-0.4.0.jar!/lib/validation-api-1.1.0.Final.jar!/, jar:file:/volume1/web/aehab/amazon-echo-bridge-0.4.0.jar!/lib/jboss-logging-3.1.3.GA.jar!/, jar:file:/volume1/web/aehab/amazon-echo-bridge-0.4.0.jar!/lib/classmate-1.0.0.jar!/, jar:file:/volume1/web/aehab/amazon-echo-bridge-0.4.0.jar!/lib/spring-web-4.1.7.RELEASE.jar!/, jar:file:/volume1/web/aehab/amazon-echo-bridge-0.4.0.jar!/lib/spring-aop-4.1.7.RELEASE.jar!/, jar:file:/volume1/web/aehab/amazon-echo-bridge-0.4.0.jar!/lib/aopalliance-1.0.jar!/, jar:file:/volume1/web/aehab/amazon-echo-bridge-0.4.0.jar!/lib/spring-beans-4.1.7.RELEASE.jar!/, jar:file:/volume1/web/aehab/amazon-echo-bridge-0.4.0.jar!/lib/spring-webmvc-4.1.7.RELEASE.jar!/, jar:file:/volume1/web/aehab/amazon-echo-bridge-0.4.0.jar!/lib/spring-expression-4.1.7.RELEASE.jar!/, jar:file:/volume1/web/aehab/amazon-echo-bridge-0.4.0.jar!/lib/spring-data-elasticsearch-1.1.3.RELEASE.jar!/, jar:file:/volume1/web/aehab/amazon-echo-bridge-0.4.0.jar!/lib/spring-context-4.1.7.RELEASE.jar!/, jar:file:/volume1/web/aehab/amazon-echo-bridge-0.4.0.jar!/lib/spring-tx-4.1.7.RELEASE.jar!/, jar:file:/volume1/web/aehab/amazon-echo-bridge-0.4.0.jar!/lib/spring-data-commons-1.9.3.RELEASE.jar!/, jar:file:/volume1/web/aehab/amazon-echo-bridge-0.4.0.jar!/lib/commons-lang-2.6.jar!/, jar:file:/volume1/web/aehab/amazon-echo-bridge-0.4.0.jar!/lib/commons-collections-3.2.1.jar!/, jar:file:/volume1/web/aehab/amazon-echo-bridge-0.4.0.jar!/lib/joda-time-2.5.jar!/, jar:file:/volume1/web/aehab/amazon-echo-bridge-0.4.0.jar!/lib/elasticsearch-1.3.2.jar!/, jar:file:/volume1/web/aehab/amazon-echo-bridge-0.4.0.jar!/lib/lucene-core-4.9.0.jar!/, jar:file:/volume1/web/aehab/amazon-echo-bridge-0.4.0.jar!/lib/lucene-analyzers-common-4.9.0.jar!/, jar:file:/volume1/web/aehab/amazon-echo-bridge-0.4.0.jar!/lib/lucene-codecs-4.9.0.jar!/, jar:file:/volume1/web/aehab/amazon-echo-bridge-0.4.0.jar!/lib/lucene-queries-4.9.0.jar!/, jar:file:/volume1/web/aehab/amazon-echo-bridge-0.4.0.jar!/lib/lucene-memory-4.9.0.jar!/, jar:file:/volume1/web/aehab/amazon-echo-bridge-0.4.0.jar!/lib/lucene-highlighter-4.9.0.jar!/, jar:file:/volume1/web/aehab/amazon-echo-bridge-0.4.0.jar!/lib/lucene-queryparser-4.9.0.jar!/, jar:file:/volume1/web/aehab/amazon-echo-bridge-0.4.0.jar!/lib/lucene-sandbox-4.9.0.jar!/, jar:file:/volume1/web/aehab/amazon-echo-bridge-0.4.0.jar!/lib/lucene-suggest-4.9.0.jar!/, jar:file:/volume1/web/aehab/amazon-echo-bridge-0.4.0.jar!/lib/lucene-misc-4.9.0.jar!/, jar:file:/volume1/web/aehab/amazon-echo-bridge-0.4.0.jar!/lib/lucene-join-4.9.0.jar!/, jar:file:/volume1/web/aehab/amazon-echo-bridge-0.4.0.jar!/lib/lucene-grouping-4.9.0.jar!/, jar:file:/volume1/web/aehab/amazon-echo-bridge-0.4.0.jar!/lib/lucene-spatial-4.9.0.jar!/, jar:file:/volume1/web/aehab/amazon-echo-bridge-0.4.0.jar!/lib/spatial4j-0.4.1.jar!/, jar:file:/volume1/web/aehab/amazon-echo-bridge-0.4.0.jar!/lib/antlr-runtime-3.5.jar!/, jar:file:/volume1/web/aehab/amazon-echo-bridge-0.4.0.jar!/lib/asm-4.1.jar!/, jar:file:/volume1/web/aehab/amazon-echo-bridge-0.4.0.jar!/lib/asm-commons-4.1.jar!/, jar:file:/volume1/web/aehab/amazon-echo-bridge-0.4.0.jar!/lib/jackson-core-2.4.6.jar!/, jar:file:/volume1/web/aehab/amazon-echo-bridge-0.4.0.jar!/lib/slf4j-api-1.7.12.jar!/, jar:file:/volume1/web/aehab/amazon-echo-bridge-0.4.0.jar!/lib/jcl-over-slf4j-1.7.12.jar!/, jar:file:/volume1/web/aehab/amazon-echo-bridge-0.4.0.jar!/lib/httpclient-4.5.1.jar!/, jar:file:/volume1/web/aehab/amazon-echo-bridge-0.4.0.jar!/lib/httpcore-4.4.3.jar!/, jar:file:/volume1/web/aehab/amazon-echo-bridge-0.4.0.jar!/lib/commons-codec-1.9.jar!/]
2019-09-05 16:28:53.049  INFO 10915 --- [           main] utoConfigurationReportLoggingInitializer :

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


2019-09-05 16:28:53.051 ERROR 10915 --- [           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:288)
        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:687)
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:321)
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:967)
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:956)
        at com.armzilla.ha.SpringbootEntry.main(SpringbootEntry.java:22)
        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:498)
        at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:53)
        at java.lang.Thread.run(Thread.java:748)

2019-09-05 16:28:53.059  INFO 10915 --- [pool-1-thread-1] o.s.j.e.a.AnnotationMBeanExporter        : Unregistering JMX-exposed beans on shutdown
2019-09-05 16:28:53.079  INFO 10915 --- [pool-1-thread-1] o.s.b.a.e.ElasticsearchAutoConfiguration : Closing Elasticsearch client
2019-09-05 16:28:53.080  INFO 10915 --- [pool-1-thread-1] org.elasticsearch.node                   : [Optoman] stopping ...
2019-09-05 16:28:53.105  INFO 10915 --- [pool-1-thread-1] org.elasticsearch.node                   : [Optoman] stopped
2019-09-05 16:28:53.106  INFO 10915 --- [pool-1-thread-1] org.elasticsearch.node                   : [Optoman] closing ...
2019-09-05 16:28:53.127  INFO 10915 --- [pool-1-thread-1] org.elasticsearch.node                   : [Optoman] closed
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:498)
        at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:53)
        at java.lang.Thread.run(Thread.java:748)
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:288)
        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:687)
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:321)
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:967)
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:956)
        at com.armzilla.ha.SpringbootEntry.main(SpringbootEntry.java:22)
        ... 6 more
2019-09-05 16:28:53.139  INFO 10915 --- [pool-1-thread-1] com.armzilla.ha.upnp.UpnpListener        : UPNP Discovery Listener Stopped
@jaroslawhartman
Copy link

As you can see

java.net.BindException: Address already in use (Bind failed)

My startup line:

java -Xms1024m -Xmx8024m -jar ~/amazon-echo-ha-bridge/target/amazon-echo-bridge-0.4.0.jar --server.port=8080 --upnp.config.address=192.168.1.210 --debug

If you really need to change the port, consider changes in application.properties:

upnp.response.port=50000
upnp.config.address=
emulator.portbase=8080
emulator.portcount=3
upnp.disable=false

Best regards,
Jarek

@mcwieger
Copy link
Author

I tried again and made sure I used a port that's not in use (as earlier btw). Response was:

Tomcat initialized with port(s): 8086 (http) 8081 (http) 8082 (http)

Same bind error, but all these ports are free...

@ifuchs
Copy link

ifuchs commented Sep 23, 2019 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants