nacos启动失败:org.springframework.boot.web.server.WebServerExceptio
生活随笔
收集整理的這篇文章主要介紹了
nacos启动失败:org.springframework.boot.web.server.WebServerExceptio
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
準備環境
系統環境: windows
nacos: 2.0.0-BETA
錯誤信息
org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is org.springframework.boot.web.server.WebServerException: Unable to start embedded Tomcat
配置文件
服務配置文件application.properties,啟用mysql數據庫
#*************** Spring Boot Related Configurations ***************# ### Default web context path: server.servlet.contextPath=/nacos ### Default web server port: server.port=8848#*************** Network Related Configurations ***************# ### If prefer hostname over ip for Nacos server addresses in cluster.conf: # nacos.inetutils.prefer-hostname-over-ip=false### Specify local server's IP: # nacos.inetutils.ip-address=#*************** Config Module Related Configurations ***************# ### If use MySQL as datasource: spring.datasource.platform=mysql### Count of DB: db.num=1### Connect URL of DB: db.url.0=jdbc:mysql://192.168.31.10:3306/nacos?characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true&useUnicode=true&useSSL=false&serverTimezone=UTC db.user.0=root db.password.0=root### Connection pool configuration: hikariCP db.pool.config.connectionTimeout=30000 db.pool.config.validationTimeout=10000 db.pool.config.maximumPoolSize=20 db.pool.config.minimumIdle=2由于properties中僅啟用了mysql數據庫,沒有進行主從配置,所以startup腳本需要修改默認的主從模式改為單機模式,不然就會遇到上述啟動異常!
將上圖中cluster改為standalone即可。
~ _ ~
emmm 學習中遇到的問題,在此記錄分享一下。
總結
以上是生活随笔為你收集整理的nacos启动失败:org.springframework.boot.web.server.WebServerExceptio的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: SpringBoot整合Redis要注意
- 下一篇: 笨办法学习@ConditionalOnP