eureka client 启动失败

今天在学习eureka时,启动eureka client一直失败,多次百度也没有找到正确的解决方发,最后发现日志中的报错清楚地说明了问题。。。

日志 :

2018-09-07 15:13:38.522 ERROR 17896 — [ main]
o.apache.catalina.core.StandardService : Failed to start connector
[Connector[HTTP/1.1-8081]]

org.apache.catalina.LifecycleException: Failed to start component
[Connector[HTTP/1.1-8081]] at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167)
~[tomcat-embed-core-8.5.32.jar:8.5.32] at
org.apache.catalina.core.StandardService.addConnector(StandardService.java:225)
~[tomcat-embed-core-8.5.32.jar:8.5.32] at
org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainer.addPreviouslyRemovedConnectors(TomcatEmbeddedServletContainer.java:265)
[spring-boot-1.5.15.RELEASE.jar:1.5.15.RELEASE] at
org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainer.start(TomcatEmbeddedServletContainer.java:208)
[spring-boot-1.5.15.RELEASE.jar:1.5.15.RELEASE] at
org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.startEmbeddedServletContainer(EmbeddedWebApplicationContext.java:297)
[spring-boot-1.5.15.RELEA

SE.jar:1.5.15.RELEASE] at
org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.finishRefresh(EmbeddedWebApplicationContext.java:145)
[spring-boot-1.5.15.RELEASE.jar:1.5.15.RELEASE] at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:546)
[spring-context-4.3.18.RELEASE.jar:4.3.18.RELEASE] at
org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122)
[spring-boot-1.5.15.RELEASE.jar:1.5.15.RELEASE] at
org.springframework.boot.SpringApplication.refresh(SpringApplication.java:693)
[spring-boot-1.5.15.RELEASE.jar:1.5.15.RELEASE] at
org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:360)
[spring-boot-1.5.15.RELEASE.jar:1.5.15.RELEASE] at
org.springframework.boot.SpringApplication.run(SpringApplication.java:303)
[spring-boot-1.5.15.RELEASE.jar:1.5.15.RELEASE] at
org.springframework.boot.SpringApplication.run(SpringApplication.java:1118)
[spring-boot-1.5.15.RELEASE.jar:1.5.15.RELEASE] at
org.springframework.boot.SpringApplication.run(SpringApplication.java:1107)
[spring-boot-1.5.15.RELEASE.jar:1.5.15.RELEASE] at
com.itheima.micro.eureka.EurekaClientApplication.main(EurekaClientApplication.java:12)
[main/:na] Caused by: org.apache.catalina.LifecycleException: Protocol
handler start failed at
org.apache.catalina.connector.Connector.startInternal(Connector.java:1020)
~[tomcat-embed-core-8.5.32.jar:8.5.32] at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
~[tomcat-embed-core-8.5.32.jar:8.5.32] … 13 common frames omitted
Caused by: java.net.BindException: Address already in use: bind at
sun.nio.ch.Net.bind0(Native Method) ~[na:1.8.0_131] at
sun.nio.ch.Net.bind(Net.java:433) ~[na:1.8.0_131] at
sun.nio.ch.Net.bind(Net.java:425) ~[na:1.8.0_131] at
sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223)
~[na:1.8.0_131] at
sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
~[na:1.8.0_131] at
org.apache.tomcat.util.net.NioEndpoint.bind(NioEndpoint.java:210)
~[tomcat-embed-core-8.5.32.jar:8.5.32] at
org.apache.tomcat.util.net.AbstractEndpoint.start(AbstractEndpoint.java:1150)
~[tomcat-embed-core-8.5.32.jar:8.5.32] at
org.apache.coyote.AbstractProtocol.start(AbstractProtocol.java:591)
~[tomcat-embed-core-8.5.32.jar:8.5.32] at
org.apache.catalina.connector.Connector.startInternal(Connector.java:1018)
~[tomcat-embed-core-8.5.32.jar:8.5.32] … 14 common frames omitted

2018-09-07 15:13:38.528 INFO 17896 — [ main]
o.apache.catalina.core.StandardService : Stopping service [Tomcat]
2018-09-07 15:13:38.532 INFO 17896 — [nfoReplicator-0]
com.netflix.discovery.DiscoveryClient :
DiscoveryClient_EUREKA-CLIENT/DESKTOP-T28A7MS:eureka-client:8081 -
registration status: 204 2018-09-07 15:13:38.542 INFO 17896 — [
main] utoConfigurationReportLoggingInitializer :

Error starting ApplicationContext. To display the auto-configuration
report re-run your application with ‘debug’ enabled. 2018-09-07
15:13:38.549 ERROR 17896 — [ main]
o.s.b.d.LoggingFailureAnalysisReporter :

***************** APPLICATION FAILED TO START


Description:

The Tomcat connector configured to listen on port 8081 failed to
start. The port may already be in use or the connector may be
misconfigured.

Action:

Verify the connector’s configuration, identify and stop any process
that’s listening on port 8081, or configure this application to listen
on another port.

2018-09-07 15:13:38.550 INFO 17896 — [ main] ationConfigEmbeddedWebApplicationContext : Closing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@38aa816f: startup date [Fri Sep 07 15:13:28 CST 2018]; parent: org.springframework.context.annotation.AnnotationConfigApplicationContext@42e99e4a 2018-09-07 15:13:38.551 INFO 17896 — [ main] o.s.c.n.e.s.EurekaServiceRegistry : Unregistering application eureka-client with eureka with status DOWN 2018-09-07 15:13:38.551 WARN 17896 — [ main] com.netflix.discovery.DiscoveryClient
Saw local status change event StatusChangeEvent
[timestamp=1536304418551, current=DOWN, previous=UP] 2018-09-07
15:13:38.551 INFO 17896 — [nfoReplicator-0]
com.netflix.discovery.DiscoveryClient :
DiscoveryClient_EUREKA-CLIENT/DESKTOP-T28A7MS:eureka-client:8081:
registering service… 2018-09-07 15:13:38.552 INFO 17896 — [
main] o.s.c.support.DefaultLifecycleProcessor : Stopping beans in
phase 0 2018-09-07 15:13:38.554 INFO 17896 — [ main]
o.s.j.e.a.AnnotationMBeanExporter : Unregistering JMX-exposed
beans on shutdown 2018-09-07 15:13:38.554 INFO 17896 — [
main] o.s.j.e.a.AnnotationMBeanExporter : Unregistering
JMX-exposed beans 2018-09-07 15:13:38.557 INFO 17896 —
[nfoReplicator-0] com.netflix.discovery.DiscoveryClient :
DiscoveryClient_EUREKA-CLIENT/DESKTOP-T28A7MS:eureka-client:8081 -
registration status: 204 2018-09-07 15:13:38.558 INFO 17896 — [
main] com.netflix.discovery.DiscoveryClient : Shutting down
DiscoveryClient … 2018-09-07 15:13:38.560 WARN 17896 — [
main] .s.c.a.CommonAnnotationBeanPostProcessor : Invocation of destroy
method failed on bean with name ‘scopedTarget.eurekaClient’:
org.springframework.beans.factory.BeanCreationNotAllowedException:
Error creating bean with name ‘eurekaInstanceConfigBean’: Singleton
bean creation not allowed while singletons of this factory are in
destruction (Do not request a bean from a BeanFactory in a destroy
method implementation!)

Process finished with exit code 1

Description:

The Tomcat connector configured to listen on port 8081 failed to start. The port may already be in use or the connector may be misconfigured.

Action:

Verify the connector’s configuration, identify and stop any process that’s listening on port 8081, or configure this application to listen on another port.

啊,遇到问题先看日志(:з」∠)

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值