spring boot 无法启动
spring boot 使用内置tomcat 报错 :
Unable to start embedded Tomcat servlet container
Tomcat connector in failed state ;
debug 进入 代码 中发现 走 this.tomcat.stop 这句代码报错。。 字面理解 应该是 tomcat 无法正常停止 。。。
然后百度 查到了一篇英文 验证了我的猜测:
The maven process does terminate but Tomcat is still running and I can still hit the web-page. When I try to start spring-boot again it fails to start Tomcat because the port is in use.
大致意思 是 tomcat 没有正常停止,再次启动提示 port 端口仍在使用。(可以通过访问你的服务判断如 localhost:8080/MES)
我的原因应该是: eclipse 崩溃,tomcat 没有正常关闭。
结合 https://github.com/spring-projects/spring-boot/issues/773 是 spring-boot 的一个bug..
解决方案是 http://stackoverflow.com/questions/23432651/terminating-mvn-spring-bootrun-doesnt-stop-tomcat
总结有如下方案(最终目的都是关闭tomcat进程):
1.
命令行: netstat -ano | find "8080" 换成你的端口号
taskkill /F /PID 1196 杀死进程
c:\>netstat -ano | find "8080"
TCP 0.0.0.0:8080 0.0.0.0:0 LISTENING 1196
TCP [::]:8080 [::]:0 LISTENING 1196
c:\>taskkill /F /PID 1196
SUCCESS: The process with PID 1196 has been terminated.
2. 换个端口号启动 : 更改spring boot 配置 server.port=7778
spring boot 无法启动的更多相关文章
- spring boot无法启动,或者正常启动之后无法访问报404的解决办法
以前用spring boot都是用idea的自动创建,或者是用的Jhipster创建的,就没有深究怎么去搭建.但是今天晚上心血来潮,想自己搭一个demo来整合一些技术,于是就花一点时间来手动搭.因为今 ...
- spring boot容器启动详解
目录 一.前言 二.容器启动 三.总结 =======正文分割线====== 一.前言 spring cloud大行其道的当下,如果不了解基本原理那么是很纠结的(看见的都是约定大于配置,但是原理呢?为 ...
- 让Spring Boot项目启动时可以根据自定义配置决定初始化哪些Bean
让Spring Boot项目启动时可以根据自定义配置决定初始化哪些Bean 问题描述 实现思路 思路一 [不符合要求] 思路二[满足要求] 思路三[未试验] 问题描述 目前我工作环境下,后端主要的框架 ...
- Spring boot自定义启动字符画(banner)
spring boot项目启动时会打印spring boot的ANSI字符画,可以进行自定义. 如何自定义 实现方式非常简单,我们只需要在Spring Boot工程的/src/main/resourc ...
- spring boot 项目启动无任何反应
遇到的问题 spring boot项目启动后无任何报错,ps有进程,nohub无日志 定位 更换jar包,问题依然存在,将jar包放到其他服务器,运行正常,排除打包问题 同服务器其他系统运行正常,但停 ...
- Spring Boot定制启动图案
启动图案 Spring Boot在启动的时候会显示一个默认的Spring的图案,对应的类为SpringBootBanner. . ____ _ __ _ _ /\\ / ___'_ __ _ _(_) ...
- Spring Boot 设置启动时banner
Spring Boot项目再启动的时候默认会在控制台输出一个字符banner图案,如下图: 我们可以通过下面的方法关闭启动时显示字符banner图案: 关闭banner方法一: public stat ...
- spring boot应用启动原理分析
spring boot quick start 在spring boot里,很吸引人的一个特性是可以直接把应用打包成为一个jar/war,然后这个jar/war是可以直接启动的,不需要另外配置一个We ...
- Spring Boot应用启动原理分析(转)
在spring boot里,很吸引人的一个特性是可以直接把应用打包成为一个jar/war,然后这个jar/war是可以直接启动的,不需要另外配置一个Web Server. 如果之前没有使用过sprin ...
- Spring Boot SpringApplication启动类(二)
目录 前言 1.起源 2.SpringApplication 运行阶段 2.1 SpringApplicationRunListeners 结构 2.1.1 SpringApplicationRunL ...
随机推荐
- Using promises
[Using promises] 过去,异步方法这样写: function successCallback(result) { console.log("It succeeded with ...
- SimpleAdapter用法
[SimpleAdapter用法] public class TestSimpleAdapter extends Activity { @Override protected void onCreat ...
- mongodb 副本集部署
1.安装三节点linux环境:196.168.1.111,196.168.1.112,192.168.1.113(三节点可彼此ping通) 2.三节点安装mongodb,参考https://blog. ...
- springboot logback
/resources/logback-spring.xml <configuration> <appender name="stdout" class=" ...
- SpringCloud报错: "Field discoveryClient in com.controller.DcController required a bean of type 'com.netflix.discovery.DiscoveryClient' that could not be found."
SpringCloud报错: "Field discoveryClient in com.controller.DcController required a bean of type 'c ...
- VIM初掌握
Vim 是 Linux 系统上的最著名的文本/代码编辑器,也是早年的 Vi 编辑器的加强版.它的最大特色是完全使用键盘命令进行编辑,脱离了鼠标操作虽然使得入门变得困难,但上手之后键盘的各种巧妙组合操作 ...
- Qt的pro文件--项目配置的部分字段
Qt项目配置的部分字段: 库: LIBS += -L /usr/local/lib -lpcap INCLUDEPATH += /usr/local/include/
- 1.尽量以const ,enum,inline替换define
1.#define为预处理阶段命令 原因:有可能记号名称没有进入记号表,而出现编译错误,即编译器并没看到过该定义. class专属常量const 一般定义为static,保证该常量至多有一份实体. 枚 ...
- f5创建monitor
- 893. Groups of Special-Equivalent Strings 奇数偶数位上的相同数
[抄题]: You are given an array A of strings. Two strings S and T are special-equivalent if after any n ...