Skip to content

Fix mcp server startup failure #7329

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

Merged
merged 7 commits into from
Apr 27, 2025

Conversation

yiminghub2024
Copy link
Contributor

@yiminghub2024 yiminghub2024 commented Apr 25, 2025

What problem does this PR solve?

0.18.0 mcp server can not start with upgrade from 0.17.2 or new install except rebuild all docker

Close #7321

mcp server can not start auto from docker :
2025-04-25 17:30:44,512 INFO 25 task_executor_2a9f3e2de99a_0 reported heartbeat: {"name": "task_executor_2a9f3e2de99a_0", "now": "2025-04-25T17:30:44.509+08:00", "boot_at": "2025-04-25T16:43:33.038+08:00", "pending": 0, "lag": 0, "done": 0, "failed": 0, "current": {}}
usage: server.py [-h] [--base_url BASE_URL] [--host HOST] [--port PORT]
[--mode MODE] [--api_key API_KEY]
server.py: error: unrecognized arguments:

problem:
server.py in docker start arguments not correct , so mcp server start fail
reason:

1. docker-copose.yaml
     example  - --mcp-host-api-key="ragflow-12345678" is wrong.  do not add "" to key or it says:"api-key wrong"
2.docker file  entrypoint.sh  can not translate config to exec command , we need mapping file from host to docker
     - ./entrypoint.sh:/ragflow/entrypoint.sh
3.just add one code raw fix all probelm 

Type of change

  • Bug Fix (non-breaking change which fixes an issue)
  • Documentation Update
  • Performance Improvement

fix  mcp server can not auto start or upgrade
@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. 🐞 bug Something isn't working, pull request that fix bug. 📖 documentation Improvements or additions to documentation labels Apr 25, 2025
@yingfeng yingfeng changed the title Yiminghub2024 patch 2 Fix mcp server startup failure Apr 26, 2025
@yingfeng yingfeng requested a review from yongtenglei April 26, 2025 01:10
@yingfeng yingfeng added the ci Continue Integration label Apr 26, 2025
@yingfeng
Copy link
Member

CI failed
https://github.com/infiniflow/ragflow/actions/runs/14676136205/job/41192606679?pr=7329

Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: exec: "./entrypoint.sh": permission denied: unknown

@yiminghub2024
Copy link
Contributor Author

[tests / ragflow_tests need chmod +X docker/entrypoint.sh

CI failed https://github.com/infiniflow/ragflow/actions/runs/14676136205/job/41192606679?pr=7329

Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: exec: "./entrypoint.sh": permission denied: unknown

file docker/entrypoint.sh need chmod +X ,then test again ~

add docker/entrypoint.sh exec
Copy link
Contributor Author

@yiminghub2024 yiminghub2024 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

chmod + x for docker/entrypoint.sh

@dosubot dosubot bot added size:S This PR changes 10-29 lines, ignoring generated files. and removed size:M This PR changes 30-99 lines, ignoring generated files. labels Apr 26, 2025
@yingfeng yingfeng added ci Continue Integration and removed ci Continue Integration labels Apr 26, 2025
Copy link
Contributor

@yongtenglei yongtenglei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I said that - ./entrypoint.sh:/ragflow/entrypoint.sh is ​​not​​ necessary because every time we ​​build the image​​ (via the Dockerfile), the entrypoint script is ​​automatically handled​​. However, ​​adding this line to docker-compose.yml​​ does exactly ​​enhance the flexibility​​, as we ​​no longer need to rebuild the image​​ every time if we only modify some arguments. Thank you!

@yingfeng yingfeng added ci Continue Integration and removed ci Continue Integration labels Apr 26, 2025
Copy link
Contributor Author

@yiminghub2024 yiminghub2024 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good

@KevinHuSh
Copy link
Collaborator

I don't quite follow. Why do we need to mount entrypiont.sh into container while we have this file already in the docker image?

@KevinHuSh KevinHuSh closed this Apr 27, 2025
@KevinHuSh KevinHuSh reopened this Apr 27, 2025
@yiminghub2024
Copy link
Contributor Author

yiminghub2024 commented Apr 27, 2025 via email

@yiminghub2024
Copy link
Contributor Author

yiminghub2024 commented Apr 27, 2025 via email

@KevinHuSh KevinHuSh merged commit 1aa9760 into infiniflow:main Apr 27, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working, pull request that fix bug. ci Continue Integration 📖 documentation Improvements or additions to documentation size:S This PR changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: mcp server start fail
4 participants