Error reported when upgrading from 1.4.0 to the latest version #20841

Closed
opened 2026-02-21 20:09:14 -05:00 by yindo · 5 comments
Owner

Originally created by @doufangyu on GitHub (Dec 6, 2025).

Self Checks

  • I have read the Contributing Guide and Language Policy.
  • 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, otherwise it will be closed.
  • 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

1.4.0

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

docker-plugin_daemon-1 | 2025/12/06 13:15:56 init.go:91: [PANIC]failed to init dify plugin db: failed to connect to host=db_postgares user=postgres database=postgres: hostname resolving error (lookup db_postgares on 127.0.0.11:53: no such host)

1.4.0 update to v1.10.1-fix.1

✔️ Expected Behavior

I would like to receive a document on how to upgrade directly

Actual Behavior

The current result is an error as shown above

Originally created by @doufangyu on GitHub (Dec 6, 2025). ### Self Checks - [x] I have read the [Contributing Guide](https://github.com/langgenius/dify/blob/main/CONTRIBUTING.md) and [Language Policy](https://github.com/langgenius/dify/issues/1542). - [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, otherwise it will be closed. - [x] 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :) - [x] Please do not modify this template :) and fill in all the required fields. ### Dify version 1.4.0 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce docker-plugin_daemon-1 | 2025/12/06 13:15:56 init.go:91: [PANIC]failed to init dify plugin db: failed to connect to `host=db_postgares user=postgres database=postgres`: hostname resolving error (lookup db_postgares on 127.0.0.11:53: no such host) 1.4.0 update to [v1.10.1-fix.1](https://github.com/langgenius/dify/releases/tag/1.10.1-fix.1) ### ✔️ Expected Behavior I would like to receive a document on how to upgrade directly ### ❌ Actual Behavior The current result is an error as shown above
yindo added the 🐞 bugoutdated labels 2026-02-21 20:09:14 -05:00
yindo closed this issue 2026-02-21 20:09:14 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Dec 6, 2025):

Here's how to upgrade from Dify 1.4.0 to 1.10.1-fix.1 (self-hosted Docker) and resolve the database hostname error:

  1. Backup your data: Before upgrading, back up your database and any persistent volumes.

  2. Update your code and configs: Pull the latest Dify code and copy the new docker-compose.yaml and .env.example files. Rename .env.example to .env and transfer any custom settings from your old .env or compose files.

  3. Fix the database hostname: In your .env file, set DB_HOST=db_postgres (not db_postgares or db). The database service name changed in recent versions, and using the wrong hostname will cause the plugin daemon to fail to connect reference.

  4. Check other environment variables: Make sure DB_TYPE=postgresql, DB_USERNAME=postgres, DB_DATABASE=dify, and for the plugin daemon, DB_PLUGIN_DATABASE=dify_plugin (or your custom values) are set reference.

  5. Remove orphan containers: Run docker compose down to stop and remove old containers, then docker compose --profile postgresql up -d to start the new stack. This ensures Docker uses the correct service names and network reference.

  6. Verify database health: Make sure the db_postgres container is running and healthy (docker ps). If you see errors, try restarting the containers or recreating the Docker network reference.

  7. Database migrations: By default, migrations are enabled (MIGRATION_ENABLED=true) and will run automatically before the app starts reference.

  8. Troubleshooting: If you still see hostname resolution errors, double-check all service names and environment variables. Compare your .env with the latest .env.example. Make sure all containers are on the same Docker network. If needed, try docker compose down -v to remove volumes and networks, then bring the stack up again.

This process should resolve the db_postgares hostname error and get your upgraded Dify instance running. If you have custom plugins or external databases, ensure their settings are also updated to match the new configuration.

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other

Chat with Dosu Open in Cursor Join Discord Share on X

@dosubot[bot] commented on GitHub (Dec 6, 2025): <!-- Answer --> Here's how to upgrade from Dify 1.4.0 to 1.10.1-fix.1 (self-hosted Docker) and resolve the database hostname error: 1. **Backup your data**: Before upgrading, back up your database and any persistent volumes. 2. **Update your code and configs**: Pull the latest Dify code and copy the new `docker-compose.yaml` and `.env.example` files. Rename `.env.example` to `.env` and transfer any custom settings from your old `.env` or compose files. 3. **Fix the database hostname**: In your `.env` file, set `DB_HOST=db_postgres` (not `db_postgares` or `db`). The database service name changed in recent versions, and using the wrong hostname will cause the plugin daemon to fail to connect [reference](https://github.com/langgenius/dify/blob/10b59cd6badd46879c4e64f35d66d9379d0a7cd8/docker/docker-compose.yaml#L57-L943). 4. **Check other environment variables**: Make sure `DB_TYPE=postgresql`, `DB_USERNAME=postgres`, `DB_DATABASE=dify`, and for the plugin daemon, `DB_PLUGIN_DATABASE=dify_plugin` (or your custom values) are set [reference](https://github.com/langgenius/dify/blob/10b59cd6badd46879c4e64f35d66d9379d0a7cd8/docker/.env.example#L237-L1307). 5. **Remove orphan containers**: Run `docker compose down` to stop and remove old containers, then `docker compose --profile postgresql up -d` to start the new stack. This ensures Docker uses the correct service names and network [reference](https://github.com/langgenius/dify/issues/28449). 6. **Verify database health**: Make sure the `db_postgres` container is running and healthy (`docker ps`). If you see errors, try restarting the containers or recreating the Docker network [reference](https://github.com/langgenius/dify/issues/28706). 7. **Database migrations**: By default, migrations are enabled (`MIGRATION_ENABLED=true`) and will run automatically before the app starts [reference](https://github.com/langgenius/dify/blob/10b59cd6badd46879c4e64f35d66d9379d0a7cd8/docker/.env.example#L123-L1307). 8. **Troubleshooting**: If you still see hostname resolution errors, double-check all service names and environment variables. Compare your `.env` with the latest `.env.example`. Make sure all containers are on the same Docker network. If needed, try `docker compose down -v` to remove volumes and networks, then bring the stack up again. This process should resolve the `db_postgares` hostname error and get your upgraded Dify instance running. If you have custom plugins or external databases, ensure their settings are also updated to match the new configuration. <!-- 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/33b85b12-89a2-49d8-a87b-f705666211c3?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/33b85b12-89a2-49d8-a87b-f705666211c3?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/33b85b12-89a2-49d8-a87b-f705666211c3?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/33b85b12-89a2-49d8-a87b-f705666211c3?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/33b85b12-89a2-49d8-a87b-f705666211c3?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/33b85b12-89a2-49d8-a87b-f705666211c3?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/33b85b12-89a2-49d8-a87b-f705666211c3?feedback_type=other)</sup> [![Chat with Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/6088a4f4-073a-43f3-b3d4-4f06fb0c05a0/ask?utm_source=github)&nbsp;[![Open in Cursor](https://dosu.dev/dosu-in-cursor.svg)](https://cursor.com/link/prompt?text=Here%27s%20how%20to%20upgrade%20from%20Dify%201.4.0%20to%201.10.1-fix.1%20%28self-hosted%20Docker%29%20and%20resolve%20the%20database%20hostname%20error%3A%0A%0A1.%20%2A%2ABackup%20your%20data%2A%2A%3A%20Before%20upgrading%2C%20back%20up%20your%20database%20and%20any%20persistent%20volumes.%0A%0A2.%20%2A%2AUpdate%20your%20code%20and%20configs%2A%2A%3A%20Pull%20the%20latest%20Dify%20code%20and%20copy%20the%20new%20%60docker-compose.yaml%60%20and%20%60.env.example%60%20files.%20Rename%20%60.env.example%60%20to%20%60.env%60%20and%20transfer%20any%20custom%20settings%20from%20your%20old%20%60.env%60%20or%20compose%20files.%0A%0A3.%20%2A%2AFix%20the%20database%20hostname%2A%2A%3A%20In%20your%20%60.env%60%20file%2C%20set%20%60DB_HOST%3Ddb_postgres%60%20%28not%20%60db_postgares%60%20or%20%60db%60%29.%20The%20database%20service%20name%20changed%20in%20recent%20versions%2C%20and%20using%20the%20wrong%20hostname%20will%20cause%20the%20plugin%20daemon%20to%20fail%20to%20connect%C2%A0%5Breference%5D%28https%3A//github.com/langgenius/dify/blob/10b59cd6badd46879c4e64f35d66d9379d0a7cd8/docker/docker-compose.yaml%23L57-L943%29.%0A%0A4.%20%2A%2ACheck%20other%20environment%20variables%2A%2A%3A%20Make%20sure%20%60DB_TYPE%3Dpostgresql%60%2C%20%60DB_USERNAME%3Dpostgres%60%2C%20%60DB_DATABASE%3Ddify%60%2C%20and%20for%20the%20plugin%20daemon%2C%20%60DB_PLUGIN_DATABASE%3Ddify_plugin%60%20%28or%20your%20custom%20values%29%20are%20set%C2%A0%5Breference%5D%28https%3A//github.com/langgenius/dify/blob/10b59cd6badd46879c4e64f35d66d9379d0a7cd8/docker/.env.example%23L237-L1307%29.%0A%0A5.%20%2A%2ARemove%20orphan%20containers%2A%2A%3A%20Run%20%60docker%20compose%20down%60%20to%20stop%20and%20remove%20old%20containers%2C%20then%20%60docker%20compose%20--profile%20postgresql%20up%20-d%60%20to%20start%20the%20new%20stack.%20This%20ensures%20Docker%20uses%20the%20correct%20service%20names%20and%20network%C2%A0%5Breference%5D%28https%3A//github.com/langgenius/dify/issues/28449%29.%0A%0A6.%20%2A%2AVerify%20database%20health%2A%2A%3A%20Make%20sure%20the%20%60db_postgres%60%20container%20is%20running%20and%20healthy%20%28%60docker%20ps%60%29.%20If%20you%20see%20errors%2C%20try%20restarting%20the%20containers%20or%20recreating%20the%20Docker%20network%C2%A0%5Breference%5D%28https%3A//github.com/langgenius/dify/issues/28706%29.%0A%0A7.%20%2A%2ADatabase%20migrations%2A%2A%3A%20By%20default%2C%20migrations%20are%20enabled%20%28%60MIGRATION_ENABLED%3Dtrue%60%29%20and%20will%20run%20automatically%20before%20the%20app%20starts%C2%A0%5Breference%5D%28https%3A//github.com/langgenius/dify/blob/10b59cd6badd46879c4e64f35d66d9379d0a7cd8/docker/.env.example%23L123-L1307%29.%0A%0A8.%20%2A%2ATroubleshooting%2A%2A%3A%20If%20you%20still%20see%20hostname%20resolution%20errors%2C%20double-check%20all%20service%20names%20and%20environment%20variables.%20Compare%20your%20%60.env%60%20with%20the%20latest%20%60.env.example%60.%20Make%20sure%20all%20containers%20are%20on%20the%20same%20Docker%20network.%20If%20needed%2C%20try%20%60docker%20compose%20down%20-v%60%20to%20remove%20volumes%20and%20networks%2C%20then%20bring%20the%20stack%20up%20again.%0A%0AThis%20process%20should%20resolve%20the%20%60db_postgares%60%20hostname%20error%20and%20get%20your%20upgraded%20Dify%20instance%20running.%20If%20you%20have%20custom%20plugins%20or%20external%20databases%2C%20ensure%20their%20settings%20are%20also%20updated%20to%20match%20the%20new%20configuration.)&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/29229)
Author
Owner

@doufangyu commented on GitHub (Dec 6, 2025):

Thank you for your reply. May I ask if the latest version on the MAIN branch is 1.10.1-fax? I noticed that the version number on the web page still shows 1.10.1 after startup

@doufangyu commented on GitHub (Dec 6, 2025): Thank you for your reply. May I ask if the latest version on the MAIN branch is 1.10.1-fax? I noticed that the version number on the web page still shows 1.10.1 after startup
Author
Owner

@doufangyu commented on GitHub (Dec 6, 2025):

感谢您的回复。请问主分支的最新版本是 1.10.1-fax 吗?我注意到启动后网页上的版本号仍然显示为 1.10.1。

@dosu

@doufangyu commented on GitHub (Dec 6, 2025): > 感谢您的回复。请问主分支的最新版本是 1.10.1-fax 吗?我注意到启动后网页上的版本号仍然显示为 1.10.1。 @dosu
Author
Owner

@dosubot[bot] commented on GitHub (Dec 6, 2025):

主分支的最新版本是 1.10.1-fix.1,没有 1.10.1-fax 这个版本,应该是笔误。
网页上的版本号显示为 1.10.1,是因为 Dify 的前端会通过 API(/version 或 X-Version header)从后端获取版本号,这个值由后端配置(dify_config.project.version)决定。如果后端的版本号没有同步更新为 1.10.1-fix.1,UI 依然会显示 1.10.1,即使你实际上运行的是 fix 版本。参考

你可以通过访问 /health 接口或查看 HTTP 响应头里的 X-Version 字段,来确认后端实际运行的版本号。参考

如果你希望 UI 显示为 1.10.1-fix.1,需要确保后端的版本配置也更新为这个值。

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other

Chat with Dosu Open in Cursor Join Discord Share on X

@dosubot[bot] commented on GitHub (Dec 6, 2025): <!-- Answer --> 主分支的最新版本是 1.10.1-fix.1,没有 1.10.1-fax 这个版本,应该是笔误。 网页上的版本号显示为 1.10.1,是因为 Dify 的前端会通过 API(/version 或 X-Version header)从后端获取版本号,这个值由后端配置(dify_config.project.version)决定。如果后端的版本号没有同步更新为 1.10.1-fix.1,UI 依然会显示 1.10.1,即使你实际上运行的是 fix 版本。[参考](https://github.com/langgenius/dify/blob/10b59cd6badd46879c4e64f35d66d9379d0a7cd8/api/controllers/console/version.py#L27-L82) 你可以通过访问 `/health` 接口或查看 HTTP 响应头里的 X-Version 字段,来确认后端实际运行的版本号。[参考](https://github.com/langgenius/dify/blob/10b59cd6badd46879c4e64f35d66d9379d0a7cd8/api/extensions/ext_app_metrics.py#L14-L25) 如果你希望 UI 显示为 1.10.1-fix.1,需要确保后端的版本配置也更新为这个值。 <!-- 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/576ff45b-84dc-4cb6-81b0-237bee004719?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/576ff45b-84dc-4cb6-81b0-237bee004719?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/576ff45b-84dc-4cb6-81b0-237bee004719?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/576ff45b-84dc-4cb6-81b0-237bee004719?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/576ff45b-84dc-4cb6-81b0-237bee004719?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/576ff45b-84dc-4cb6-81b0-237bee004719?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/576ff45b-84dc-4cb6-81b0-237bee004719?feedback_type=other)</sup> [![Chat with Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/6088a4f4-073a-43f3-b3d4-4f06fb0c05a0/ask?utm_source=github)&nbsp;[![Open in Cursor](https://dosu.dev/dosu-in-cursor.svg)](https://cursor.com/link/prompt?text=%E4%B8%BB%E5%88%86%E6%94%AF%E7%9A%84%E6%9C%80%E6%96%B0%E7%89%88%E6%9C%AC%E6%98%AF%201.10.1-fix.1%EF%BC%8C%E6%B2%A1%E6%9C%89%201.10.1-fax%20%E8%BF%99%E4%B8%AA%E7%89%88%E6%9C%AC%EF%BC%8C%E5%BA%94%E8%AF%A5%E6%98%AF%E7%AC%94%E8%AF%AF%E3%80%82%20%20%0A%E7%BD%91%E9%A1%B5%E4%B8%8A%E7%9A%84%E7%89%88%E6%9C%AC%E5%8F%B7%E6%98%BE%E7%A4%BA%E4%B8%BA%201.10.1%EF%BC%8C%E6%98%AF%E5%9B%A0%E4%B8%BA%20Dify%20%E7%9A%84%E5%89%8D%E7%AB%AF%E4%BC%9A%E9%80%9A%E8%BF%87%20API%EF%BC%88/version%20%E6%88%96%20X-Version%20header%EF%BC%89%E4%BB%8E%E5%90%8E%E7%AB%AF%E8%8E%B7%E5%8F%96%E7%89%88%E6%9C%AC%E5%8F%B7%EF%BC%8C%E8%BF%99%E4%B8%AA%E5%80%BC%E7%94%B1%E5%90%8E%E7%AB%AF%E9%85%8D%E7%BD%AE%EF%BC%88dify_config.project.version%EF%BC%89%E5%86%B3%E5%AE%9A%E3%80%82%E5%A6%82%E6%9E%9C%E5%90%8E%E7%AB%AF%E7%9A%84%E7%89%88%E6%9C%AC%E5%8F%B7%E6%B2%A1%E6%9C%89%E5%90%8C%E6%AD%A5%E6%9B%B4%E6%96%B0%E4%B8%BA%201.10.1-fix.1%EF%BC%8CUI%20%E4%BE%9D%E7%84%B6%E4%BC%9A%E6%98%BE%E7%A4%BA%201.10.1%EF%BC%8C%E5%8D%B3%E4%BD%BF%E4%BD%A0%E5%AE%9E%E9%99%85%E4%B8%8A%E8%BF%90%E8%A1%8C%E7%9A%84%E6%98%AF%20fix%20%E7%89%88%E6%9C%AC%E3%80%82%5B%E5%8F%82%E8%80%83%5D%28https%3A//github.com/langgenius/dify/blob/10b59cd6badd46879c4e64f35d66d9379d0a7cd8/api/controllers/console/version.py%23L27-L82%29%0A%0A%E4%BD%A0%E5%8F%AF%E4%BB%A5%E9%80%9A%E8%BF%87%E8%AE%BF%E9%97%AE%20%60/health%60%20%E6%8E%A5%E5%8F%A3%E6%88%96%E6%9F%A5%E7%9C%8B%20HTTP%20%E5%93%8D%E5%BA%94%E5%A4%B4%E9%87%8C%E7%9A%84%20X-Version%20%E5%AD%97%E6%AE%B5%EF%BC%8C%E6%9D%A5%E7%A1%AE%E8%AE%A4%E5%90%8E%E7%AB%AF%E5%AE%9E%E9%99%85%E8%BF%90%E8%A1%8C%E7%9A%84%E7%89%88%E6%9C%AC%E5%8F%B7%E3%80%82%5B%E5%8F%82%E8%80%83%5D%28https%3A//github.com/langgenius/dify/blob/10b59cd6badd46879c4e64f35d66d9379d0a7cd8/api/extensions/ext_app_metrics.py%23L14-L25%29%0A%0A%E5%A6%82%E6%9E%9C%E4%BD%A0%E5%B8%8C%E6%9C%9B%20UI%20%E6%98%BE%E7%A4%BA%E4%B8%BA%201.10.1-fix.1%EF%BC%8C%E9%9C%80%E8%A6%81%E7%A1%AE%E4%BF%9D%E5%90%8E%E7%AB%AF%E7%9A%84%E7%89%88%E6%9C%AC%E9%85%8D%E7%BD%AE%E4%B9%9F%E6%9B%B4%E6%96%B0%E4%B8%BA%E8%BF%99%E4%B8%AA%E5%80%BC%E3%80%82)&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/29229)
Author
Owner

@doufangyu commented on GitHub (Dec 6, 2025):

{"pid": 36, "status": "ok", "version": "1.10.1"

It seems that I haven't upgraded to the FIX version. How can I use Docker deployment version to upgrade to the fix version

@doufangyu commented on GitHub (Dec 6, 2025): {"pid": 36, "status": "ok", "version": "1.10.1" It seems that I haven't upgraded to the FIX version. How can I use Docker deployment version to upgrade to the fix version
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#20841