Nacos启动报错
报错内容如下
t.ApplicationContextException: Unable to start web server; nested exception is
org.springframework.boot.web.server.WebServerException: Unable to start embedded Tomcat
at
org.springframework.boot.Refresh(ServletWebServerApplicationCon text.java:156)
at t.fresh(AbstractApplicationContext.java:544)
at
org.springframework.boot.fresh(ServletWebServerApplicationContex t.java:141)
at org.springframework.fresh(SpringApplication.java:744)
at org.springframework.freshContext(SpringApplication.java:391)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:312)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1215)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1204)
at com.alibaba.nacos.Nacos.main(Nacos.java:35)
flect.NativeMethodAccessorImpl.invoke0(Native Method)
flect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
flect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at flect.Method.invoke(Method.java:483)
at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:49)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:108)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:58)
at org.springframework.boot.loader.PropertiesLauncher.main(PropertiesLauncher.java:467)
Caused by: org.springframework.boot.web.server.WebServerException: Unable to start embedded Tomcat
at org.springframework.at.TomcatWebServer.initialize(TomcatWebServer.java:124)
at org.springframework.at.TomcatWebServer.<init>(TomcatWebServer.java:86)
at
org.springframework.TomcatWebServer(TomcatServletWebSer verFactory.java:416)
at
org.springframework.WebServer(TomcatServletWebServerFact ory.java:180)
at
org.springframework.boot.ateWebServer(ServletWebServerApplicati onContext.java:180)
at
org.springframework.boot.Refresh(ServletWebServerApplicationCon text.java:153)
... 16 common frames omitted
(spring cloud alibaba from fhadmin)
因为如果直接在bin⽬录下⽤⿏标双击d启动的话,默认的是以cluster(集)的⽅式启动,直接启动第⼀个会报Unable to start embedded Tomcat错误,改成单机启动:
⽤记事本打开bin⽬录下查看d
@echo off
rem Copyright 1999-2018 Alibaba Group Holding Ltd.
rem Licensed under the Apache License, Version 2.0 (the "License");
rem you may not use this file except in compliance with the License.
rem You may obtain a copy of the License at
rem
rem
rem Unless required by applicable law or agreed to in writing, software
rem distributed under the License is distributed on an "AS IS" BASIS,
rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
rem See the License for the specific language governing permissions and
rem limitations under the License.
if not exist "%JAVA_HOME%\" echo Please set the JAVA_HOME variable in your environment, We need java(x64)! jdk8 or later is better! & EXIT /B 1
set "JAVA=%JAVA_HOME%\"
setlocal enabledelayedexpansion
set BASE_DIR=%~dp0
rem added double quotation marks to avoid the issue caused by the folder names containing spaces.
rem removed the last 5 chars(which means \bin\) to get the base DIR.
unableset BASE_DIR="%BASE_DIR:~0,-5%"
set CUSTOM_SEARCH_LOCATIONS=file:%BASE_DIR%/conf/ set MODE="standalone"
set FUNCTION_MODE="all"
set SERVER=nacos-server
set MODE_INDEX=-1
set FUNCTION_MODE_INDEX=-1
set SERVER_INDEX=-1
set EMBEDDED_STORAGE_INDEX=-1
set EMBEDDED_STORAGE=""
把 set MODE="cluster" 改为 set MODE="standalone" 即可
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
发表评论