When ETL uses Unstructured as the file extraction solution, when uploading MD format files and using parent-child segmentation, an error [Errno 111] Connection refused is reported during preview #11965

Closed
opened 2026-02-21 19:05:00 -05:00 by yindo · 3 comments
Owner

Originally created by @sky121666 on GitHub (Mar 21, 2025).

Self Checks

  • 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 (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

1.1.2

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

Image
I used the custom self-deployed docker mode. When I upgraded to 1.1.2, I encountered this problem when uploading md format documents and using parent-child segment preview.
When I switched to the dify file extraction solution, there was no such problem

Image

2025-03-22 03:28:28.594 INFO [Thread-39 (process_request_thread)] [_internal.py:97] - 172.18.0.1 - - [22/Mar/2025 03:28:28] "GET /console/api/workspaces/current/default-model?model_type=rerank HTTP/1.1" 200 -
2025-03-22 03:28:28.712 INFO [Thread-42 (process_request_thread)] [_internal.py:97] - 172.18.0.1 - - [22/Mar/2025 03:28:28] "GET /console/api/workspaces/current/default-model?model_type=text-embedding HTTP/1.1" 200 -
2025-03-22 03:28:28.748 INFO [Thread-41 (process_request_thread)] [_internal.py:97] - 172.18.0.1 - - [22/Mar/2025 03:28:28] "GET /console/api/workspaces/current/models/model-types/rerank HTTP/1.1" 200 -
2025-03-22 03:28:28.783 INFO [Thread-40 (process_request_thread)] [_internal.py:97] - 172.18.0.1 - - [22/Mar/2025 03:28:28] "GET /console/api/workspaces/current/models/model-types/text-embedding HTTP/1.1" 200 -
2025-03-22 03:28:31.437 INFO [Thread-43 (process_request_thread)] [logger_hook.py:42] - Failed to process a request due to connection error - [Errno 111] Connection refused. Attempting retry number 1 after sleep.
2025-03-22 03:28:31.438 ERROR [Thread-43 (process_request_thread)] [logger_hook.py:81] - Failed to partition the document.
2025-03-22 03:28:31.438 ERROR [Thread-43 (process_request_thread)] [logger_hook.py:85] - Following error occurred - [Errno 111] Connection refused
2025-03-22 03:28:31.440 ERROR [Thread-43 (process_request_thread)] [app.py:875] - Exception on /console/api/datasets/indexing-estimate [POST]
Traceback (most recent call last):
  File "/app/api/.venv/lib/python3.12/site-packages/httpx/_transports/default.py", line 72, in map_httpcore_exceptions
    yield
  File "/app/api/.venv/lib/python3.12/site-packages/httpx/_transports/default.py", line 236, in handle_request
    resp = self._pool.handle_request(req)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/api/.venv/lib/python3.12/site-packages/httpcore/_sync/connection_pool.py", line 256, in handle_request
    raise exc from None
  File "/app/api/.venv/lib/python3.12/site-packages/httpcore/_sync/connection_pool.py", line 236, in handle_request
    response = connection.handle_request(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/api/.venv/lib/python3.12/site-packages/httpcore/_sync/connection.py", line 101, in handle_request
    raise exc
  File "/app/api/.venv/lib/python3.12/site-packages/httpcore/_sync/connection.py", line 78, in handle_request
    stream = self._connect(request)
             ^^^^^^^^^^^^^^^^^^^^^^
  File "/app/api/.venv/lib/python3.12/site-packages/httpcore/_sync/connection.py", line 124, in _connect
    stream = self._network_backend.connect_tcp(**kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/api/.venv/lib/python3.12/site-packages/httpcore/_backends/sync.py", line 207, in connect_tcp
    with map_exceptions(exc_map):
         ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/contextlib.py", line 158, in __exit__
    self.gen.throw(value)
  File "/app/api/.venv/lib/python3.12/site-packages/httpcore/_exceptions.py", line 14, in map_exceptions
    raise to_exc(exc) from exc
httpcore.ConnectError: [Errno 111] Connection refused

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/app/api/controllers/console/datasets/datasets.py", line 468, in post
    response = indexing_runner.indexing_estimate(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/api/core/indexing_runner.py", line 289, in indexing_estimate
    text_docs = index_processor.extract(extract_setting, process_rule_mode=tmp_processing_rule["mode"])
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/api/core/rag/index_processor/processor/parent_child_index_processor.py", line 23, in extract
    text_docs = ExtractProcessor.extract(
                ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/api/core/rag/extractor/extract_processor.py", line 161, in extract
    return extractor.extract()
           ^^^^^^^^^^^^^^^^^^^
  File "/app/api/core/rag/extractor/unstructured/unstructured_markdown_extractor.py", line 38, in extract
    elements = partition_via_api(filename=self._file_path, api_url=self._api_url, api_key=self._api_key)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/api/.venv/lib/python3.12/site-packages/unstructured/partition/api.py", line 127, in partition_via_api
    response = sdk.general.partition(
               ^^^^^^^^^^^^^^^^^^^^^^
  File "/app/api/.venv/lib/python3.12/site-packages/unstructured_client/general.py", line 87, in partition
    http_res = self.do_request(
               ^^^^^^^^^^^^^^^^
  File "/app/api/.venv/lib/python3.12/site-packages/unstructured_client/basesdk.py", line 262, in do_request
    http_res = do()
               ^^^^
  File "/app/api/.venv/lib/python3.12/site-packages/unstructured_client/basesdk.py", line 230, in do
    raise e
  File "/app/api/.venv/lib/python3.12/site-packages/unstructured_client/basesdk.py", line 223, in do
    http_res = client.send(req, stream=stream)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/api/.venv/lib/python3.12/site-packages/httpx/_client.py", line 926, in send
    response = self._send_handling_auth(
               ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/api/.venv/lib/python3.12/site-packages/httpx/_client.py", line 954, in _send_handling_auth
    response = self._send_handling_redirects(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/api/.venv/lib/python3.12/site-packages/httpx/_client.py", line 991, in _send_handling_redirects
    response = self._send_single_request(request)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/api/.venv/lib/python3.12/site-packages/httpx/_client.py", line 1027, in _send_single_request
    response = transport.handle_request(request)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/api/.venv/lib/python3.12/site-packages/unstructured_client/_hooks/custom/split_pdf_hook.py", line 196, in handle_request
    return self.base_transport.handle_request(request)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/api/.venv/lib/python3.12/site-packages/httpx/_transports/default.py", line 235, in handle_request
    with map_httpcore_exceptions():
         ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/contextlib.py", line 158, in __exit__
    self.gen.throw(value)
  File "/app/api/.venv/lib/python3.12/site-packages/httpx/_transports/default.py", line 89, in map_httpcore_exceptions
    raise mapped_exc(message) from exc
httpx.ConnectError: [Errno 111] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/app/api/.venv/lib/python3.12/site-packages/flask/app.py", line 917, in full_dispatch_request
    rv = self.dispatch_request()
         ^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/api/.venv/lib/python3.12/site-packages/flask/app.py", line 902, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)  # type: ignore[no-any-return]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/api/.venv/lib/python3.12/site-packages/flask_restful/__init__.py", line 489, in wrapper
    resp = resource(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/api/.venv/lib/python3.12/site-packages/flask/views.py", line 110, in view
    return current_app.ensure_sync(self.dispatch_request)(**kwargs)  # type: ignore[no-any-return]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/api/.venv/lib/python3.12/site-packages/flask_restful/__init__.py", line 604, in dispatch_request
    resp = meth(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/app/api/controllers/console/wraps.py", line 187, in decorated
    return view(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/app/api/libs/login.py", line 94, in decorated_view
    return current_app.ensure_sync(func)(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/api/controllers/console/wraps.py", line 30, in decorated
    return view(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/app/api/controllers/console/datasets/datasets.py", line 484, in post
    raise IndexingEstimateError(str(e))
controllers.console.datasets.error.IndexingEstimateError: 500 Internal Server Error: [Errno 111] Connection refused
2025-03-22 03:28:31.455 INFO [Thread-43 (process_request_thread)] [_internal.py:97] - 172.18.0.1 - - [22/Mar/2025 03:28:31] "POST /console/api/datasets/indexing-estimate HTTP/1.1" 500 -

✔️ Expected Behavior

No response

Actual Behavior

No response

Originally created by @sky121666 on GitHub (Mar 21, 2025). ### Self Checks - [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 (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [x] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [x] Please do not modify this template :) and fill in all the required fields. ### Dify version 1.1.2 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce ![Image](https://github.com/user-attachments/assets/3e737021-a741-45e7-89f9-20f6cdef2e1c) I used the custom self-deployed docker mode. When I upgraded to 1.1.2, I encountered this problem when uploading md format documents and using parent-child segment preview. When I switched to the dify file extraction solution, there was no such problem ![Image](https://github.com/user-attachments/assets/0bc09506-454b-48b8-a6e8-8b08979c4282) ``` 2025-03-22 03:28:28.594 INFO [Thread-39 (process_request_thread)] [_internal.py:97] - 172.18.0.1 - - [22/Mar/2025 03:28:28] "GET /console/api/workspaces/current/default-model?model_type=rerank HTTP/1.1" 200 - 2025-03-22 03:28:28.712 INFO [Thread-42 (process_request_thread)] [_internal.py:97] - 172.18.0.1 - - [22/Mar/2025 03:28:28] "GET /console/api/workspaces/current/default-model?model_type=text-embedding HTTP/1.1" 200 - 2025-03-22 03:28:28.748 INFO [Thread-41 (process_request_thread)] [_internal.py:97] - 172.18.0.1 - - [22/Mar/2025 03:28:28] "GET /console/api/workspaces/current/models/model-types/rerank HTTP/1.1" 200 - 2025-03-22 03:28:28.783 INFO [Thread-40 (process_request_thread)] [_internal.py:97] - 172.18.0.1 - - [22/Mar/2025 03:28:28] "GET /console/api/workspaces/current/models/model-types/text-embedding HTTP/1.1" 200 - 2025-03-22 03:28:31.437 INFO [Thread-43 (process_request_thread)] [logger_hook.py:42] - Failed to process a request due to connection error - [Errno 111] Connection refused. Attempting retry number 1 after sleep. 2025-03-22 03:28:31.438 ERROR [Thread-43 (process_request_thread)] [logger_hook.py:81] - Failed to partition the document. 2025-03-22 03:28:31.438 ERROR [Thread-43 (process_request_thread)] [logger_hook.py:85] - Following error occurred - [Errno 111] Connection refused 2025-03-22 03:28:31.440 ERROR [Thread-43 (process_request_thread)] [app.py:875] - Exception on /console/api/datasets/indexing-estimate [POST] Traceback (most recent call last): File "/app/api/.venv/lib/python3.12/site-packages/httpx/_transports/default.py", line 72, in map_httpcore_exceptions yield File "/app/api/.venv/lib/python3.12/site-packages/httpx/_transports/default.py", line 236, in handle_request resp = self._pool.handle_request(req) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/httpcore/_sync/connection_pool.py", line 256, in handle_request raise exc from None File "/app/api/.venv/lib/python3.12/site-packages/httpcore/_sync/connection_pool.py", line 236, in handle_request response = connection.handle_request( ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/httpcore/_sync/connection.py", line 101, in handle_request raise exc File "/app/api/.venv/lib/python3.12/site-packages/httpcore/_sync/connection.py", line 78, in handle_request stream = self._connect(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/httpcore/_sync/connection.py", line 124, in _connect stream = self._network_backend.connect_tcp(**kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/httpcore/_backends/sync.py", line 207, in connect_tcp with map_exceptions(exc_map): ^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/contextlib.py", line 158, in __exit__ self.gen.throw(value) File "/app/api/.venv/lib/python3.12/site-packages/httpcore/_exceptions.py", line 14, in map_exceptions raise to_exc(exc) from exc httpcore.ConnectError: [Errno 111] Connection refused The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/app/api/controllers/console/datasets/datasets.py", line 468, in post response = indexing_runner.indexing_estimate( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/core/indexing_runner.py", line 289, in indexing_estimate text_docs = index_processor.extract(extract_setting, process_rule_mode=tmp_processing_rule["mode"]) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/core/rag/index_processor/processor/parent_child_index_processor.py", line 23, in extract text_docs = ExtractProcessor.extract( ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/core/rag/extractor/extract_processor.py", line 161, in extract return extractor.extract() ^^^^^^^^^^^^^^^^^^^ File "/app/api/core/rag/extractor/unstructured/unstructured_markdown_extractor.py", line 38, in extract elements = partition_via_api(filename=self._file_path, api_url=self._api_url, api_key=self._api_key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/unstructured/partition/api.py", line 127, in partition_via_api response = sdk.general.partition( ^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/unstructured_client/general.py", line 87, in partition http_res = self.do_request( ^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/unstructured_client/basesdk.py", line 262, in do_request http_res = do() ^^^^ File "/app/api/.venv/lib/python3.12/site-packages/unstructured_client/basesdk.py", line 230, in do raise e File "/app/api/.venv/lib/python3.12/site-packages/unstructured_client/basesdk.py", line 223, in do http_res = client.send(req, stream=stream) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/httpx/_client.py", line 926, in send response = self._send_handling_auth( ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/httpx/_client.py", line 954, in _send_handling_auth response = self._send_handling_redirects( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/httpx/_client.py", line 991, in _send_handling_redirects response = self._send_single_request(request) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/httpx/_client.py", line 1027, in _send_single_request response = transport.handle_request(request) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/unstructured_client/_hooks/custom/split_pdf_hook.py", line 196, in handle_request return self.base_transport.handle_request(request) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/httpx/_transports/default.py", line 235, in handle_request with map_httpcore_exceptions(): ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/contextlib.py", line 158, in __exit__ self.gen.throw(value) File "/app/api/.venv/lib/python3.12/site-packages/httpx/_transports/default.py", line 89, in map_httpcore_exceptions raise mapped_exc(message) from exc httpx.ConnectError: [Errno 111] Connection refused During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/app/api/.venv/lib/python3.12/site-packages/flask/app.py", line 917, in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/flask/app.py", line 902, in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/flask_restful/__init__.py", line 489, in wrapper resp = resource(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/flask/views.py", line 110, in view return current_app.ensure_sync(self.dispatch_request)(**kwargs) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/flask_restful/__init__.py", line 604, in dispatch_request resp = meth(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/app/api/controllers/console/wraps.py", line 187, in decorated return view(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/app/api/libs/login.py", line 94, in decorated_view return current_app.ensure_sync(func)(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/controllers/console/wraps.py", line 30, in decorated return view(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/app/api/controllers/console/datasets/datasets.py", line 484, in post raise IndexingEstimateError(str(e)) controllers.console.datasets.error.IndexingEstimateError: 500 Internal Server Error: [Errno 111] Connection refused 2025-03-22 03:28:31.455 INFO [Thread-43 (process_request_thread)] [_internal.py:97] - 172.18.0.1 - - [22/Mar/2025 03:28:31] "POST /console/api/datasets/indexing-estimate HTTP/1.1" 500 - ``` ### ✔️ Expected Behavior _No response_ ### ❌ Actual Behavior _No response_
yindo closed this issue 2026-02-21 19:05:00 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Mar 21, 2025):

I found a similar unsolved discussion titled Node Code run failed, which was last updated on September 3, 2024 [1].

Regarding the "[Errno 111] Connection refused" error in a Docker-based self-hosted environment, this issue can often be caused by missing or incorrect configuration settings. In the context of Dify, this error might occur due to a missing CELERY_BROKER_URL environment variable. Ensure that this variable is properly configured in your Docker environment to specify the correct RabbitMQ connection string [2].

Additionally, when dealing with OpenAI-API-compatible models in a self-hosted Dify Docker setup, replace '127.0.0.1' with 'host.docker.internal' in your configuration. The full URL should be 'http://host.docker.internal:10000/v1/chat/completions'. If system proxy environment variables are set, you may need to unset them using:

unset HTTP_PROXY
unset HTTPS_PROXY

[3].

After upgrading to Dify 0.14.0, ensure that SANDBOX_ENABLE_NETWORK is set to true and configure the required sandbox environment variables. Verify that the sandbox service is properly connected to the Docker network and that both the web interface and sandbox service are on the same Docker network [4].

If you encounter a Server Unavailable Error after upgrading, replace 'localhost' or '127.0.0.1' with 'host.docker.internal' in your Dify configuration for the service [5].

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other

@dosubot[bot] commented on GitHub (Mar 21, 2025): <!-- Answer --> I found a similar unsolved discussion titled [Node Code run failed](https://github.com/langgenius/dify/discussions/7902), which was last updated on September 3, 2024 <sup>[[1]](https://github.com/langgenius/dify/discussions/7902)</sup>. Regarding the "[Errno 111] Connection refused" error in a Docker-based self-hosted environment, this issue can often be caused by missing or incorrect configuration settings. In the context of Dify, this error might occur due to a missing `CELERY_BROKER_URL` environment variable. Ensure that this variable is properly configured in your Docker environment to specify the correct RabbitMQ connection string <sup>[[2]](https://github.com/langgenius/dify/issues/14810)</sup>. Additionally, when dealing with OpenAI-API-compatible models in a self-hosted Dify Docker setup, replace '127.0.0.1' with 'host.docker.internal' in your configuration. The full URL should be 'http://host.docker.internal:10000/v1/chat/completions'. If system proxy environment variables are set, you may need to unset them using: ```bash unset HTTP_PROXY unset HTTPS_PROXY ``` <sup>[[3]](https://github.com/langgenius/dify/issues/14011)</sup>. After upgrading to Dify 0.14.0, ensure that `SANDBOX_ENABLE_NETWORK` is set to true and configure the required sandbox environment variables. Verify that the sandbox service is properly connected to the Docker network and that both the web interface and sandbox service are on the same Docker network <sup>[[4]](https://github.com/langgenius/dify/issues/11736)</sup>. If you encounter a Server Unavailable Error after upgrading, replace 'localhost' or '127.0.0.1' with 'host.docker.internal' in your Dify configuration for the service <sup>[[5]](https://github.com/langgenius/dify/issues/11739)</sup>. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.* --- <sup>Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/5175d404-a1f1-42c7-954f-a2641317c6d5?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/5175d404-a1f1-42c7-954f-a2641317c6d5?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/5175d404-a1f1-42c7-954f-a2641317c6d5?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/5175d404-a1f1-42c7-954f-a2641317c6d5?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/5175d404-a1f1-42c7-954f-a2641317c6d5?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/5175d404-a1f1-42c7-954f-a2641317c6d5?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/5175d404-a1f1-42c7-954f-a2641317c6d5?feedback_type=other)</sup>
Author
Owner

@sky121666 commented on GitHub (Mar 21, 2025):

I found a similar unsolved discussion titled Node Code run failed, which was last updated on September 3, 2024 [1].

Regarding the "[Errno 111] Connection refused" error in a Docker-based self-hosted environment, this issue can often be caused by missing or incorrect configuration settings. In the context of Dify, this error might occur due to a missing CELERY_BROKER_URL environment variable. Ensure that this variable is properly configured in your Docker environment to specify the correct RabbitMQ connection string [2].

Additionally, when dealing with OpenAI-API-compatible models in a self-hosted Dify Docker setup, replace '127.0.0.1' with 'host.docker.internal' in your configuration. The full URL should be 'http://host.docker.internal:10000/v1/chat/completions'. If system proxy environment variables are set, you may need to unset them using:

unset HTTP_PROXY
unset HTTPS_PROXY
[3].

After upgrading to Dify 0.14.0, ensure that SANDBOX_ENABLE_NETWORK is set to true and configure the required sandbox environment variables. Verify that the sandbox service is properly connected to the Docker network and that both the web interface and sandbox service are on the same Docker network [4].

If you encounter a Server Unavailable Error after upgrading, replace 'localhost' or '127.0.0.1' with 'host.docker.internal' in your Dify configuration for the service [5].

To continue talking to Dosu, mention @dosu.

Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other

This problem is different from the one I encountered. The formats I mainly use are doc and md. When using the doc format, this error does not appear, but this error will be reported when using the md format. I think this has nothing to do with redis?

@sky121666 commented on GitHub (Mar 21, 2025): > I found a similar unsolved discussion titled [Node Code run failed](https://github.com/langgenius/dify/discussions/7902), which was last updated on September 3, 2024 [[1]](https://github.com/langgenius/dify/discussions/7902). > > Regarding the "[Errno 111] Connection refused" error in a Docker-based self-hosted environment, this issue can often be caused by missing or incorrect configuration settings. In the context of Dify, this error might occur due to a missing `CELERY_BROKER_URL` environment variable. Ensure that this variable is properly configured in your Docker environment to specify the correct RabbitMQ connection string [[2]](https://github.com/langgenius/dify/issues/14810). > > Additionally, when dealing with OpenAI-API-compatible models in a self-hosted Dify Docker setup, replace '127.0.0.1' with 'host.docker.internal' in your configuration. The full URL should be 'http://host.docker.internal:10000/v1/chat/completions'. If system proxy environment variables are set, you may need to unset them using: > > unset HTTP_PROXY > unset HTTPS_PROXY > [[3]](https://github.com/langgenius/dify/issues/14011). > > After upgrading to Dify 0.14.0, ensure that `SANDBOX_ENABLE_NETWORK` is set to true and configure the required sandbox environment variables. Verify that the sandbox service is properly connected to the Docker network and that both the web interface and sandbox service are on the same Docker network [[4]](https://github.com/langgenius/dify/issues/11736). > > If you encounter a Server Unavailable Error after upgrading, replace 'localhost' or '127.0.0.1' with 'host.docker.internal' in your Dify configuration for the service [[5]](https://github.com/langgenius/dify/issues/11739). > > _To continue talking to [Dosu](https://dosu.dev), mention [@dosu](https://github.com/dosu)._ > > Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/5175d404-a1f1-42c7-954f-a2641317c6d5?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/5175d404-a1f1-42c7-954f-a2641317c6d5?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/5175d404-a1f1-42c7-954f-a2641317c6d5?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/5175d404-a1f1-42c7-954f-a2641317c6d5?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/5175d404-a1f1-42c7-954f-a2641317c6d5?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/5175d404-a1f1-42c7-954f-a2641317c6d5?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/5175d404-a1f1-42c7-954f-a2641317c6d5?feedback_type=other) This problem is different from the one I encountered. The formats I mainly use are doc and md. When using the doc format, this error does not appear, but this error will be reported when using the md format. I think this has nothing to do with redis?
Author
Owner

@crazywoola commented on GitHub (Mar 22, 2025):

Please make sure the unstructure url is allowed in squid.conf.

@crazywoola commented on GitHub (Mar 22, 2025): Please make sure the unstructure url is allowed in squid.conf.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#11965