[Knowledge Pipeline] Code or template node fails with "[Errno -2] Name or service not known" for sandbox #20221

Closed
opened 2026-02-21 20:06:21 -05:00 by yindo · 1 comment
Owner

Originally created by @kurokobo on GitHub (Nov 9, 2025).

Originally assigned to: @crazywoola on GitHub.

Self Checks

  • I have read the Contributing Guide and Language Policy.
  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report, otherwise it will be closed.
  • 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

1.9.2

Cloud or Self Hosted

Cloud

Steps to reproduce

  1. Create a minimal Knowledge Pipeline which includes a Code node or a Template node.
    • It's okay for the code or template node to do nothing.
  2. Ensure the Test Run works without any error.
  3. Publish the pipeline.
  4. Try adding a new document.

Example pipeline to reproduce: sandbox_error_demo.txt

✔️ Expected Behavior

New document has been added to the Knowledge.

Actual Behavior

Adding document fails with following error:

Failed to execute code, which is likely a network issue, please check if the sandbox service is running. ( Error: [Errno -2] Name or service not known )

Image
Originally created by @kurokobo on GitHub (Nov 9, 2025). Originally assigned to: @crazywoola on GitHub. ### Self Checks - [x] I have read the [Contributing Guide](https://github.com/langgenius/dify/blob/main/CONTRIBUTING.md) and [Language Policy](https://github.com/langgenius/dify/issues/1542). - [x] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [x] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [x] I confirm that I am using English to submit this report, otherwise it will be closed. - [x] 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :) - [x] Please do not modify this template :) and fill in all the required fields. ### Dify version 1.9.2 ### Cloud or Self Hosted Cloud ### Steps to reproduce 1. Create a minimal Knowledge Pipeline which includes a Code node or a Template node. - It's okay for the code or template node to do nothing. 2. Ensure the Test Run works without any error. 3. Publish the pipeline. 4. Try adding a new document. Example pipeline to reproduce: [sandbox_error_demo.txt](https://github.com/user-attachments/files/23440219/sandbox_error_demo.txt) ### ✔️ Expected Behavior New document has been added to the Knowledge. ### ❌ Actual Behavior Adding document fails with following error: > Failed to execute code, which is likely a network issue, please check if the sandbox service is running. ( Error: [Errno -2] Name or service not known ) <img width="782" height="408" alt="Image" src="https://github.com/user-attachments/assets/b3454f78-9ad5-4f55-a169-6808e7d9334b" />
yindo added the 🐞 bugcloud labels 2026-02-21 20:06:21 -05:00
yindo closed this issue 2026-02-21 20:06:21 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Nov 9, 2025):

This error is a known issue in Dify Cloud v1.9.2 and is already tracked in issue #1542. The root cause is a DNS/network configuration problem with the sandbox service used for executing code or template nodes in Knowledge Pipelines. Test Runs work because they use a different environment or network path than published pipelines, which rely on the sandbox service being reachable in the production environment. When the sandbox service is misconfigured or unreachable, you get the "[Errno -2] Name or service not known" error.

For cloud deployments, this is typically a platform-side issue and not something you can fix from your end. Similar problems have been resolved by maintainers as infrastructure or configuration fixes in the past. The best course of action is to monitor the referenced issue for updates or resolution from the Dify team. If you need a workaround immediately, you may want to avoid using Code or Template nodes in published pipelines until the platform fix is deployed.

References:

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other  Chat with Dosu Join Discord Share on X

@dosubot[bot] commented on GitHub (Nov 9, 2025): <!-- Answer --> This error is a known issue in Dify Cloud v1.9.2 and is already tracked in issue #1542. The root cause is a DNS/network configuration problem with the sandbox service used for executing code or template nodes in Knowledge Pipelines. Test Runs work because they use a different environment or network path than published pipelines, which rely on the sandbox service being reachable in the production environment. When the sandbox service is misconfigured or unreachable, you get the "[Errno -2] Name or service not known" error. For cloud deployments, this is typically a platform-side issue and not something you can fix from your end. Similar problems have been resolved by maintainers as infrastructure or configuration fixes in the past. The best course of action is to monitor the referenced issue for updates or resolution from the Dify team. If you need a workaround immediately, you may want to avoid using Code or Template nodes in published pipelines until the platform fix is deployed. References: - [Issue #1542: Knowledge Pipeline fails with sandbox network error in cloud](https://github.com/langgenius/dify/issues/1542) - [Similar cloud/network sandbox issues and platform-side fixes](https://github.com/langgenius/dify/issues/19431) <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/53436506-5b8b-4b8c-8740-0871fcf8dd5e?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/53436506-5b8b-4b8c-8740-0871fcf8dd5e?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/53436506-5b8b-4b8c-8740-0871fcf8dd5e?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/53436506-5b8b-4b8c-8740-0871fcf8dd5e?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/53436506-5b8b-4b8c-8740-0871fcf8dd5e?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/53436506-5b8b-4b8c-8740-0871fcf8dd5e?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/53436506-5b8b-4b8c-8740-0871fcf8dd5e?feedback_type=other)</sup>&nbsp;&nbsp;[![Chat with Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/6088a4f4-073a-43f3-b3d4-4f06fb0c05a0/ask?utm_source=github)&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share on X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/langgenius/dify/issues/28020)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#20221