`
zhoumeng87
  • 浏览: 68912 次
文章分类
社区版块
存档分类
最新评论

阿里微服务注册中心 Nacos 启动报错 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:156)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:544)
        at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:141)
        at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:744)
        at org.springframework.boot.SpringApplication.refreshContext(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)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.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.boot.web.embedded.tomcat.TomcatWebServer.initialize(TomcatWebServer.java:124)
        at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.<init>(TomcatWebServer.java:86)
        at org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory.getTomcatWebServer(TomcatServletWebServerFactory.java:416)
        at org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory.getWebServer(TomcatServletWebServerFactory.java:180)
        at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.createWebServer(ServletWebServerApplicationContext.java:180)
        at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:153)
        ... 16 common frames omittedspring cloud alibaba项目 from fhadmin.cn

因为如果直接在bin目录下用鼠标双击startup.cmd启动的话,默认的是以cluster(集群)的方式启动,直接启动第一个会报Unable to start embedded Tomcat错误,改成单机启动(from fhadmin.cn):

用记事本打开bin目录下查看startup.cmd

@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      http://www.apache.org/licenses/LICENSE-2.0
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%\bin\java.exe" 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%\bin\java.exe"

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.
set 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" 即可

0
1
分享到:
评论

相关推荐

    nacos启动报错缺少的补丁(针对2021R版本的)

    nacos启动报错缺少的补丁(针对windows server 2021R2版本的),有: clearcompressionflag.exe; vc_redist.x64.exe; Windows8.1-KB2919355-x64.msu; Windows8.1-KB2919442-x64.msu; Windows8.1-KB2919442-x86.msu...

    阿里开源 注册中心 nacos

    阿里开源 注册中心 nacos,最新开源的注册服务中心,支持dubbo,spring cloud,阿里开源 注册中心 nacos,最新开源的注册服务中心,支持dubbo,spring cloud

    docker安装nacos报错nacos-logback.xml找不到

    docker安装nacos报错nacos-logback.xml找不到,把该文件放入相应的文件夹中即可

    微服务之nacos组件

    Nacos 是阿里巴巴推出来的一个新开源项目,这是一个更易于构建云原生应用的动态服务发现、配置管理和服务管理平台。 Nacos 致力于帮助您发现、配置和管理微服务。Nacos 提供了一组简单易用的特性集,帮助您快速实现...

    SpringCloud 微服务注册中心 - Nacos高可用.md

    SpringCloud 微服务注册中心 - Nacos高可用.md

    微服务组件(nacos、dubbo、gateway、sentinal、rocketmq、redis、docker等)

    在微服务架构中,Nacos可以用来注册和发现微服务,可以提供集中化的服务注册、配置存储和管理中心,高可用性,并且可以与微服务框架无缝集成。 Nacos可以用来实现动态服务发现、服务配置、服务元数据和流量管理等...

    Spring-Cloud-Alibaba微服务组件:Nacos-2.1.0资源

    Nacos支持服务注册与发现,服务提供者可以在启动时向Nacos注册自身服务,而服务消费者则可以通过Nacos查找并调用所需的服务。这种机制简化了微服务之间的通信,降低了服务间的耦合度,并且能够实现服务的动态扩缩容...

    微服务开发工具nacos

    启动命令 sh startup.sh -m standalone 配置账户信息 nacos.core.auth.enabled=true nacos.core.auth.server.identity.key=${NACOS_AUTH_IDENTITY_KEY:example} nacos.core.auth.server.identity.value=${NACOS_...

    nacos 完美匹配若依微服务框架的(适合若依的)

    Nacos 是一个由阿里开源的、轻量级的、用于构建以服务为中心的现代应用架构的动态服务发现、配置管理和服务管理平台。它在微服务领域有着广泛的应用,尤其适用于那些希望实现云原生架构的企业。若依微服务框架则是一...

    SpringCloud微服务项目:nacos+springsecurity+gateway+令牌桶限流

    Nacos是阿里巴巴开源的一款动态配置服务和发现服务,它为分布式系统中的配置管理和服务发现提供了一站式解决方案。在微服务架构中,Nacos可以用来存储各个服务的配置信息,实现配置的集中管理和动态更新,避免了在...

    nacos 源码解析

    Nacos 支持基于 DNS 和基于 RPC 的服务发现(可以作为springcloud的注册中心)、动态配置服务(可以做配置中心)、动态 DNS 服务。 Nacos 致力于帮助您发现、配置和管理微服务。Nacos 提供了一组简单易用的特性集,...

    微服务注册与发现中心nacos

    Nacos作为阿里巴巴开源的一款优秀的微服务注册与发现中心,正是解决这一问题的关键工具。 Nacos的全称是Naming and Configuration Service,即命名与配置服务,它不仅提供了服务注册与发现的功能,还包含了动态配置...

    01 Alibaba微服务组件Nacos注册中心实战(更新).pdf

    - **服务注册中心**:Nacos作为服务注册中心,存储服务实例的元数据,实例启动/关闭时进行注册/注销操作。 - **服务元数据**:包括服务的名称、版本、分组、IP、端口、健康检查信息等,用于服务消费者定位和选择...

    微服务组件nacos,nacos-server-2.2.0-BETA.zip

    Nacos是阿里巴巴开源的一款分布式服务治理和配置中心的组件,主要服务于微服务架构中的服务发现、配置管理和控制台管理等场景。在Spring Boot向Spring Cloud的升级过程中,Nacos作为一个重要的中间件,可以帮助...

    Nocos启动异常.zip

    Nacos是一款由阿里云开发的分布式服务治理和配置中心,它广泛应用于微服务架构中。RocksDB则是一个高性能、嵌入式、支持多版本的键值存储系统,Nacos可能使用它来实现高效的数据持久化。JNI允许Java代码调用本地库,...

    spring cloud nacos 注册中心

    Spring Cloud Nacos是阿里巴巴提供的一款强大的微服务管理工具,它主要功能之一就是作为服务注册中心。Nacos在设计上融合了配置管理、服务发现和服务管理等多个功能,为开发者提供了便捷的微服务治理方案。在这里,...

    Nacos - Spring Cloud 微服务注册中心和配置中心新解决方案.pptx

    Nacos - Spring Cloud 微服务注册中心和配置中心新解决方案.pptx

    微服务Nacos达梦数据库版本

    - **测试验证**:启动Nacos和微服务,通过接口调用或Nacos控制台验证服务的注册、发现及配置管理功能是否正常。 6. **注意事项** - **兼容性测试**:在实际使用前,应进行充分的兼容性测试,确保Nacos与达梦...

    微服务系列之ZooKeeper注册中心和Nacos注册中心.docx

    在微服务架构中,服务注册中心是至关重要的组件,它负责维护服务提供者和服务消费者的元数据,以便于服务之间的通信和发现。本篇文章主要探讨了两种常用的注册中心——ZooKeeper和Nacos,并且详细解释了它们在Dubbo...

Global site tag (gtag.js) - Google Analytics