-
Notifications
You must be signed in to change notification settings - Fork 8.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Version upgrade error:ERROR [root] Database migration failed #8137
Comments
I found some similar discussions and an issue that might help you resolve the database migration error:
To resolve the database migration error "psycopg2.OperationalError: connection to server at 'db' (172.17.53.3), port 5432 failed: FATAL: password authentication failed for user 'postgres'" when upgrading from version 0.6.11 to 0.7.3 in a self-hosted (Docker) environment, ensure that the database credentials in your From the provided services:
# The pgvecto—rs database.
pgvecto-rs:
image: tensorchord/pgvecto-rs:pg16-v0.2.0
restart: always
environment:
PGUSER: postgres
# The password for the default postgres user.
POSTGRES_PASSWORD: difyai123456
# The name of the default postgres database.
POSTGRES_DB: dify
# postgres data directory
PGDATA: /var/lib/postgresql/data/pgdata
volumes:
- ./volumes/pgvectors/data:/var/lib/postgresql/data
# uncomment to expose db(postgresql) port to host
ports:
- "5431:5432"
healthcheck:
test: [ "CMD", "pg_isready" ]
interval: 1s
timeout: 3s
retries: 30 Make sure that:
In this case, the credentials appear to be consistent. If you still encounter the error, try the following steps:
If the manual connection works but the error persists in the application, there might be an issue with how the application reads the environment variables. Double-check the Docker logs for any additional clues. If the manual connection fails, there might be an issue with the PostgreSQL server configuration or network connectivity. Ensure that the PostgreSQL server is running and accessible from the Docker network. Additionally, ensure that the |
Self Checks
Dify version
0.7.3
Cloud or Self Hosted
Self Hosted (Docker)
Steps to reproduce
My current version is 0.6.11, and when trying to upgrade to version 0.7.3, an error occurs:
ERROR [root] Database migration failed, error: (psycopg2.OperationalError) connection to server at "db" (172.17.53.3), port 5432 failed: FATAL: password authentication failed for user "postgres"
But I have confirmed that the database password is correct. Could you please help me check what the reason may be?
✔️ Expected Behavior
No response
❌ Actual Behavior
No response
The text was updated successfully, but these errors were encountered: