dubbo-admin-2.6.0 管理控制台404

目录

1.运行环境

2.错误场景(tomcat启动报错)

2.1 错误场景1

2.1  错误场景2 (且不断弹出)

3.解决办法

3.1 问题1

3.2 问题2

4.进行测试


1.运行环境

本人运行环境是 jdk1.8, tomcat7,IDEA2021.1 ,centos7,zookeeper 3.4.6

场景:在Centos7上 运行zookeeper,依次启动 IDEA中项目 服务方微服务,消费方微服务,将

dubbo-admin-2.6.0 解压缩放在 webapps目录下 ,修该目录中 WEB_INF 目录下 dubbo.properties

配置文件当中zookeeper  地址更改为 zookeeper安装主机的地址,进入到tomcat目录下bin目录  启动 startup.bat 

2.错误场景(tomcat启动报错)

2.1 错误场景1

dubbo-admin-2.6.0 管理控制台404_第1张图片


 WARN context.WebxComponentsContext - Exception thrown from ApplicationListener handling ContextClosedEvent
java.lang.IllegalStateException: ApplicationEventMulticaster not initialized - call 'refresh' before multicasting events via the context: Root WebApplicationContext: startup date [Sat Jan 08 13:38:48 CST 2022]; root of context hierarchy
        at org.springframework.context.support.AbstractApplicationContext.getApplicationEventMulticaster(AbstractApplicationContext.java:347)
        at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:334)
        at org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:1055)
        at org.springframework.context.support.AbstractApplicationContext.close(AbstractApplicationContext.java:1016)
        at org.springframework.web.context.ContextLoader.closeWebApplicationContext(ContextLoader.java:586)
        at org.springframework.web.context.ContextLoaderListener.contextDestroyed(ContextLoaderListener.java:143)
        at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:4811)
        at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5467)
        at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:257)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:187)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:753)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:727)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:695)
        at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1177)
        at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1925)
        at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at java.base/java.lang.Thread.run(Thread.java:834)
 WARN context.WebxComponentsContext - Exception thrown from LifecycleProcessor on context close
java.lang.IllegalStateException: LifecycleProcessor not initialized - call 'refresh' before invoking lifecycle methods via the context: Root WebApplicationContext: startup date [Sat Jan 08 13:38:48 CST 2022]; root of context hierarchy
        at org.springframework.context.support.AbstractApplicationContext.getLifecycleProcessor(AbstractApplicationContext.java:360)
        at org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:1063)
        at org.springframework.context.support.AbstractApplicationContext.close(AbstractApplicationContext.java:1016)
        at org.springframework.web.context.ContextLoader.closeWebApplicationContext(ContextLoader.java:586)
        at org.springframework.web.context.ContextLoaderListener.contextDestroyed(ContextLoaderListener.java:143)
        at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:4811)
        at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5467)
        at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:257)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:187)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:753)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:727)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:695)
        at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1177)
        at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1925)
        at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at java.base/java.lang.Thread.run(Thread.java:834)

2.1  错误场景2 (且不断弹出)

dubbo-admin-2.6.0 管理控制台404_第2张图片

 zookeeper is not connected yet

3.解决办法

3.1 问题1

一定要确保  jdk版本与dubbo-admin  版本相对应  jdk 8 对应的就是  dubbo-admin-2.6.0

我遇到的情况是jdk版本与项目不兼容,原因是我电脑里面有两个jdk  一个是jdk11,jdk8,但是我电脑里面使用的是jdk 8 ,但tomcat指定的jdk可能是我电脑里面的jdk11,具体原因未知

解决办法

找到 tomcat bin目录下  setclasspath.bat  进行jdk指定

右键编辑   在文件最顶部分加入  以下内容 

export JAVA_HOME=/opt/jdk1.8.0_12               //自己电脑上的jdk安装路径
export JRE_HOME=/opt/jdk1.8.0_12/jre/          //自己电脑上jre路径

3.2 问题2

这种情况下说的就是没有连接到 zookeeper

有以下几种情况

1.zookeeper未开启

2.未修改 dubbo.properties  配置文件当中zookeeper  地址或者地址填写不正确

3.不能连接到虚拟机

win+r   输入cmd    ping一下虚拟机地址

然后打开虚拟机ping 一下自己电脑的ip地址,如果不能ping通,就是这个问题

4.进行测试

访问

http://localhost:8080/dubbo-admin-2.6.0/

dubbo-admin-2.6.0 管理控制台404_第3张图片

 问题已解决

你可能感兴趣的:(java,dubbo,spring,zookeeper,linux)