Skip to content
New issue

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

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

Already on GitHub? # to your account

微服务模式部署下,nacos的账户密码如果不使用默认提供的nacos/nacos,会导致gateway读取路由信息失败 #2375

Closed
slppls opened this issue Mar 23, 2021 · 2 comments

Comments

@slppls
Copy link

slppls commented Mar 23, 2021

版本号:

v2.4.3

问题描述:

如果是自己配置的nacos,且账户密码不为nacos/nacos,且在修改了parent/boot-starter下的cloud模块的nacos相关参数,启动gateway的时候,虽然可以正常读取应用的配置,但是读取路由信息文件(route.json)失败,经过debug跟踪,发现gateway项目内对于路由信息读取,如果为nacos类型,会重新创建一次nacos的配置信息进行读取路由信息,但是没有自定义的nacos账户密码配置,因此导致访问nacos出现403,读取失败

截图&代码:

image
image
目前我这边的做法是直接设置读取了boot-starter-cloud模块下的nacos的账户密码进行置入,问题解决。

不清楚是否我自己的项目启动方式有误还是真的是这里出现了问题,望指教

友情提示: 未按格式要求发帖,会直接删掉。

@accpman
Copy link

accpman commented Mar 27, 2021

修改默认密码确实需要加入配置,你理解的没错,感谢分享

@zhangdaiscott
Copy link
Member

已经修复

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

No branches or pull requests

3 participants