blade-gateway docker环境下启动失败

Blade 未结 3 122
dubbo
dubbo 剑者 2024-05-28 20:05

一、该问题的重现步骤是什么?

  1. 打包后启动blade-gateway 提示下面报错 本机是正常的 ,其他服务正常启动可以注册到nacos上


  2.   尝试改了DynamicRouteServiceListener的下面2行代码
  3. .setProperty(., .);
    .setProperty(., .);
  4. 结果不起作用

2. nacos用户名密码已经改掉了,并且新增了一个别的用户 但是看日志blade-gateway 一直取到的默认账号密码nacos

3. 尝试把打包后的jar包拿出来看了 common的

LauncherConstant

账号密码是对的

二、你期待的结果是什么?实际看到的又是什么?


三、你正在使用的是什么产品,什么版本?在什么操作系统上?

4.0.0 Linux

四、请提供详细的错误堆栈信息,这很重要。

nacos registry, blade-gateway register failed...NacosRegistration{nacosDiscoveryProperties=NacosDiscoveryProperties{serverAddr='xxxxx:8848', username='nacos', password='nacos', endpoint='', namespace='', watchDelay=30000, logName='', service='blade-gateway', weight=1.0, clusterName='DEFAULT', group='DEFAULT_GROUP', namingLoadCacheAtStart='false', metadata={IPv6=null, preserved.register.source=SPRING_CLOUD}, registerEnabled=true, ip='172.17.0.8', networkInterface='', port=8081, secure=false, accessKey='', secretKey='', heartBeatInterval=null, heartBeatTimeout=null, ipDeleteTimeout=null, instanceEnabled=true, ephemeral=true, failureToleranceEnabled=false}, ipDeleteTimeout=null, failFast=true}},

com.alibaba.nacos.api.exception.NacosException: user not found!
    at com.alibaba.nacos.client.naming.remote.gprc.NamingGrpcClientProxy.requestToServer(NamingGrpcClientProxy.java:449) ~[nacos-client-2.3.1.jar!/:na]
    at com.alibaba.nacos.client.naming.remote.gprc.NamingGrpcClientProxy.doRegisterService(NamingGrpcClientProxy.java:250) ~[nacos-client-2.3.1.jar!/:na]
    at com.alibaba.nacos.client.naming.remote.gprc.NamingGrpcClientProxy.registerServiceForEphemeral(NamingGrpcClientProxy.java:145) ~[nacos-client-2.3.1.jar!/:na]
    at com.alibaba.nacos.client.naming.remote.gprc.NamingGrpcClientProxy.registerService(NamingGrpcClientProxy.java:136) ~[nacos-client-2.3.1.jar!/:na]
    at com.alibaba.nacos.client.naming.remote.NamingClientProxyDelegate.registerService(NamingClientProxyDelegate.java:95) ~[nacos-client-2.3.1.jar!/:na]
    at com.alibaba.nacos.client.naming.NacosNamingService.registerInstance(NacosNamingService.java:151) ~[nacos-client-2.3.1.jar!/:na]
    at com.alibaba.cloud.nacos.registry.NacosServiceRegistry.register(NacosServiceRegistry.java:75) ~[spring-cloud-starter-alibaba-nacos-discovery-2022.0.0.0.jar!/:2022.0.0.0]
    at org.springframework.cloud.client.serviceregistry.AbstractAutoServiceRegistration.register(AbstractAutoServiceRegistration.java:264) ~[spring-cloud-commons-4.1.2.jar!/:4.1.2]
    at com.alibaba.cloud.nacos.registry.NacosAutoServiceRegistration.register(NacosAutoServiceRegistration.java:78) ~[spring-cloud-starter-alibaba-nacos-discovery-2022.0.0.0.jar!/:2022.0.0.0]
    at org.springframework.cloud.client.serviceregistry.AbstractAutoServiceRegistration.start(AbstractAutoServiceRegistration.java:156) ~[spring-cloud-commons-4.1.2.jar!/:4.1.2]
    at org.springframework.cloud.client.serviceregistry.AbstractAutoServiceRegistration.onApplicationEvent(AbstractAutoServiceRegistration.java:119) ~[spring-cloud-commons-4.1.2.jar!/:4.1.2]
    at org.springframework.cloud.client.serviceregistry.AbstractAutoServiceRegistration.onApplicationEvent(AbstractAutoServiceRegistration.java:49) ~[spring-cloud-commons-4.1.2.jar!/:4.1.2]
    at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:185) ~[spring-context-6.1.5.jar!/:6.1.5]
    at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:178) ~[spring-context-6.1.5.jar!/:6.1.5]
    at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:156) ~[spring-context-6.1.5.jar!/:6.1.5]
    at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:451) ~[spring-context-6.1.5.jar!/:6.1.5]
    at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:384) ~[spring-context-6.1.5.jar!/:6.1.5]
    at org.springframework.boot.web.reactive.context.WebServerManager.start(WebServerManager.java:57) ~[spring-boot-3.2.4.jar!/:3.2.4]
    at org.springframework.boot.web.reactive.context.WebServerStartStopLifecycle.start(WebServerStartStopLifecycle.java:41) ~[spring-boot-3.2.4.jar!/:3.2.4]
    at org.springframework.context.support.DefaultLifecycleProcessor.doStart(DefaultLifecycleProcessor.java:288) ~[spring-context-6.1.5.jar!/:6.1.5]
    at org.springframework.context.support.DefaultLifecycleProcessor$LifecycleGroup.start(DefaultLifecycleProcessor.java:471) ~[spring-context-6.1.5.jar!/:6.1.5]
    at java.base/java.lang.Iterable.forEach(Iterable.java:75) ~[na:na]
    at org.springframework.context.support.DefaultLifecycleProcessor.startBeans(DefaultLifecycleProcessor.java:260) ~[spring-context-6.1.5.jar!/:6.1.5]
    at org.springframework.context.support.DefaultLifecycleProcessor.onRefresh(DefaultLifecycleProcessor.java:205) ~[spring-context-6.1.5.jar!/:6.1.5]
    at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:981) ~[spring-context-6.1.5.jar!/:6.1.5]
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:627) ~[spring-context-6.1.5.jar!/:6.1.5]
    at org.springframework.boot.web.reactive.context.ReactiveWebServerApplicationContext.refresh(ReactiveWebServerApplicationContext.java:66) ~[spring-boot-3.2.4.jar!/:3.2.4]
    at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:754) ~[spring-boot-3.2.4.jar!/:3.2.4]
    at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:456) ~[spring-boot-3.2.4.jar!/:3.2.4]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:334) ~[spring-boot-3.2.4.jar!/:3.2.4]
    at org.springframework.boot.builder.SpringApplicationBuilder.run(SpringApplicationBuilder.java:149) ~[spring-boot-3.2.4.jar!/:3.2.4]
    at org.springblade.core.launch.BladeApplication.run(BladeApplication.java:59) ~[blade-core-launch-4.0.1.RELEASE.jar!/:4.0.1.RELEASE]
    at org.springblade.gateway.GateWayApplication.main(GateWayApplication.java:45) ~[!/:na]
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[na:na]
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
    at java.base/java.lang.reflect.Method.invoke(Method.java:568) ~[na:na]
    at org.springframework.boot.loader.launch.Launcher.launch(Launcher.java:91) ~[blade-gateway.jar:na]
    at org.springframework.boot.loader.launch.Launcher.launch(Launcher.java:53) ~[blade-gateway.jar:na]
    at org.springframework.boot.loader.launch.JarLauncher.main(JarLauncher.java:58) ~[blade-gateway.jar:na]

2024-05-28T19:56:35.944+08:00 ERROR 1 --- [blade-gateway] [ming.security.0] c.a.n.c.a.i.process.HttpLoginProcessor   : login failed: {"code":403,"message":"user not found!","header":{"header":{"Accept-Charset":"UTF-8","Connection":"keep-alive","Content-Length":"15","Content-Security-Policy":"script-src 'self'","Content-Type":"text/html;charset=UTF-8","Date":"Tue, 28 May 2024 11:56:35 GMT","Keep-Alive":"timeout=60","Vary":"Access-Control-Request-Headers"},"originalResponseHeader":{"Connection":["keep-alive"],"Content-Length":["15"],"Content-Security-Policy":["script-src 'self'"],"Content-Type":["text/html;charset=UTF-8"],"Date":["Tue, 28 May 2024 11:56:35 GMT"],"Keep-Alive":["timeout=60"],"Vary":["Access-Control-Request-Headers","Access-Control-Request-Method","Origin"]},"charset":"UTF-8"}}

五、若有更多详细信息,请在下面提供。

3条回答
  • 检查下打包的镜像是不是有问题,重新打下包。

    作者追问:2024-05-28 23:09

    试过了不行

    回答: 2024-05-29 10:07

    本地用生产的配置和参数启动看下是否正常。

    作者追问:2024-05-29 10:09

    也是正常得 本地和生产目前都是用得dev

    0 讨论(0)
  • 2024-05-29 20:58

    把你的这个nacos地址对外网映射,然后把外网地址和用户名密码发我们邮件(bladejava@qq.com),我们调试看看

    作者追问:2024-05-29 21:08

    已发送

    作者追问:2024-05-29 21:09

    现在是注册上的 因为nacos密码还没改,一改就启动失败了

    0 讨论(0)
  • 2024-06-04 17:55

    此问题仍然没有解决,作者给看了一下 docker下通过启动命令指定nacos用户名密码可以启动成功,通过common下的

    LauncherConstant

    类启动还是启动不了


    0 讨论(0)
提交回复