Skip to content

fox#13565 Optimize error logs for MCP server not found scenario#13584

Merged
KomachiSion merged 1 commit intoalibaba:developfrom
weyuhui110:patch-1
Jul 4, 2025
Merged

fox#13565 Optimize error logs for MCP server not found scenario#13584
KomachiSion merged 1 commit intoalibaba:developfrom
weyuhui110:patch-1

Conversation

@weyuhui110
Copy link
Contributor

Purpose of the Change
Improve clarity and diagnostic value of error logs when MCP server version information is not found. The original error message was ambiguous and contained formatting issues, making debugging difficult.

 optimize error logs
@CLAassistant
Copy link

CLAassistant commented Jul 2, 2025

CLA assistant check
All committers have signed the CLA.

@lingma-agents
Copy link

lingma-agents bot commented Jul 2, 2025

优化MCP服务器未找到场景的错误日志信息

变更概述

问题修复

  • 受影响组件: McpServerOperationService.java
  • 功能描述: 当MCP服务器版本信息未找到时,优化错误日志的输出格式,增强诊断能力
  • 实现细节:
    • 将错误信息从 mcp server %s not found 改为 Mcp server [ID: %s] not found in namespace [%s]. Response: %s
    • 新增服务器ID、命名空间ID和响应内容的结构化输出
  • 变更目的: 通过补充上下文信息(命名空间、响应详情),帮助运维快速定位问题根源,提升系统可观测性
变更文件
文件路径 变更说明
ai/​src/​main/​java/​com/​alibaba/​nacos/​ai/​service/​McpServerOperationService.​java 优化错误日志信息,包含服务器ID、命名空间及响应详情

💡 小贴士

与 lingma-agents 交流的方式

📜 直接回复评论
直接回复本条评论,lingma-agents 将自动处理您的请求。例如:

  • 在当前代码中添加详细的注释说明。

  • 请详细介绍一下你说的 LRU 改造方案,并使用伪代码加以说明。

📜 在代码行处标记
在文件的特定位置创建评论并 @lingma-agents。例如:

  • @lingma-agents 分析这个方法的性能瓶颈并提供优化建议。

  • @lingma-agents 对这个方法生成优化代码。

📜 在讨论中提问
在任何讨论中 @lingma-agents 来获取帮助。例如:

  • @lingma-agents 请总结上述讨论并提出解决方案。

  • @lingma-agents 请根据讨论内容生成优化代码。

@github-actions
Copy link

github-actions bot commented Jul 2, 2025

Thanks for your this PR. 🙏
Please check again for your PR changes whether contains any usage/api/configuration change such as Add new API , Add new configuration, Change default value of configuration.
If so, please add or update documents(markdown type) in docs/next/ for repository nacos-group/nacos-group.github.io


感谢您提交的PR。 🙏
请再次查看您的PR内容,确认是否包含任何使用方式/API/配置参数的变更,如:新增API新增配置参数修改默认配置等操作。
如果是,请确保在提交之前,在仓库nacos-group/nacos-group.github.io中的docs/next/目录下添加或更新文档(markdown格式)。

@KomachiSion
Copy link
Collaborator

Please sign cla first

@weyuhui110
Copy link
Contributor Author

weyuhui110 commented Jul 3, 2025

Please sign cla first

I have signed the CLA. thanks!

@KomachiSion KomachiSion added kind/enhancement Category issues or prs related to enhancement. area/MCP labels Jul 3, 2025
@KomachiSion KomachiSion added this to the 3.0.3 milestone Jul 3, 2025
@wuyfee
Copy link

wuyfee commented Jul 3, 2025

$\color{red}{FAILURE}$
DETAILS
✅ - docker: success
❌ - deploy (standalone & cluster & standalone_auth): failure
❌ - e2e-java-test (standalone & cluster & standalone_auth): skipped
❌ - e2e-go-test (standalone & cluster): skipped
❌ - e2e-cpp-test (standalone & cluster): skipped
❌ - e2e-csharp-test (standalone & cluster): skipped
❌ - e2e-nodejs-test (standalone & cluster): skipped
❌ - e2e-python-test (standalone & cluster): skipped
✅ - clean (standalone & cluster & standalone_auth): success

@KomachiSion KomachiSion merged commit 4deca7c into alibaba:develop Jul 4, 2025
5 checks passed
@KomachiSion
Copy link
Collaborator

@weyuhui110 Thanks for your contribution
Would you mind provide dingtalk number, nacos comunity want to invite you join contributor group.

@KomachiSion KomachiSion linked an issue Jul 4, 2025 that may be closed by this pull request
@weyuhui110
Copy link
Contributor Author

@weyuhui110 Thanks for your contribution Would you mind provide dingtalk number, nacos comunity want to invite you join contributor group.
Thank you for the invitation! Sure, my DingTalk number is weyuhui110. Happy to join the contributor group! 😊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/MCP kind/enhancement Category issues or prs related to enhancement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

nacos 3.0.1 持续类似NPE错误,没有任何堆栈信息

4 participants