Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.7.1版本替换内置Eureka注册中心为nacos没有生效,是不是从1.8.0才支持? #4779

Closed
3 tasks done
bufx opened this issue Mar 7, 2023 · 2 comments · Fixed by #4786
Closed
3 tasks done

Comments

@bufx
Copy link

bufx commented Mar 7, 2023

描述bug

根据文档nacos-discovery修改了build.sh和application-github.properties,打包后启动没有生效,还是用的内置的Eureka

复现

通过如下步骤可以复现:

  1. 下载1.7.1源码
  2. 修改build.sh的mvn打包命令
  3. 在application-github.properties追加添加
nacos.discovery.server-addr = ${nacos_discovery_server-addr}
# 更多 nacos 配置
nacos.discovery.access-key = ${nacos_discovery_access-key}
nacos.discovery.username = ${nacos_discovery_username}
nacos.discovery.password = ${nacos_discovery_password}
nacos.discovery.secret-key = ${nacos_discovery_secret-key}
nacos.discovery.namespace = ${nacos_discovery_namespace}
nacos.discovery.context-path = ${nacos_discovery_context-path}
  1. 运行 .build.sh
  2. 然后根据Dockerfile 生成镜像
  3. docker 启动命令
docker run -d -p 8080:8080 \
 -e SPRING_DATASOURCE_URL="jdbc:mysql://10.10.23.94:3306/ApolloConfigDB?characterEncoding=utf8" \
 -e SPRING_DATASOURCE_USERNAME=root \
 -e SPRING_DATASOURCE_PASSWORD='root' \
 -e nacos_discovery_server-addr=10.10.23.94:8848 \
-e nacos_discovery_username=nacos \
-e nacos_discovery_password=nacos \
-e nacos_discovery_namespace=public \
 -e SERVER_PORT=8080 \
 --name apollo-configservice apolloconfig/apollo-configservice:1.7.1

期望

apollo-configservice 服务注册到nacos

截图

额外的细节和日志

  • 版本:1.7.1
  • 错误日志 无错误
  • 配置:
  • 平台和操作系统:Linux centos7
@nobodyiam
Copy link
Member

according to the 1.8.0 release note, yes.

@bufx
Copy link
Author

bufx commented Mar 9, 2023

感谢回复,建议文档可以补充一下

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants