When upgrading the Docker container, it failed to connect to the database, resulting in a migration failure. #1952

Closed
opened 2026-02-21 17:39:54 -05:00 by yindo · 0 comments
Owner

Originally created by @mwnu on GitHub (Apr 9, 2024).

Originally assigned to: @crazywoola on GitHub.

Self Checks

  • This is only for bug report, if you would like to ask a quesion, 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).
  • Pleas do not modify this template :) and fill in all the required fields.

Dify version

0.6.0-fix1

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

I used the new docker-compose in version 0.6.0-fix1 and modified it, then executed:

docker-compose down
docker-compose pull
docker-compose -d

Due to incorrect internal network configuration in my docker, the api and worker applications failed to connect to the database services (postgresql, redis, and qdrant). Consequently, the database did not migrate automatically (strangely, everything on the frontend application worked normally, and there were no error messages in the logs).
Then I manually updated the tables in the database:

ALTER TABLE dataset_keyword_tables ADD COLUMN data_source_type VARCHAR(255) NOT NULL DEFAULT 'database';
ALTER TABLE embeddings ADD COLUMN provider_name VARCHAR(40) NOT NULL DEFAULT '';
ALTER TABLE embeddings DROP CONSTRAINT embedding_hash_idx;
ALTER TABLE embeddings ADD CONSTRAINT embedding_hash_idx UNIQUE (model_name, hash, provider_name);

Then executed "docker-compose -f exec api flask convert-to-agent-apps"
The result was:

Start convert to agent apps.
Congratulations! Converted 0 agent apps.

The discovery applications found on the homepage were all in English (although I had set the frontend to Chinese).
On another server, I successfully migrated automatically and executed "docker-compose -f exec api flask convert-to-agent-apps" to successfully convert agent apps, and the applications on the homepage were displayed in Chinese.

✔️ Expected Behavior

I don't know what other errors there might be, how can I fix this situation?

Actual Behavior

There are no logs and no errors. Currently, it seems that only the homepage application is not displaying Chinese correctly, other errors are unknown.
image

Some log in the worker:
image
image

Originally created by @mwnu on GitHub (Apr 9, 2024). Originally assigned to: @crazywoola on GitHub. ### Self Checks - [X] This is only for bug report, if you would like to ask a quesion, 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] Pleas do not modify this template :) and fill in all the required fields. ### Dify version 0.6.0-fix1 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce I used the new docker-compose in version 0.6.0-fix1 and modified it, then executed: ``` docker-compose down docker-compose pull docker-compose -d ``` Due to incorrect internal network configuration in my docker, the api and worker applications failed to connect to the database services (postgresql, redis, and qdrant). Consequently, the database did not migrate automatically (strangely, everything on the frontend application worked normally, and there were no error messages in the logs). Then I manually updated the tables in the database: ``` ALTER TABLE dataset_keyword_tables ADD COLUMN data_source_type VARCHAR(255) NOT NULL DEFAULT 'database'; ALTER TABLE embeddings ADD COLUMN provider_name VARCHAR(40) NOT NULL DEFAULT ''; ALTER TABLE embeddings DROP CONSTRAINT embedding_hash_idx; ALTER TABLE embeddings ADD CONSTRAINT embedding_hash_idx UNIQUE (model_name, hash, provider_name); ``` Then executed "docker-compose -f exec api flask convert-to-agent-apps" The result was: > Start convert to agent apps. > Congratulations! Converted 0 agent apps. The discovery applications found on the homepage were all in English (although I had set the frontend to Chinese). On another server, I successfully migrated automatically and executed "docker-compose -f exec api flask convert-to-agent-apps" to successfully convert agent apps, and the applications on the homepage were displayed in Chinese. ### ✔️ Expected Behavior I don't know what other errors there might be, how can I fix this situation? ### ❌ Actual Behavior There are no logs and no errors. Currently, it seems that only the homepage application is not displaying Chinese correctly, other errors are unknown. ![image](https://github.com/langgenius/dify/assets/45463732/30260629-3493-44c5-b8d2-48754f513630) **Some log in the worker:** ![image](https://github.com/langgenius/dify/assets/45463732/f9819298-2ebe-4e27-abc5-c59d65a4fdae) ![image](https://github.com/langgenius/dify/assets/45463732/d01f3dea-e79f-4a89-9e9d-5fd14f5372b1)
yindo added the 🐞 bug label 2026-02-21 17:39:54 -05:00
yindo closed this issue 2026-02-21 17:39:54 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#1952