SpringBoot bug 记录 无法启动项目

废话不多说 先上BUG日志
 

[INFO ] 2018-08-22 10:42:47,742 --main-- [springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator] Generating unique operation named: queryOrgTreeUsingPOST_1 
[INFO ] 2018-08-22 10:42:47,862 --main-- [org.apache.coyote.http11.Http11NioProtocol] Initializing ProtocolHandler ["http-nio-172.30.200.50-8080"] 
[INFO ] 2018-08-22 10:42:47,876 --main-- [org.apache.coyote.http11.Http11NioProtocol] Starting ProtocolHandler ["http-nio-172.30.200.50-8080"] 
[ERROR] 2018-08-22 10:42:47,882 --main-- [org.apache.catalina.core.StandardService] Failed to start connector [Connector[HTTP/1.1-8080]] 
org.apache.catalina.LifecycleException: Failed to start component [Connector[HTTP/1.1-8080]]
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167)
	at org.apache.catalina.core.StandardService.addConnector(StandardService.java:225)
	at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainer.addPreviouslyRemovedConnectors(TomcatEmbeddedServletContainer.java:250)
	at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainer.start(TomcatEmbeddedServletContainer.java:193)
	at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.startEmbeddedServletContainer(EmbeddedWebApplicationContext.java:297)
	at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.finishRefresh(EmbeddedWebApplicationContext.java:145)
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:546)
	at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122)
	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:693)
	at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:360)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:303)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1118)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1107)
	at com.zdkj.operation.OperationEPApplication.main(OperationEPApplication.java:15)
Caused by: org.apache.catalina.LifecycleException: Protocol handler start failed
	at org.apache.catalina.connector.Connector.startInternal(Connector.java:1021)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
	... 13 common frames omitted
Caused by: java.net.BindException: Cannot assign requested address: bind
	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:210)
	at org.apache.tomcat.util.net.AbstractEndpoint.start(AbstractEndpoint.java:1150)
	at org.apache.coyote.AbstractProtocol.start(AbstractProtocol.java:591)
	at org.apache.catalina.connector.Connector.startInternal(Connector.java:1018)
	... 14 common frames omitted
[INFO ] 2018-08-22 10:42:47,894 --main-- [org.apache.coyote.http11.Http11NioProtocol] Pausing ProtocolHandler ["http-nio-172.30.200.50-8080"] 
[INFO ] 2018-08-22 10:42:47,894 --main-- [org.apache.catalina.core.StandardService] Stopping service [Tomcat] 
[INFO ] 2018-08-22 10:42:47,929 --main-- [org.apache.catalina.util.LifecycleBase] The stop() method was called on component [StandardServer[-1]] after stop() had already been called. The second call will be ignored. 
[INFO ] 2018-08-22 10:42:47,930 --main-- [org.apache.coyote.http11.Http11NioProtocol] Stopping ProtocolHandler ["http-nio-172.30.200.50-8080"] 
[INFO ] 2018-08-22 10:42:47,930 --main-- [org.apache.coyote.http11.Http11NioProtocol] Destroying ProtocolHandler ["http-nio-172.30.200.50-8080"] 
[INFO ] 2018-08-22 10:42:47,935 --main-- [org.springframework.boot.autoconfigure.logging.AutoConfigurationReportLoggingInitializer] 

Error starting ApplicationContext. To display the auto-configuration report re-run your application with 'debug' enabled. 
[ERROR] 2018-08-22 10:42:47,940 --main-- [org.springframework.boot.diagnostics.LoggingFailureAnalysisReporter] 

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

Description:

The Tomcat connector configured to listen on port 8080 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 8080, or configure this application to listen on another port.

 一开始没发现问题在哪里,就在网上找了下对应的异常类解决方法。网上的博客都是说少了jar包。但是我这个明显不是jar包导致的,后来怀疑是端口被占用。换了端口号为8080,重启项目。BUG依然存在。

后来仔细查看日志,发现一个IP
SpringBoot bug 记录 无法启动项目_第1张图片

 感觉有问题啊,马上查看下本机IP 这不是我的IP地址啊。 问题大概知道了。一看springBoot的配置文件


server.address=172.30.200.50
server.port=8080

 不知道那个哥们吧这个配置提交上GIT了。然后我这边拉取下来就这样。启动springboot的时候他去把项目绑定到这个IP上。但是IP又不存在。直接导致这个异常的发生

解决方法 注释掉这个配置server.address=172.30.200.50

你可能感兴趣的:(Java,Spring,SpringBoot,SpringCloud)