dify 1.0.0 install report error #9951

Closed
opened 2026-02-21 18:40:58 -05:00 by yindo · 0 comments
Owner

Originally created by @heyong2024 on GitHub (Mar 8, 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.0.0

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

  File "/app/api/.venv/lib/python3.12/site-packages/psycopg2/__init__.py", line 122, in connect,
    conn = _connect(dsn, connection_factory=connection_factory, **kwasync),
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^,
  File "/app/api/.venv/lib/python3.12/site-packages/psycogreen/gevent.py", line 32, in gevent_wait_callback,
    state = conn.poll(),
            ^^^^^^^^^^^,
psycopg2.OperationalError: Connection refused,
	Is the server running on that host and accepting TCP/IP connections?,
,
,
The above exception was the direct cause of the following exception:,
,
Traceback (most recent call last):,
  File "/app/api/commands.py", line 594, in upgrade_db,
    flask_migrate.upgrade(),
  File "/app/api/.venv/lib/python3.12/site-packages/flask_migrate/__init__.py", line 111, in wrapped,
    f(*args, **kwargs),
  File "/app/api/.venv/lib/python3.12/site-packages/flask_migrate/__init__.py", line 200, in upgrade,
    command.upgrade(config, revision, sql=sql, tag=tag),
  File "/app/api/.venv/lib/python3.12/site-packages/alembic/command.py", line 406, in upgrade,
    script.run_env(),
  File "/app/api/.venv/lib/python3.12/site-packages/alembic/script/base.py", line 586, in run_env,
    util.load_python_file(self.dir, "env.py"),
  File "/app/api/.venv/lib/python3.12/site-packages/alembic/util/pyfiles.py", line 95, in load_python_file,
    module = load_module_py(module_id, path),
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^,
  File "/app/api/.venv/lib/python3.12/site-packages/alembic/util/pyfiles.py", line 113, in load_module_py,
    spec.loader.exec_module(module)  # type: ignore,
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^,
  File "<frozen importlib._bootstrap_external>", line 999, in exec_module,
  File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed,
  File "/app/api/migrations/env.py", line 109, in <module>,
    run_migrations_online(),
  File "/app/api/migrations/env.py", line 93, in run_migrations_online,
    with connectable.connect() as connection:,
         ^^^^^^^^^^^^^^^^^^^^^,
  File "/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 3278, in connect,
    return self._connection_cls(self),
           ^^^^^^^^^^^^^^^^^^^^^^^^^^,
  File "/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 148, in __init__,
    Connection._handle_dbapi_exception_noconnection(,
  File "/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 2442, in _handle_dbapi_exception_noconnection,
    raise sqlalchemy_exception.with_traceback(exc_info[2]) from e,
  File "/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 146, in __init__,
    self._dbapi_connection = engine.raw_connection(),
                             ^^^^^^^^^^^^^^^^^^^^^^^,
  File "/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 3302, in raw_connection,
    return self.pool.connect(),
           ^^^^^^^^^^^^^^^^^^^,
  File "/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py", line 449, in connect,
    return _ConnectionFairy._checkout(self),
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^,
  File "/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py", line 1263, in _checkout,
    fairy = _ConnectionRecord.checkout(pool),
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^,
  File "/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py", line 712, in checkout,
    rec = pool._do_get(),
          ^^^^^^^^^^^^^^,
  File "/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/impl.py", line 179, in _do_get,
    with util.safe_reraise():,
         ^^^^^^^^^^^^^^^^^^^,
  File "/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/util/langhelpers.py", line 146, in __exit__,
    raise exc_value.with_traceback(exc_tb),
  File "/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/impl.py", line 177, in _do_get,
    return self._create_connection(),
           ^^^^^^^^^^^^^^^^^^^^^^^^^,
  File "/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py", line 390, in _create_connection,
    return _ConnectionRecord(self),
           ^^^^^^^^^^^^^^^^^^^^^^^,
  File "/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py", line 674, in __init__,
    self.__connect(),
  File "/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py", line 900, in __connect,
    with util.safe_reraise():,
         ^^^^^^^^^^^^^^^^^^^,
  File "/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/util/langhelpers.py", line 146, in __exit__,
    raise exc_value.with_traceback(exc_tb),
  File "/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py", line 896, in __connect,
    self.dbapi_connection = connection = pool._invoke_creator(self),
                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^,
  File "/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/create.py", line 643, in connect,
    return dialect.connect(*cargs, **cparams),
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^,
  File "/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/default.py", line 621, in connect,
    return self.loaded_dbapi.connect(*cargs, **cparams),
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^,
  File "/app/api/.venv/lib/python3.12/site-packages/psycopg2/__init__.py", line 122, in connect,
    conn = _connect(dsn, connection_factory=connection_factory, **kwasync),
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^,
  File "/app/api/.venv/lib/python3.12/site-packages/psycogreen/gevent.py", line 32, in gevent_wait_callback,
    state = conn.poll(),
            ^^^^^^^^^^^,
sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) Connection refused,
	Is the server running on that host and accepting TCP/IP connections?,
,
(Background on this error at: https://sqlalche.me/e/20/e3q8),
[2025-03-09 01:00:10 +0000] [1] [INFO] Starting gunicorn 23.0.0,
[2025-03-09 01:00:10 +0000] [1] [INFO] Listening at: http://0.0.0.0:5001 (1),
[2025-03-09 01:00:10 +0000] [1] [INFO] Using worker: gevent,
[2025-03-09 01:00:10 +0000] [24] [INFO] Booting worker with pid: 24,
2025-03-09 01:00:16.523 INFO [MainThread] [utils.py:162] - NumExpr defaulting to 6 threads.

✔️ Expected Behavior

No response

Actual Behavior

No response

Originally created by @heyong2024 on GitHub (Mar 8, 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.0.0 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce ``` File "/app/api/.venv/lib/python3.12/site-packages/psycopg2/__init__.py", line 122, in connect, conn = _connect(dsn, connection_factory=connection_factory, **kwasync), ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^, File "/app/api/.venv/lib/python3.12/site-packages/psycogreen/gevent.py", line 32, in gevent_wait_callback, state = conn.poll(), ^^^^^^^^^^^, psycopg2.OperationalError: Connection refused, Is the server running on that host and accepting TCP/IP connections?, , , The above exception was the direct cause of the following exception:, , Traceback (most recent call last):, File "/app/api/commands.py", line 594, in upgrade_db, flask_migrate.upgrade(), File "/app/api/.venv/lib/python3.12/site-packages/flask_migrate/__init__.py", line 111, in wrapped, f(*args, **kwargs), File "/app/api/.venv/lib/python3.12/site-packages/flask_migrate/__init__.py", line 200, in upgrade, command.upgrade(config, revision, sql=sql, tag=tag), File "/app/api/.venv/lib/python3.12/site-packages/alembic/command.py", line 406, in upgrade, script.run_env(), File "/app/api/.venv/lib/python3.12/site-packages/alembic/script/base.py", line 586, in run_env, util.load_python_file(self.dir, "env.py"), File "/app/api/.venv/lib/python3.12/site-packages/alembic/util/pyfiles.py", line 95, in load_python_file, module = load_module_py(module_id, path), ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^, File "/app/api/.venv/lib/python3.12/site-packages/alembic/util/pyfiles.py", line 113, in load_module_py, spec.loader.exec_module(module) # type: ignore, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^, File "<frozen importlib._bootstrap_external>", line 999, in exec_module, File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed, File "/app/api/migrations/env.py", line 109, in <module>, run_migrations_online(), File "/app/api/migrations/env.py", line 93, in run_migrations_online, with connectable.connect() as connection:, ^^^^^^^^^^^^^^^^^^^^^, File "/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 3278, in connect, return self._connection_cls(self), ^^^^^^^^^^^^^^^^^^^^^^^^^^, File "/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 148, in __init__, Connection._handle_dbapi_exception_noconnection(, File "/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 2442, in _handle_dbapi_exception_noconnection, raise sqlalchemy_exception.with_traceback(exc_info[2]) from e, File "/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 146, in __init__, self._dbapi_connection = engine.raw_connection(), ^^^^^^^^^^^^^^^^^^^^^^^, File "/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 3302, in raw_connection, return self.pool.connect(), ^^^^^^^^^^^^^^^^^^^, File "/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py", line 449, in connect, return _ConnectionFairy._checkout(self), ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^, File "/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py", line 1263, in _checkout, fairy = _ConnectionRecord.checkout(pool), ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^, File "/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py", line 712, in checkout, rec = pool._do_get(), ^^^^^^^^^^^^^^, File "/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/impl.py", line 179, in _do_get, with util.safe_reraise():, ^^^^^^^^^^^^^^^^^^^, File "/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/util/langhelpers.py", line 146, in __exit__, raise exc_value.with_traceback(exc_tb), File "/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/impl.py", line 177, in _do_get, return self._create_connection(), ^^^^^^^^^^^^^^^^^^^^^^^^^, File "/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py", line 390, in _create_connection, return _ConnectionRecord(self), ^^^^^^^^^^^^^^^^^^^^^^^, File "/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py", line 674, in __init__, self.__connect(), File "/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py", line 900, in __connect, with util.safe_reraise():, ^^^^^^^^^^^^^^^^^^^, File "/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/util/langhelpers.py", line 146, in __exit__, raise exc_value.with_traceback(exc_tb), File "/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py", line 896, in __connect, self.dbapi_connection = connection = pool._invoke_creator(self), ^^^^^^^^^^^^^^^^^^^^^^^^^^, File "/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/create.py", line 643, in connect, return dialect.connect(*cargs, **cparams), ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^, File "/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/default.py", line 621, in connect, return self.loaded_dbapi.connect(*cargs, **cparams), ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^, File "/app/api/.venv/lib/python3.12/site-packages/psycopg2/__init__.py", line 122, in connect, conn = _connect(dsn, connection_factory=connection_factory, **kwasync), ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^, File "/app/api/.venv/lib/python3.12/site-packages/psycogreen/gevent.py", line 32, in gevent_wait_callback, state = conn.poll(), ^^^^^^^^^^^, sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) Connection refused, Is the server running on that host and accepting TCP/IP connections?, , (Background on this error at: https://sqlalche.me/e/20/e3q8), [2025-03-09 01:00:10 +0000] [1] [INFO] Starting gunicorn 23.0.0, [2025-03-09 01:00:10 +0000] [1] [INFO] Listening at: http://0.0.0.0:5001 (1), [2025-03-09 01:00:10 +0000] [1] [INFO] Using worker: gevent, [2025-03-09 01:00:10 +0000] [24] [INFO] Booting worker with pid: 24, 2025-03-09 01:00:16.523 INFO [MainThread] [utils.py:162] - NumExpr defaulting to 6 threads. ``` ### ✔️ Expected Behavior _No response_ ### ❌ Actual Behavior _No response_
yindo added the 🐞 bug label 2026-02-21 18:40:58 -05:00
yindo closed this issue 2026-02-21 18:40:58 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#9951