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 ...
随机推荐
- CSS Media Query
[CSS Media Query] CSS Media Queries are a feature in CSS3 which allows you to specify when certain C ...
- 去掉Android新建项目的顶部标题
[ 去掉Android新建项目的顶部标题] 使用NoActionBar的Theme即可. 参考:http://blog.csdn.net/u012246458/article/details/5299 ...
- js 中的原型prototype
每次创建新函数,就会根据规则为该函数创建一个 prototype 属性,该属性是一个指向函数原型对象的指针.并且原型对象都默认拥有一个 constructor 属性,该属性是一个指向那个新建函数的指针 ...
- linux之docker学习
1.redis主从同步 可以主从数据同步,从库只读,只能手动切换主备关系2.redis哨兵 -准备redis主从数据库环境 -准备redis哨兵(可以有一个,可以有多个) -哨兵检测redis主库状态 ...
- APIView和View的区别
APIView和View的区别 API继承了View 重写了as_view方法 --豁免csrf def dispatch(self, request, *args, **kwargs): self. ...
- UVa 10129 Play on Words(有向图欧拉路径)
Some of the secret doors contain a very interesting word puzzle. The team of archaeologists has to s ...
- Django具体操作(六)
文章详情页的编写: {% extends "base.html" %} {% block content %} {% csrf_token %} <div class=&qu ...
- Mac git 终端使用
终端有这个提示,这个按照命令 输入你的 git账号和邮箱就可以, 不然一直出这个提示 Your name and email address were configured automatically ...
- Bootstrap(4) 表单和图片
1.表单 基本格式,实现基本的表单样式 <form class="form-horizontal"> <div class="form-group&qu ...
- 13-算法训练 P0505
算法训练 P0505 时间限制:1.0s 内存限制:256.0MB 一个整数n的阶乘可以写成n!,它表示从1到n这n个整数的乘积.阶乘的增长速度非常快,例如,13!就已经比较大了,已 ...