You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I found a similar closed issue that might help resolve your problem. The issue was related to port conflicts when running multiple PostgreSQL containers. The solution involved ensuring that the docker-compose.yaml file correctly maps the host port to the container's port. Here's what you can do:
Update the docker-compose.yaml file: Make sure it maps the correct port. For example, if you set DB_PORT=5632 in your .env file, ensure the docker-compose.yaml file has:
ports:
- '5632:5432'
Set Environment Variables: Ensure both DB_PORT=5632 and EXPOSE_DB_PORT=5632 are set in your .env file.
Restart Docker Containers: After making these changes, restart your Docker containers to apply the new configuration. You can do this by running:
docker compose down
docker compose up -d
These steps should help resolve the connection issue by ensuring the correct port mapping and environment variable settings [1].
Self Checks
Dify version
1.0.0
Cloud or Self Hosted
Self Hosted (Docker)
Steps to reproduce
git pull and docker compose up-d
✔️ Expected Behavior
No response
❌ Actual Behavior
Running migrations
2025-02-28 09:10:48.893 INFO [MainThread] [utils.py:162] - NumExpr defaulting to 6 threads.
2025-02-28 09:10:51.758 INFO [MainThread] [_client.py:1038] - HTTP Request: GET https://raw.githubusercontent.com/BerriAI/litellm/main/model_prices_and_context_window.json "HTTP/1.1 200 OK"
Preparing database migration...
Starting database migration.
ERROR [root] Failed to execute database migration
Traceback (most recent call last):
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()
^^^^^^^^^^^^^^^^^^^
seems that it cant connect to DB -
as iam running another postgress container i had to set in .env
DB_PORT=5632
PGVECTOR_PORT=5632
EXPOSE_DB_PORT=5632
The text was updated successfully, but these errors were encountered: