mirror of
https://github.com/langgenius/dify-official-plugins.git
synced 2026-07-21 17:45:23 -04:00
The MinerU node reports a connection timeout, but the plugin can set the Base URL and Server Type to Local. #825
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @one-leaf on GitHub (Nov 21, 2025).
Self Checks
Dify version
1.10.0
Plugin version
0.5.1
Cloud or Self Hosted
Self Hosted (Docker)
Steps to reproduce
After uploading the file, the following was returned:
An error occurred in the langgenius/mineru/mineru, please contact the author of langgenius/mineru/mineru for help, error type: ConnectTimeout, error details: timed out
I have already set the following in .env:
HTTP_REQUEST_MAX_CONNECT_TIMEOUT=300
HTTP_REQUEST_MAX_READ_TIMEOUT=600
HTTP_REQUEST_MAX_WRITE_TIMEOUT=600
✔️ Error log
ERROR [GraphWorker-0] [base.py:277] - Error in stream response for plugin {'code': -500, 'message': '{"message":"{\"args\":{},\"error_type\":\"ConnectTimeout\",\"message\":\"timed out\"}","error_type":"PluginInvokeError","args":null}', 'data': None}
@dosubot[bot] commented on GitHub (Nov 21, 2025):
Hi @one-leaf! I'm Dosu and I’m helping the dify-official-plugins team.
The ConnectTimeout error in the MinerU plugin (Dify 1.10.0, plugin 0.5.1, Docker) is most often caused by Docker network misconfiguration or hardcoded timeout values in the plugin code. Even if you set high timeout values in
.env, the plugin may still use a fixed timeout unless you update it in the plugin's Python code and rebuild the container. For local communication, make sure the Base URL is set to an address accessible from the Dify container—avoidlocalhostunless the service runs in the same container; usehost.docker.internal, the host's LAN IP, or the Docker service name instead. All containers must be on the same Docker network and have correct port exposure.To troubleshoot: check that the MinerU service is running and reachable from inside the Dify container (try
curlorpingfrom the container), review Docker logs forapi,worker, andplugin_daemon(setLOG_LEVEL=DEBUGandENABLE_REQUEST_LOGGING=Truefor more detail), and confirm there are no hardcoded timeouts in the plugin code. After changing any environment variables or network settings, restart your containers for changes to take effect. More details and similar cases are discussed here, here, and here.To reply, just mention @dosu.
How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other

@one-leaf commented on GitHub (Nov 21, 2025):
MinerU and Dify are not on the same server, so I can access MinerU’s API URL from Dify’s Docker container using curl. Moreover, MinerU’s plugin can also correctly configure its base URL. @dosu
api-1 | 2025-11-21 12:35:04.475 INFO [GraphDispatcher] [debug_logging.py:157] - ▶️ Node started: 1763702936618 - "Parse File" (type: tool)
plugin_daemon-1 | [GIN] 2025/11/21 - 12:35:04 | 200 | 1.748247ms | 192.168.32.9 | GET "/plugin/c21daaff-a3dd-4e42-8c1a-1fc5162e9c60/management/tool?provider=mineru&plugin_id=langgenius%2Fmineru"
api-1 | 2025-11-21 12:35:04.478 INFO [GraphWorker-0] [_client.py:1038] - HTTP Request: GET http://plugin_daemon:5002/plugin/c21daaff-a3dd-4e42-8c1a-1fc5162e9c60/management/tool?provider=mineru&plugin_id=langgenius%2Fmineru "HTTP/1.1 200 OK"
sandbox-1 | [GIN] 2025/11/21 - 12:35:06 | 200 | 80.008µs | 127.0.0.1 | GET "/health"
plugin_daemon-1 | [GIN] 2025/11/21 - 12:35:09 | 200 | 5.092558394s | 192.168.32.9 | POST "/plugin/c21daaff-a3dd-4e42-8c1a-1fc5162e9c60/dispatch/tool/invoke"
api-1 |
api-1 | [on_tool_start] ToolCall:parse-file
api-1 | {'file': File(dify_model_identity='dify__file', id=None, tenant_id='c21daaff-a3dd-4e42-8c1a-1fc5162e9c60', type=<FileType.DOCUMENT: 'document'>, transfer_method=<FileTransferMethod.LOCAL_FILE: 'local_file'>, remote_url='http://192.168.3.16:480/files/8a4bfd9a-86ef-482a-8249-94331b10af8a/file-preview?timestamp=1763728503&nonce=923712630442e8e1b1f896ab98810abc&sign=sfI2cVSLfbK-8j4fg_KpZM5GTfh4X72aLZbyd8YUvnc%3D', related_id='8a4bfd9a-86ef-482a-8249-94331b10af8a', filename='SZLU6012470 2.pdf', extension='.pdf', mime_type='application/pdf', size=326788)}
api-1 | 2025-11-21 12:35:09.624 INFO [GraphWorker-0] [_client.py:1038] - HTTP Request: POST http://plugin_daemon:5002/plugin/c21daaff-a3dd-4e42-8c1a-1fc5162e9c60/dispatch/tool/invoke "HTTP/1.1 200 OK"
api-1 | 2025-11-21 12:35:09.631 ERROR [GraphWorker-0] [base.py:277] - Error in stream response for plugin {'code': -500, 'message': '{"message":"{\"args\":{},\"error_type\":\"ConnectTimeout\",\"message\":\"timed out\"}","error_type":"PluginInvokeError","args":null}', 'data': None}
api-1 | 2025-11-21 12:35:09.717 DEBUG [GraphDispatcher] [debug_logging.py:187] - 📝 Stream chunk from 1763702936618 (FINAL): An error occurred in the langgenius/mineru/mineru, please contact the author of langgenius/mineru/mineru for help, error type: ConnectTimeout, error details: timed out
api-1 | 2025-11-21 12:35:09.719 WARNING [GraphDispatcher] [debug_logging.py:181] - ⚠️ Node exception handled: 1763702936618
api-1 | 2025-11-21 12:35:09.720 WARNING [GraphDispatcher] [debug_logging.py:182] - Error: An error occurred in the langgenius/mineru/mineru, please contact the author of langgenius/mineru/mineru for help, error type: ConnectTimeout, error details: timed out
@dosubot[bot] commented on GitHub (Nov 21, 2025):
The ConnectTimeout error is likely caused by a hardcoded timeout in the MinerU plugin code, not by your .env settings. The plugin sets MAX_REQUEST_TIMEOUT=120 seconds directly in its code, so if file parsing takes longer than this, you'll get a timeout even if your environment variables are higher. The plugin also uses a 10-second timeout for server validation and does not set explicit timeouts for the main file parsing requests, relying on the default behavior of the requests library (which is no timeout, but the plugin daemon itself enforces the 120s limit) [source].
To resolve this, increase the MAX_REQUEST_TIMEOUT value in tools/mineru/main.py, rebuild the plugin container, and redeploy. Also, check MinerU server logs to see if the file parsing is slow or failing, since the file is sent directly in the POST body and MinerU does not fetch it from Dify. This should help you avoid the ConnectTimeout and identify any server-side issues.
To reply, just mention @dosu.
How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other

@one-leaf commented on GitHub (Nov 21, 2025):
You can see in the logs that from the start of the call to the error took only 5 seconds, which should not be related to MAX_REQUEST_TIMEOUT = 120.
@one-leaf commented on GitHub (Nov 28, 2025):
I’ve found a solution—just set FILES_URL=http://nginx