In step 2 of creating a knowledge base, click the "Save and Process" button to report an error in the dify-backend log #14590

Closed
opened 2026-02-21 19:17:56 -05:00 by yindo · 2 comments
Owner

Originally created by @woshiwuxiaofei on GitHub (Jun 12, 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

0.15.3

Cloud or Self Hosted

Self Hosted (Source)

Steps to reproduce

Image

点击按钮后,后台报错:

2025-06-13 02:08:29,231 ERROR [app.py:875] fedf06590d Exception on /console/api/datasets/init [POST]
Traceback (most recent call last):
  File "/home/admin/virtualenv/lib/python3.12/site-packages/kombu/utils/functional.py", line 32, in __call__
    return self.__value__
           ^^^^^^^^^^^^^^
AttributeError: 'ChannelPromise' object has no attribute '__value__'. Did you mean: '__call__'?

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/admin/virtualenv/lib/python3.12/site-packages/kombu/transport/virtual/base.py", line 951, in create_channel
    return self._avail_channels.pop()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
IndexError: pop from empty list

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/admin/virtualenv/lib/python3.12/site-packages/redis/connection.py", line 277, in connect
    sock = self.retry.call_with_retry(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/admin/virtualenv/lib/python3.12/site-packages/redis/retry.py", line 62, in call_with_retry
    return do()
           ^^^^
  File "/home/admin/virtualenv/lib/python3.12/site-packages/redis/connection.py", line 278, in <lambda>
    lambda: self._connect(), lambda error: self.disconnect(error)
            ^^^^^^^^^^^^^^^
  File "/home/admin/virtualenv/lib/python3.12/site-packages/redis/connection.py", line 639, in _connect
    raise err
  File "/home/admin/virtualenv/lib/python3.12/site-packages/redis/connection.py", line 627, in _connect
    sock.connect(socket_address)
ConnectionRefusedError: [Errno 111] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/admin/virtualenv/lib/python3.12/site-packages/kombu/connection.py", line 472, in _reraise_as_library_errors
    yield
  File "/home/admin/virtualenv/lib/python3.12/site-packages/kombu/connection.py", line 459, in _ensure_connection
    return retry_over_time(
           ^^^^^^^^^^^^^^^^
  File "/home/admin/virtualenv/lib/python3.12/site-packages/kombu/utils/functional.py", line 318, in retry_over_time
    return fun(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^
  File "/home/admin/virtualenv/lib/python3.12/site-packages/kombu/connection.py", line 938, in _connection_factory
    self._connection = self._establish_connection()
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/admin/virtualenv/lib/python3.12/site-packages/kombu/connection.py", line 860, in _establish_connection
    conn = self.transport.establish_connection()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/admin/virtualenv/lib/python3.12/site-packages/kombu/transport/virtual/base.py", line 975, in establish_connection
    self._avail_channels.append(self.create_channel(self))
                                ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/admin/virtualenv/lib/python3.12/site-packages/kombu/transport/virtual/base.py", line 953, in create_channel
    channel = self.Channel(connection)
              ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/admin/virtualenv/lib/python3.12/site-packages/kombu/transport/redis.py", line 751, in __init__
    self.client.ping()
  File "/home/admin/virtualenv/lib/python3.12/site-packages/redis/commands/core.py", line 1208, in ping
    return self.execute_command("PING", **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/admin/virtualenv/lib/python3.12/site-packages/kombu/transport/redis.py", line 259, in execute_command
    return super().execute_command(*self._prefix_args(args), **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/admin/virtualenv/lib/python3.12/site-packages/redis/client.py", line 545, in execute_command
    conn = self.connection or pool.get_connection(command_name, **options)
                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/admin/virtualenv/lib/python3.12/site-packages/redis/connection.py", line 1074, in get_connection
    connection.connect()
  File "/home/admin/virtualenv/lib/python3.12/site-packages/redis/connection.py", line 283, in connect
    raise ConnectionError(self._error_message(e))
redis.exceptions.ConnectionError: Error 111 connecting to localhost:6379. Connection refused.

但是redis配置连接确认是对的,不然不会有其他接口产生的token信息

✔️ Expected Behavior

who can help me solve this issue, thanks greatefully!

Actual Behavior

No response

Originally created by @woshiwuxiaofei on GitHub (Jun 12, 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 0.15.3 ### Cloud or Self Hosted Self Hosted (Source) ### Steps to reproduce ![Image](https://github.com/user-attachments/assets/acc4833f-a17b-497b-81e3-ab3bd76a80a9) 点击按钮后,后台报错: ``` 2025-06-13 02:08:29,231 ERROR [app.py:875] fedf06590d Exception on /console/api/datasets/init [POST] Traceback (most recent call last): File "/home/admin/virtualenv/lib/python3.12/site-packages/kombu/utils/functional.py", line 32, in __call__ return self.__value__ ^^^^^^^^^^^^^^ AttributeError: 'ChannelPromise' object has no attribute '__value__'. Did you mean: '__call__'? During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/admin/virtualenv/lib/python3.12/site-packages/kombu/transport/virtual/base.py", line 951, in create_channel return self._avail_channels.pop() ^^^^^^^^^^^^^^^^^^^^^^^^^^ IndexError: pop from empty list During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/admin/virtualenv/lib/python3.12/site-packages/redis/connection.py", line 277, in connect sock = self.retry.call_with_retry( ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/admin/virtualenv/lib/python3.12/site-packages/redis/retry.py", line 62, in call_with_retry return do() ^^^^ File "/home/admin/virtualenv/lib/python3.12/site-packages/redis/connection.py", line 278, in <lambda> lambda: self._connect(), lambda error: self.disconnect(error) ^^^^^^^^^^^^^^^ File "/home/admin/virtualenv/lib/python3.12/site-packages/redis/connection.py", line 639, in _connect raise err File "/home/admin/virtualenv/lib/python3.12/site-packages/redis/connection.py", line 627, in _connect sock.connect(socket_address) ConnectionRefusedError: [Errno 111] Connection refused During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/admin/virtualenv/lib/python3.12/site-packages/kombu/connection.py", line 472, in _reraise_as_library_errors yield File "/home/admin/virtualenv/lib/python3.12/site-packages/kombu/connection.py", line 459, in _ensure_connection return retry_over_time( ^^^^^^^^^^^^^^^^ File "/home/admin/virtualenv/lib/python3.12/site-packages/kombu/utils/functional.py", line 318, in retry_over_time return fun(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^ File "/home/admin/virtualenv/lib/python3.12/site-packages/kombu/connection.py", line 938, in _connection_factory self._connection = self._establish_connection() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/admin/virtualenv/lib/python3.12/site-packages/kombu/connection.py", line 860, in _establish_connection conn = self.transport.establish_connection() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/admin/virtualenv/lib/python3.12/site-packages/kombu/transport/virtual/base.py", line 975, in establish_connection self._avail_channels.append(self.create_channel(self)) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/admin/virtualenv/lib/python3.12/site-packages/kombu/transport/virtual/base.py", line 953, in create_channel channel = self.Channel(connection) ^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/admin/virtualenv/lib/python3.12/site-packages/kombu/transport/redis.py", line 751, in __init__ self.client.ping() File "/home/admin/virtualenv/lib/python3.12/site-packages/redis/commands/core.py", line 1208, in ping return self.execute_command("PING", **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/admin/virtualenv/lib/python3.12/site-packages/kombu/transport/redis.py", line 259, in execute_command return super().execute_command(*self._prefix_args(args), **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/admin/virtualenv/lib/python3.12/site-packages/redis/client.py", line 545, in execute_command conn = self.connection or pool.get_connection(command_name, **options) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/admin/virtualenv/lib/python3.12/site-packages/redis/connection.py", line 1074, in get_connection connection.connect() File "/home/admin/virtualenv/lib/python3.12/site-packages/redis/connection.py", line 283, in connect raise ConnectionError(self._error_message(e)) redis.exceptions.ConnectionError: Error 111 connecting to localhost:6379. Connection refused. ``` 但是redis配置连接确认是对的,不然不会有其他接口产生的token信息 ### ✔️ Expected Behavior who can help me solve this issue, thanks greatefully! ### ❌ Actual Behavior _No response_
yindo added the 🐞 bug label 2026-02-21 19:17:56 -05:00
yindo closed this issue 2026-02-21 19:17:56 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Jun 12, 2025):

Your error is caused by the backend failing to connect to the Redis server at localhost:6379 when Celery tries to queue a task. This is a common issue in self-hosted or Dockerized environments, especially when the Redis instance used for Celery (the broker) is not the same as the one used for caching, or when the service is not reachable from the backend container.

Here are some things to check and try:

  • Make sure the Redis service is running and accessible at localhost:6379 from the backend process. If you are running with Docker, localhost inside a container refers to the container itself, not the host. In this case, try changing your Redis host configuration from localhost to host.docker.internal or the actual Docker network service name for Redis. This has resolved similar issues for other users (example, example).
  • Double-check that your Celery broker URL and Redis cache URL are both correct and point to running Redis instances. Token generation working does not guarantee the Celery broker Redis is configured or reachable correctly.
  • If you have any system proxy environment variables set (like HTTP_PROXY or HTTPS_PROXY), try unsetting them, as they can interfere with local connections (reference).
  • Make sure all middleware services (PostgreSQL, Redis, Weaviate) are up and healthy if you use Docker Compose (reference).
  • If you continue to see connection errors, check for firewall rules or network policies that might block access to the Redis port.

If none of these steps resolve the issue, consider restarting your containers or, as a last resort, deleting Docker volumes and starting with a fresh install, as this has helped in some cases with persistent backend errors (reference).

To reply, just mention @dosu.


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

@dosubot[bot] commented on GitHub (Jun 12, 2025): <!-- Answer --> Your error is caused by the backend failing to connect to the Redis server at `localhost:6379` when Celery tries to queue a task. This is a common issue in self-hosted or Dockerized environments, especially when the Redis instance used for Celery (the broker) is not the same as the one used for caching, or when the service is not reachable from the backend container. Here are some things to check and try: - Make sure the Redis service is running and accessible at `localhost:6379` from the backend process. If you are running with Docker, `localhost` inside a container refers to the container itself, not the host. In this case, try changing your Redis host configuration from `localhost` to `host.docker.internal` or the actual Docker network service name for Redis. This has resolved similar issues for other users ([example](https://github.com/langgenius/dify/issues/15328), [example](https://github.com/langgenius/dify/issues/15608)). - Double-check that your Celery broker URL and Redis cache URL are both correct and point to running Redis instances. Token generation working does not guarantee the Celery broker Redis is configured or reachable correctly. - If you have any system proxy environment variables set (like `HTTP_PROXY` or `HTTPS_PROXY`), try unsetting them, as they can interfere with local connections ([reference](https://github.com/langgenius/dify/issues/15328)). - Make sure all middleware services (PostgreSQL, Redis, Weaviate) are up and healthy if you use Docker Compose ([reference](https://github.com/langgenius/dify/issues/13806)). - If you continue to see connection errors, check for firewall rules or network policies that might block access to the Redis port. If none of these steps resolve the issue, consider restarting your containers or, as a last resort, deleting Docker volumes and starting with a fresh install, as this has helped in some cases with persistent backend errors ([reference](https://github.com/langgenius/dify/issues/15548)). <!-- 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/71197278-cba9-4fa8-ac4c-1dc864149a06?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/71197278-cba9-4fa8-ac4c-1dc864149a06?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/71197278-cba9-4fa8-ac4c-1dc864149a06?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/71197278-cba9-4fa8-ac4c-1dc864149a06?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/71197278-cba9-4fa8-ac4c-1dc864149a06?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/71197278-cba9-4fa8-ac4c-1dc864149a06?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/71197278-cba9-4fa8-ac4c-1dc864149a06?feedback_type=other)</sup>&nbsp;&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/20969)
Author
Owner

@DavideDelbianco commented on GitHub (Jun 13, 2025):

Dude, there's version 1.4.2, do you really expect them to fix something in 0.15.3 ?

@DavideDelbianco commented on GitHub (Jun 13, 2025): Dude, there's version 1.4.2, do you really expect them to fix something in 0.15.3 ?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#14590