GithubHelp home page GithubHelp logo

Comments (11)

CH3CHO avatar CH3CHO commented on July 19, 2024

我的理解是你先完成了两台服务器的安装,然后登录 Console 进行的用户初始化,对吗?

这里你可以请求一下那台不能正常工作的 Console:http://ip:8080/system/config 看看会返回什么。

  • 如果响应里包含 "system.initialized": true,那么它不应该提示你需要初始化密码。可以换用浏览器的无痕模式试一下看是不是缓存。
  • 如果响应里不包含 "system.initialized": true,或者值是 false,那这个就有点问题了,因为前面反馈说 nacos 里是有这个配置的。

另外,这里还有一点需要注意的。Higress Console 用户名密码是保存在 Secret 里的。而为了保证 Secret 中敏感数据的安全(比如 HTTPS 证书),nacos 里的 Secret 是加密存储的。默认安装的时候,安装脚本会随机生成一个加密密钥。如果两台机器分别使用不同的密钥,后续运行是会有问题的。所以在安装的时候是需要通过指定相同的密钥,或者直接把第一台机器的整个安装目录复制到新的机器上直接启动(不需要再次安装)。

image

from higress.

maco6096 avatar maco6096 commented on July 19, 2024

试了一下复制整个包到另一台机器, 还是提示初始化,日志如下:

2023-12-25 07:56:26.949 ERROR 7 --- [nio-8080-exec-8] c.a.h.c.aop.ApiStandardizationAspect : BusinessException occurs when calling com.alibaba.higress.console.controller.SystemController.initialize

com.alibaba.higress.sdk.exception.BusinessException: Unable to load secret from K8s.
at com.alibaba.higress.console.service.SessionServiceImpl.initializeAdmin(SessionServiceImpl.java:106) ~[classes!/:0.0.1-SNAPSHOT]
at com.alibaba.higress.console.controller.SystemController.initialize(SystemController.java:86) ~[classes!/:0.0.1-SNAPSHOT]

from higress.

CH3CHO avatar CH3CHO commented on July 19, 2024

检查一下两个包目录下面的 compose/volumes/api/nacos.key 文件,看内容是否一致。也看一下 API Server 容器的日志,看是什么错误。

from higress.

maco6096 avatar maco6096 commented on July 19, 2024

nacos.key是一样的, 是连接不到nacos, api日志:
/usr/local/go/src/net/http/server.go:2122: get config from remote nacos server fail, and is not allowed to read local file, err:ConfigQueryRequest is limited

from higress.

CH3CHO avatar CH3CHO commented on July 19, 2024

检查nacos服务端的9848端口是否能够连接

from higress.

maco6096 avatar maco6096 commented on July 19, 2024

不是8848吗? 9848被占用了

from higress.

CH3CHO avatar CH3CHO commented on July 19, 2024

Nacos 2.x 还需要使用 9848 端口。

https://nacos.io/zh-cn/docs/v2/upgrading/2.0.0-compatibility.html
image

from higress.

maco6096 avatar maco6096 commented on July 19, 2024

可以连接telnet 服务端9848也不行

from higress.

CH3CHO avatar CH3CHO commented on July 19, 2024

9848 端口对应的是 nacos 的 9848 吗?现在有什么新的日志吗?

from higress.

maco6096 avatar maco6096 commented on July 19, 2024

2024-01-15 06:21:44.433 ERROR 7 --- [nio-8080-exec-4] c.a.h.c.aop.ApiStandardizationAspect : BusinessException occurs when calling com.alibaba.higress.console.controller.SystemController.initialize

com.alibaba.higress.sdk.exception.BusinessException: Unable to load secret from K8s.
at com.alibaba.higress.console.service.SessionServiceImpl.initializeAdmin(SessionServiceImpl.java:106) ~[classes!/:0.0.1-SNAPSHOT]
at com.alibaba.higress.console.controller.SystemController.initialize(SystemController.java:86) ~[classes!/:0.0.1-SNAPSHOT]
at com.alibaba.higress.console.controller.SystemController$$FastClassBySpringCGLIB$$ba04bcb2.invoke() ~[classes!/:0.0.1-SNAPSHOT]
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218) ~[spring-core-5.3.9.jar!/:5.3.9]
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:779) ~[spring-aop-5.3.9.jar!/:5.3.9]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) ~[spring-aop-5.3.9.jar!/:5.3.9]
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:750) ~[spring-aop-5.3.9.jar!/:5.3.9]
at org.springframework.validation.beanvalidation.MethodValidationInterceptor.invoke(MethodValidationInterceptor.java:123) ~[spring-context-5.3.9.jar!/:5.3.9]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[spring-aop-5.3.9.jar!/:5.3.9]
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:750) ~[spring-aop-5.3.9.jar!/:5.3.9]
at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:89) ~[spring-aop-5.3.9.jar!/:5.3.9]
at com.alibaba.higress.console.aop.ApiStandardizationAspect.intercept(ApiStandardizationAspect.java:78) ~[classes!/:0.0.1-SNAPSHOT]
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104) ~[na:na]
at java.base/java.lang.reflect.Method.invoke(Method.java:577) ~[na:na]

from higress.

maco6096 avatar maco6096 commented on July 19, 2024

重新安装了, 使用同一个key是可以的

from higress.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.