SpringBoot:springboot整合eureka报错 Unable to start embedded Tomcat
报错信息:
org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is org.springframework.boot.web.server.WebServerException: Unable to start embedded Tomcat
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:155) ~[spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:544) ~[spring-context-5.0.5.RELEASE.jar:5.0.5.RELEASE]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:140) ~[spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:759) [spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:395) [spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:327) [spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1255) [spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1243) [spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE]
at com.wwj.springcloud.eurekaserver.EurekaServerApplication.main(EurekaServerApplication.java:16) [classes/:na]
Caused by: org.springframework.boot.web.server.WebServerException: Unable to start embedded Tomcat
at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.initialize(TomcatWebServer.java:126) ~[spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE]
at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.<init>(TomcatWebServer.java:86) ~[spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE]
at org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory.getTomcatWebServer(TomcatServletWebServerFactory.java:409) ~[spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE]
at org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory.getWebServer(TomcatServletWebServerFactory.java:174) ~[spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.createWebServer(ServletWebServerApplicationContext.java:179) ~[spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:152) ~[spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE]
... 8 common frames omitted
Caused by: java.lang.IllegalStateException: StandardEngine[Tomcat].StandardHost[localhost].TomcatEmbeddedContext[] failed to start
at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.rethrowDeferredStartupExceptions(TomcatWebServer.java:172) ~[spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE]
at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.initialize(TomcatWebServer.java:110) ~[spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE]
... 13 common frames omitted
博主引入的pom文件如下:
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-eureka-server</artifactId>
</dependency>
原因为:
如上jar包内包含Tomcat服务,导致此jar包和Springboot自带的Tomcat服务冲突,启动失败
解决方法:
修改依赖jar包
#版本的话根据项目来选取最合适的版本
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-eureka</artifactId>
</dependency>
SpringBoot:springboot整合eureka报错 Unable to start embedded Tomcat的更多相关文章
- Springboot项目整合Swagger2报错
SpringBoot2.2.6整合swagger2.2.2版本的问题,启动SpringBoot报如下错: Error starting ApplicationContext. To display t ...
- Springboot整合Elasticsearch报错availableProcessors is already set to [4], rejecting [4]
Springboot整合Elasticsearch报错 今天使用SpringBoot整合Elasticsearch时候,相关的配置完成后,启动项目就报错了. nested exception is j ...
- 新建SpringBoot项目运行页面报错Whitelabel Error Page This application has no explicit mapping for /error, so yo
新建SpringBoot项目运行页面报错Whitelabel Error Page This application has no explicit mapping for /error, so yo ...
- springboot 启动的时候报错 Error creating bean with name 'solrClient'
springboot 启动的时候报错: org.springframework.beans.factory.BeanCreationException: Error creating bean wit ...
- 关于springboot 连接mysql 数据库报错问题
springboot连接MySQL运行报错: The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized or represents more ...
- SpringCloud Eureka 报错 无法启动问题
1.SpringCloud Eureka 报错 无法启动基本上都是spring boot的版本与spring cloud的版本不匹配导致的. <dependencyManagement> ...
- delphi调试需要管理员权限程序报错“Unable to create process:请求的操作需要提升”
delphi调试启动需要UAC权限的程序的时候会报错“Unable to create process:请求的操作需要提升”.这是因为delphi没有以管理员身份启动,这样delphi createp ...
- spring+hibernate整合:报错org.hibernate.HibernateException: No Session found for current thread
spring+hibernate整合:报错信息如下 org.hibernate.HibernateException: No Session found for current thread at o ...
- AS添加依赖报错Unable to merge dex
AS添加依赖报错Unable to merge dex 最近在给项目添加依赖的时候,要给项目导入Bmob的SDK,参照Bmob的官方文档,可以直接在app的build.gradle文件中添加 //Bm ...
随机推荐
- mysql基础之数据库变量(参数)管理
数据库的数据存放路径:[root@ren7 mysql]# pwd /var/lib/mysql [root@ren7 mysql]# ls aria_log.00000001 ibdata1 mul ...
- s40 KVM虚拟化企业级实战
1-为何使用虚拟化 02-KVM虚拟化环境准备 yum install libvirt* virt-* qemu-kvm* -y [root@cs7-kvm ~]# systemctl start l ...
- IDEA 创建 Vue 文件(Day_41)
IDEA 创建 Vue 文件 1. 在setting-->plugins里安装vue插件,安装成功之后重启IDEA 如图 2. 在setting-->Editor-->File Ty ...
- sklearn中,数据集划分函数 StratifiedShuffleSplit.split() 使用踩坑
在SKLearn中,StratifiedShuffleSplit 类实现了对数据集进行洗牌.分割的功能.但在今晚的实际使用中,发现该类及其方法split()仅能够对二分类样本有效. 一个简单的例子如下 ...
- yml配置从nacos配置中心取数据(单个或多个)
读取单个文件 spring: application: name: test-server cloud: nacos: config: server-addr: localhost:8848 name ...
- Apple Xcode 12.5 (12E262) 正式版发布 - 构建 Universal App
请访问原文链接:https://sysin.org/article/apple-xcode-12/,查看最新版.转载请保留出处. Xcode 12 简介 Xcode 12 采用全新设计,在 macOS ...
- Step By Step(Lua函数)
Step By Step(Lua函数) 一.函数: 在Lua中函数的调用方式和C语言基本相同,如:print("Hello World")和a = add(x, y).唯一的 ...
- Linux 中/var/spool/postfix/maildrop目录下堆积大量小文件 如何删除
Linux 中/var/spool/postfix/maildrop目录下堆积大量小文件 如何删除 1.先删除maildrop目录下的通知邮件文件 命令:find /var/spool/postf ...
- Python+Selenium - 三种等待方式
元素:存在 > 可见 > 可用 需要判断元素状态 等待方式1:强制等待 -- 辅助 设置等待几秒,就必须等待几秒 示例: from time import sleepsleep(3) 强 ...
- VUE3后台管理系统【路由鉴权】
前言: 在"VUE3后台管理系统[模板构建]"文章中,详细的介绍了我使用vue3.0和vite2.0构建的后台管理系统,虽然只是简单的一个后台管理系统,其中涉及的技术基本都覆盖了, ...