dify icon indicating copy to clipboard operation
dify copied to clipboard

plugin_daemon startup error

Open stevenishero opened this issue 9 months ago • 12 comments

Self Checks

  • [x] This is only for bug report, if you would like to ask a question, please head to Discussions.
  • [x] I have searched for existing issues search for existing issues, including closed ones.
  • [x] I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [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

2025-03-03 14:19:37 plugin_daemon-1  | 2025/03/03 06:19:37 pool.go:32: [INFO]init routine pool, size: 10000
2025-03-03 14:19:37 plugin_daemon-1  | 
2025-03-03 14:19:37 plugin_daemon-1  | 2025/03/03 06:19:37 /app/internal/db/init.go:17
2025-03-03 14:19:37 plugin_daemon-1  | [error] failed to initialize database, got error failed to connect to `host=db user=postgres database=postgres`: dial error (dial tcp 172.18.0.3:5432: connect: connection refused)
2025-03-03 14:19:37 plugin_daemon-1  | 2025/03/03 06:19:37 init.go:141: [PANIC]failed to init dify plugin db: failed to connect to `host=db user=postgres database=postgres`: dial error (dial tcp 172.18.0.3:5432: connect: connection refused)
2025-03-03 14:19:37 plugin_daemon-1  | panic: [PANIC]failed to init dify plugin db: failed to connect to `host=db user=postgres database=postgres`: dial error (dial tcp 172.18.0.3:5432: connect: connection refused)%!(EXTRA *pgconn.ConnectError=failed to connect to `host=db user=postgres database=postgres`: dial error (dial tcp 172.18.0.3:5432: connect: connection refused))

✔️ Expected Behavior

No response

❌ Actual Behavior

No response

stevenishero avatar Mar 03 '25 06:03 stevenishero

Hey @stevenishero! 👋 I'm here to assist you with bug fixes, answer your questions, and guide you on becoming a contributor. Let's tackle this issue together!

I found a similar issue related to the "plugin_daemon startup error" in Dify version 1.0.0 when using Docker. The recommended solution is to downgrade both dify-api and dify-web services to version 0.15.3. This workaround has been confirmed to resolve the database connection issues and allow successful operation of the plugin daemon. Additionally, ensure you delete any existing Dify Docker images before switching versions to ensure a clean installation. Make sure you are using the docker-compose.middleware.yaml file that comes with the source code installation, as it includes the necessary plugin daemon configuration [1][2][3].

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other

dosubot[bot] avatar Mar 03 '25 06:03 dosubot[bot]

Please check if you are behind a proxy.

crazywoola avatar Mar 03 '25 06:03 crazywoola

Please check if you are behind a proxy.

I turn off the proxy and compose up again, It's still the same.

stevenishero avatar Mar 03 '25 07:03 stevenishero

In this situation, when I entered the program, I was unable to install any plugins.

025-03-03 15:31:28 plugin_daemon-1  | 
2025-03-03 15:31:28 plugin_daemon-1  | 2025/03/03 07:31:28 /app/internal/db/pgsql.go:259 record not found
2025-03-03 15:31:28 plugin_daemon-1  | [0.755ms] [rows:0] SELECT * FROM "plugin_declarations" WHERE plugin_unique_identifier = 'langgenius/openrouter:0.0.4@5c5c4d5323745f553f0a12e776911ba32fd6b9601debc2119ec6504808cf6b92' ORDER BY "plugin_declarations"."id" LIMIT 1
2025-03-03 15:31:28 plugin_daemon-1  | [GIN] 2025/03/03 - 07:31:28 | 200 |   58.803376ms |      172.19.0.8 | POST     "/plugin/35ead72c-1ee2-4446-9592-2fa19002488b/management/install/upload/package"

stevenishero avatar Mar 03 '25 07:03 stevenishero

Still can not reproduce, please provide more details.

crazywoola avatar Mar 03 '25 07:03 crazywoola

fuck me too im remote pg-rds

Scenx avatar Mar 03 '25 11:03 Scenx

Image

pangwanchun avatar Mar 04 '25 02:03 pangwanchun

Image

Tried it. doesn't work

stevenishero avatar Mar 05 '25 06:03 stevenishero

我暂时通过关闭防火墙,成功运行了。

systemctl stop firewalld

NoddingFish avatar Mar 05 '25 06:03 NoddingFish

have you modified docker-compose.yaml? I'm not sure the way you deploy dify, it looks like you are using an external database but have not change db config of plugin_dameon

Yeuoly avatar Mar 05 '25 09:03 Yeuoly

I faced the same error when deploying Dify in the environment with my company's forward proxy server. This error disappeared by specifying 172.*.*.* in noProxy variable in .docker/config.json. Previously, when the error was occurring, I was specifying 172.17.*.*.

utsumi-fj avatar Mar 10 '25 00:03 utsumi-fj

Hello,

I have the same error but with an external database.

Gamatel avatar Mar 14 '25 18:03 Gamatel

我暂时通过关闭防火墙,成功运行了。

systemctl stop firewalld

where our run this command ? in which container?

yankeeshcn avatar Mar 23 '25 11:03 yankeeshcn