apolloconfig / apollo

Apollo is a reliable configuration management system suitable for microservice configuration management scenarios.
https://www.apolloconfig.com
Apache License 2.0
28.95k stars 10.19k forks source link

1.5.1版本添加配置时报‘更新配置502’ #5047

Closed LaoWei0 closed 5 months ago

LaoWei0 commented 6 months ago

描述bug 1.5.1版本添加配置时报‘更新失败Code:502’ 前提:有个项目配置了一个全局配置项spring.datasource.url=jdbc... 再在application.properties下添加spring.datasource.url=jdbc...时报‘‘更新配置502’’ 如果配置‘spring.datasource.url=dbc...’(少一个j)时,可正常更新配置。

复现

通过如下步骤可以复现:

期望

简介明了地描述你希望正常情况下应该发生什么

截图 不同电脑登陆报不同结果:mac系统操作报:‘更新失败 您的登陆信息已过期,请重新登陆后重试’

windows电脑操作报:‘更新失败Code:502’,一下日志为window系统操作时报的

额外的细节和日志

dosubot[bot] commented 6 months ago

🤖

Hello @LaoWei0! I'm Dosu, a friendly bot here to assist you while we wait for a human maintainer to step in. I can help with bugs, answer questions, and guide you towards becoming a contributor. I'm here to help, so don't hesitate to ask anything!

根据我在Apollo仓库中的查找,我发现了一个类似的已解决问题:Apollo 1.9.1无法修改配置,提示“您的登录信息已过期,请刷新页面后重试”。这个问题的建议解决方案是:"我认为这与用户会话有关,而不是配置项,请参考如何启用会话共享来启用会话共享。"

在Apollo 1.5.1版本中,可能导致添加配置时出现'更新失败Code:502'错误的更改与ApolloConfigDB中的App表的更改有关。具体来说,删除了索引NAME,并在App表的Name列上创建了新的索引IX_NAME。如果新的索引IX_NAME没有正确创建,或者App表中的Name列有任何问题,例如,如果Name列中有任何违反新索引唯一性的重复条目,可能会导致此错误。

这是相关的SQL代码:

Use ApolloConfigDB;

ALTER TABLE `App` DROP INDEX `NAME`;
CREATE INDEX `IX_NAME` ON App (`Name`(191));

请确保App表中的Name列不包含任何重复条目,并且新的索引IX_NAME已正确创建。

至于Apollo 1.5.1版本中是否有任何已知的问题或错误可能导致'更新失败Code:502'错误,我在仓库中没有找到答案,但答案可能在其他地方可用,或者我可能错过了。

如果您能提供更多关于此问题的信息,例如复现步骤,我可能能更好地帮助您解决这个问题。

Sources


This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.

Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.

If you want to continue the conversation, start your reply with @dosu-bot.

nobodyiam commented 6 months ago

看一下 apollo-adminservice 的日志

stale[bot] commented 5 months ago

This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in 7 days unless it is tagged "help wanted" or other activity occurs. Thank you for your contributions.

stale[bot] commented 5 months ago

This issue has been automatically closed because it has not had activity in the last 7 days. If this issue is still valid, please ping a maintainer and ask them to label it as "help wanted". Thank you for your contributions.