docker-Plugin_daemon-1 Repeated restarts #12683

Closed
opened 2026-02-21 19:08:31 -05:00 by yindo · 23 comments
Owner

Originally created by @shy20221121 on GitHub (Apr 9, 2025).

Self Checks

  • 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 (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

1.1.3

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

Image

2025-04-09 15:02:27 goroutine 1 [running]:
2025-04-09 15:02:27 github.com/langgenius/dify-plugin-daemon/internal/utils/log.writeLog({0x16d5294, 0x5}, {0x170baea?, 0xc00002e388?}, 0x1, {0x0, 0x0, 0x0})
2025-04-09 15:02:27     /app/internal/utils/log/log.go:40 +0x326
2025-04-09 15:02:27 github.com/langgenius/dify-plugin-daemon/internal/utils/log.Panic(...)
2025-04-09 15:02:27     /app/internal/utils/log/log.go:66
2025-04-09 15:02:27 main.main()
2025-04-09 15:02:27     /app/cmd/server/main.go:19 +0x76
2025-04-09 15:03:26 panic: [PANIC]Error processing environment variables
2025-04-09 15:03:26 
2025-04-09 15:03:26 goroutine 1 [running]:
2025-04-09 15:03:26 github.com/langgenius/dify-plugin-daemon/internal/utils/log.writeLog({0x16d5294, 0x5}, {0x170baea?, 0xc00014a708?}, 0x1, {0x0, 0x0, 0x0})
2025-04-09 15:03:26     /app/internal/utils/log/log.go:40 +0x326
2025-04-09 15:03:26 github.com/langgenius/dify-plugin-daemon/internal/utils/log.Panic(...)
2025-04-09 15:03:26     /app/internal/utils/log/log.go:66
2025-04-09 15:03:26 main.main()
2025-04-09 15:03:26     /app/cmd/server/main.go:19 +0x76
2025-04-09 15:04:24 panic: [PANIC]Error processing environment variables
2025-04-09 15:04:24 
2025-04-09 15:04:24 goroutine 1 [running]:
2025-04-09 15:04:24 github.com/langgenius/dify-plugin-daemon/internal/utils/log.writeLog({0x16d5294, 0x5}, {0x170baea?, 0xc00024f508?}, 0x1, {0x0, 0x0, 0x0})
2025-04-09 15:04:24     /app/internal/utils/log/log.go:40 +0x326
2025-04-09 15:04:24 github.com/langgenius/dify-plugin-daemon/internal/utils/log.Panic(...)
2025-04-09 15:04:24     /app/internal/utils/log/log.go:66
2025-04-09 15:04:24 main.main()
2025-04-09 15:04:24     /app/cmd/server/main.go:19 +0x76

What is the problem?

✔️ Expected Behavior

No response

Actual Behavior

No response

Originally created by @shy20221121 on GitHub (Apr 9, 2025). ### Self Checks - [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 (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [x] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [x] Please do not modify this template :) and fill in all the required fields. ### Dify version 1.1.3 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce ![Image](https://github.com/user-attachments/assets/a310027a-35cd-4ca8-b6f2-f5632fee5834) ``` 2025-04-09 15:02:27 goroutine 1 [running]: 2025-04-09 15:02:27 github.com/langgenius/dify-plugin-daemon/internal/utils/log.writeLog({0x16d5294, 0x5}, {0x170baea?, 0xc00002e388?}, 0x1, {0x0, 0x0, 0x0}) 2025-04-09 15:02:27 /app/internal/utils/log/log.go:40 +0x326 2025-04-09 15:02:27 github.com/langgenius/dify-plugin-daemon/internal/utils/log.Panic(...) 2025-04-09 15:02:27 /app/internal/utils/log/log.go:66 2025-04-09 15:02:27 main.main() 2025-04-09 15:02:27 /app/cmd/server/main.go:19 +0x76 2025-04-09 15:03:26 panic: [PANIC]Error processing environment variables 2025-04-09 15:03:26 2025-04-09 15:03:26 goroutine 1 [running]: 2025-04-09 15:03:26 github.com/langgenius/dify-plugin-daemon/internal/utils/log.writeLog({0x16d5294, 0x5}, {0x170baea?, 0xc00014a708?}, 0x1, {0x0, 0x0, 0x0}) 2025-04-09 15:03:26 /app/internal/utils/log/log.go:40 +0x326 2025-04-09 15:03:26 github.com/langgenius/dify-plugin-daemon/internal/utils/log.Panic(...) 2025-04-09 15:03:26 /app/internal/utils/log/log.go:66 2025-04-09 15:03:26 main.main() 2025-04-09 15:03:26 /app/cmd/server/main.go:19 +0x76 2025-04-09 15:04:24 panic: [PANIC]Error processing environment variables 2025-04-09 15:04:24 2025-04-09 15:04:24 goroutine 1 [running]: 2025-04-09 15:04:24 github.com/langgenius/dify-plugin-daemon/internal/utils/log.writeLog({0x16d5294, 0x5}, {0x170baea?, 0xc00024f508?}, 0x1, {0x0, 0x0, 0x0}) 2025-04-09 15:04:24 /app/internal/utils/log/log.go:40 +0x326 2025-04-09 15:04:24 github.com/langgenius/dify-plugin-daemon/internal/utils/log.Panic(...) 2025-04-09 15:04:24 /app/internal/utils/log/log.go:66 2025-04-09 15:04:24 main.main() 2025-04-09 15:04:24 /app/cmd/server/main.go:19 +0x76 ``` **What is the problem?** ### ✔️ Expected Behavior _No response_ ### ❌ Actual Behavior _No response_
yindo added the 🐞 bug label 2026-02-21 19:08:31 -05:00
yindo closed this issue 2026-02-21 19:08:31 -05:00
Author
Owner

@shy20221121 commented on GitHub (Apr 9, 2025):

Image

@shy20221121 commented on GitHub (Apr 9, 2025): ![Image](https://github.com/user-attachments/assets/cc937778-fe31-4c3e-b21a-bb30241fbcb2)
Author
Owner

@dosubot[bot] commented on GitHub (Apr 9, 2025):

Hello @shy20221121! I'm Dosu, your friendly assistant here to help you tackle bugs, answer questions, and guide you in becoming a contributor. I'll be here while you wait for a human maintainer. How can I assist you today?

The repeated restarts of the "plugin_daemon-1" Docker container with a panic error related to processing environment variables in your Dify version 1.1.3 setup are likely due to a permission issue. This issue can be resolved by modifying your Docker configuration to include the following security option:

security_opt:
  - seccomp:unconfined

This change disables the seccomp restrictions that are causing the permission issue, allowing the virtual environment creation process to complete successfully [1].

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] commented on GitHub (Apr 9, 2025): <!-- Greeting --> Hello @shy20221121! I'm [Dosu](https://dosu.dev), your friendly assistant here to help you tackle bugs, answer questions, and guide you in becoming a contributor. I'll be here while you wait for a human maintainer. How can I assist you today? <!-- Answer --> The repeated restarts of the "plugin_daemon-1" Docker container with a panic error related to processing environment variables in your Dify version 1.1.3 setup are likely due to a permission issue. This issue can be resolved by modifying your Docker configuration to include the following security option: ```yaml security_opt: - seccomp:unconfined ``` This change disables the seccomp restrictions that are causing the permission issue, allowing the virtual environment creation process to complete successfully <sup>[[1]](https://github.com/langgenius/dify/issues/16802)</sup>. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.* --- <sup>Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/9d6db42a-c5f7-4712-acf3-821d7773ae96?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/9d6db42a-c5f7-4712-acf3-821d7773ae96?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/9d6db42a-c5f7-4712-acf3-821d7773ae96?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/9d6db42a-c5f7-4712-acf3-821d7773ae96?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/9d6db42a-c5f7-4712-acf3-821d7773ae96?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/9d6db42a-c5f7-4712-acf3-821d7773ae96?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/9d6db42a-c5f7-4712-acf3-821d7773ae96?feedback_type=other)</sup>
Author
Owner

@beermedlar commented on GitHub (Apr 9, 2025):

same problem for me

@beermedlar commented on GitHub (Apr 9, 2025): same problem for me
Author
Owner

@shy20221121 commented on GitHub (Apr 9, 2025):

Hello @shy20221121! I'm Dosu, your friendly assistant here to help you tackle bugs, answer questions, and guide you in becoming a contributor. I'll be here while you wait for a human maintainer. How can I assist you today?

The repeated restarts of the "plugin_daemon-1" Docker container with a panic error related to processing environment variables in your Dify version 1.1.3 setup are likely due to a permission issue. This issue can be resolved by modifying your Docker configuration to include the following security option:

security_opt:

  • seccomp:unconfined
    This change disables the seccomp restrictions that are causing the permission issue, allowing the virtual environment creation process to complete successfully [1].

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

Image

Still restarting repeatedly

@shy20221121 commented on GitHub (Apr 9, 2025): > Hello [@shy20221121](https://github.com/shy20221121)! I'm [Dosu](https://dosu.dev), your friendly assistant here to help you tackle bugs, answer questions, and guide you in becoming a contributor. I'll be here while you wait for a human maintainer. How can I assist you today? > > The repeated restarts of the "plugin_daemon-1" Docker container with a panic error related to processing environment variables in your Dify version 1.1.3 setup are likely due to a permission issue. This issue can be resolved by modifying your Docker configuration to include the following security option: > > security_opt: > - seccomp:unconfined > This change disables the seccomp restrictions that are causing the permission issue, allowing the virtual environment creation process to complete successfully [[1]](https://github.com/langgenius/dify/issues/16802). > > _To continue talking to [Dosu](https://dosu.dev), mention [@dosu](https://github.com/dosu)._ > > Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/9d6db42a-c5f7-4712-acf3-821d7773ae96?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/9d6db42a-c5f7-4712-acf3-821d7773ae96?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/9d6db42a-c5f7-4712-acf3-821d7773ae96?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/9d6db42a-c5f7-4712-acf3-821d7773ae96?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/9d6db42a-c5f7-4712-acf3-821d7773ae96?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/9d6db42a-c5f7-4712-acf3-821d7773ae96?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/9d6db42a-c5f7-4712-acf3-821d7773ae96?feedback_type=other) ![Image](https://github.com/user-attachments/assets/aeedc2ec-101e-4c7a-bc15-5ec443d21e6f) **Still restarting repeatedly**
Author
Owner

@xsqing commented on GitHub (Apr 9, 2025):

same for me

@xsqing commented on GitHub (Apr 9, 2025): same for me
Author
Owner

@ionlz commented on GitHub (Apr 9, 2025):

same problem . i got error

plugin_daemon-1  | 2025/04/09 07:43:42 init.go:144: [PANIC]failed to init dify plugin db: failed to connect to `host=db user=postgres database=postgres`: server error (FATAL: no pg_hba.conf entry for host "192.168.128.7", user "postgres", database "postgres", no encryption (SQLSTATE 28000))

then i asked claude3.7

PostgreSQL 连接错误解析

这个错误是 PostgreSQL 的访问控制配置问题,具体来说:

FATAL: no pg_hba.conf entry for host "192.168.48.9", user "postgres", database "dify_plugin", no encryption (SQLSTATE 28000)

错误原因

PostgreSQL 使用一个名为 pg_hba.conf (Host-Based Authentication) 的配置文件来控制哪些客户端可以连接到数据库服务器。这个错误表明:

  • 来自 IP 地址 192.168.48.9 的客户端
  • 尝试以用户 postgres 身份
  • 连接到 dify_plugin 数据库
  • 未使用加密连接

但是 PostgreSQL 的 pg_hba.conf 配置文件中没有允许这种连接的规则。

解决方法

  1. 登录到 PostgreSQL 服务器,找到 pg_hba.conf 文件:

    # 通常在这些位置之一
    /var/lib/pgsql/data/pg_hba.conf
    /etc/postgresql/[版本]/main/pg_hba.conf 
    /usr/local/pgsql/data/pg_hba.conf
    
  2. 添加适当的访问控制规则,编辑 pg_hba.conf 文件:

    # 允许特定 IP 地址访问特定数据库
    host    dify_plugin    postgres    192.168.48.9/32    md5
    
    # 或允许整个子网
    host    dify_plugin    postgres    192.168.48.0/24    md5
    

    规则格式:连接类型 数据库 用户 地址 认证方法

  3. 重新加载 PostgreSQL 配置

    sudo systemctl reload postgresql
    # 或
    sudo pg_ctl reload
    

认证方法选项

  • md5 - 要求密码认证(密码以MD5加密传输)
  • scram-sha-256 - 更安全的密码认证
  • trust - 无需密码(不建议用于生产环境)
  • peer - 使用操作系统用户认证(仅本地连接)
  • reject - 拒绝连接

相关安全注意事项

  1. 避免使用 trust 认证方法,除非在完全可信的环境中
  2. 考虑使用 SSL 加密连接(在规则中使用 hostssl 而不是 host
  3. 尽量限制特定 IP 地址而不是整个网段
  4. 为数据库用户使用非默认用户名(避免使用 postgres

这样修改后,来自 192.168.48.9 的连接请求应该可以正常访问数据库了。

i edit volumes/db/data/pgdata/pg_hba.conf , and add

host    all		all		192.168.0.0/16		md5

at the end.

restart db and plugin_daemon finally it all start .

but i get another error in web service

api-1  | sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) FATAL:  database "dify" does not exist
@ionlz commented on GitHub (Apr 9, 2025): same problem . i got error ``` plugin_daemon-1 | 2025/04/09 07:43:42 init.go:144: [PANIC]failed to init dify plugin db: failed to connect to `host=db user=postgres database=postgres`: server error (FATAL: no pg_hba.conf entry for host "192.168.128.7", user "postgres", database "postgres", no encryption (SQLSTATE 28000)) ``` then i asked claude3.7 # PostgreSQL 连接错误解析 这个错误是 PostgreSQL 的访问控制配置问题,具体来说: ``` FATAL: no pg_hba.conf entry for host "192.168.48.9", user "postgres", database "dify_plugin", no encryption (SQLSTATE 28000) ``` ## 错误原因 PostgreSQL 使用一个名为 `pg_hba.conf` (Host-Based Authentication) 的配置文件来控制哪些客户端可以连接到数据库服务器。这个错误表明: - 来自 IP 地址 `192.168.48.9` 的客户端 - 尝试以用户 `postgres` 身份 - 连接到 `dify_plugin` 数据库 - 未使用加密连接 但是 PostgreSQL 的 `pg_hba.conf` 配置文件中没有允许这种连接的规则。 ## 解决方法 1. **登录到 PostgreSQL 服务器**,找到 `pg_hba.conf` 文件: ```bash # 通常在这些位置之一 /var/lib/pgsql/data/pg_hba.conf /etc/postgresql/[版本]/main/pg_hba.conf /usr/local/pgsql/data/pg_hba.conf ``` 2. **添加适当的访问控制规则**,编辑 `pg_hba.conf` 文件: ``` # 允许特定 IP 地址访问特定数据库 host dify_plugin postgres 192.168.48.9/32 md5 # 或允许整个子网 host dify_plugin postgres 192.168.48.0/24 md5 ``` 规则格式:`连接类型 数据库 用户 地址 认证方法` 3. **重新加载 PostgreSQL 配置**: ```bash sudo systemctl reload postgresql # 或 sudo pg_ctl reload ``` ## 认证方法选项 - `md5` - 要求密码认证(密码以MD5加密传输) - `scram-sha-256` - 更安全的密码认证 - `trust` - 无需密码(不建议用于生产环境) - `peer` - 使用操作系统用户认证(仅本地连接) - `reject` - 拒绝连接 ## 相关安全注意事项 1. 避免使用 `trust` 认证方法,除非在完全可信的环境中 2. 考虑使用 SSL 加密连接(在规则中使用 `hostssl` 而不是 `host`) 3. 尽量限制特定 IP 地址而不是整个网段 4. 为数据库用户使用非默认用户名(避免使用 `postgres`) 这样修改后,来自 192.168.48.9 的连接请求应该可以正常访问数据库了。 i edit volumes/db/data/pgdata/pg_hba.conf , and add ``` host all all 192.168.0.0/16 md5 ``` at the end. restart db and plugin_daemon finally it all start . but i get another error in web service ``` api-1 | sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) FATAL: database "dify" does not exist ```
Author
Owner

@shy20221121 commented on GitHub (Apr 9, 2025):

same problem . i got error

plugin_daemon-1  | 2025/04/09 07:43:42 init.go:144: [PANIC]failed to init dify plugin db: failed to connect to `host=db user=postgres database=postgres`: server error (FATAL: no pg_hba.conf entry for host "192.168.128.7", user "postgres", database "postgres", no encryption (SQLSTATE 28000))

then i asked claude3.7

PostgreSQL 连接错误解析

这个错误是 PostgreSQL 的访问控制配置问题,具体来说:

FATAL: no pg_hba.conf entry for host "192.168.48.9", user "postgres", database "dify_plugin", no encryption (SQLSTATE 28000)

错误原因

PostgreSQL 使用一个名为 pg_hba.conf (Host-Based Authentication) 的配置文件来控制哪些客户端可以连接到数据库服务器。这个错误表明:

  • 来自 IP 地址 192.168.48.9 的客户端
  • 尝试以用户 postgres 身份
  • 连接到 dify_plugin 数据库
  • 未使用加密连接

但是 PostgreSQL 的 pg_hba.conf 配置文件中没有允许这种连接的规则。

解决方法

  1. 登录到 PostgreSQL 服务器,找到 pg_hba.conf 文件:

    通常在这些位置之一

    /var/lib/pgsql/data/pg_hba.conf
    /etc/postgresql/[版本]/main/pg_hba.conf
    /usr/local/pgsql/data/pg_hba.conf

  2. 添加适当的访问控制规则,编辑 pg_hba.conf 文件:

    # 允许特定 IP 地址访问特定数据库
    host    dify_plugin    postgres    192.168.48.9/32    md5
    
    # 或允许整个子网
    host    dify_plugin    postgres    192.168.48.0/24    md5
    

    规则格式:连接类型 数据库 用户 地址 认证方法

  3. 重新加载 PostgreSQL 配置
    sudo systemctl reload postgresql

    sudo pg_ctl reload

认证方法选项

  • md5 - 要求密码认证(密码以MD5加密传输)
  • scram-sha-256 - 更安全的密码认证
  • trust - 无需密码(不建议用于生产环境)
  • peer - 使用操作系统用户认证(仅本地连接)
  • reject - 拒绝连接

相关安全注意事项

  1. 避免使用 trust 认证方法,除非在完全可信的环境中
  2. 考虑使用 SSL 加密连接(在规则中使用 hostssl 而不是 host
  3. 尽量限制特定 IP 地址而不是整个网段
  4. 为数据库用户使用非默认用户名(避免使用 postgres

这样修改后,来自 192.168.48.9 的连接请求应该可以正常访问数据库了。

i edit volumes/db/data/pgdata/pg_hba.conf , and add

host    all		all		192.168.0.0/16		md5

at the end.

restart db and plugin_daemon finally it all start .

but i get another error in web service

api-1  | sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) FATAL:  database "dify" does not exist

It seems that the errors we encounter are different

2025-04-09 15:58:05 goroutine 1 [running]:
2025-04-09 15:58:05 github.com/langgenius/dify-plugin-daemon/internal/utils/log.writeLog({0x16d5294, 0x5}, {0x170baea?, 0xc00064a388?}, 0x1, {0x0, 0x0, 0x0})
2025-04-09 15:58:05 /app/internal/utils/log/log.go:40 +0x326
2025-04-09 15:58:05 github.com/langgenius/dify-plugin-daemon/internal/utils/log.Panic(...)
2025-04-09 15:58:05 /app/internal/utils/log/log.go:66
2025-04-09 15:58:05 main.main()
2025-04-09 15:58:05 /app/cmd/server/main.go:19 +0x76
2025-04-09 15:58:05 2025/04/09 07:58:05 main.go:19: [PANIC]Error processing environment variables

@shy20221121 commented on GitHub (Apr 9, 2025): > same problem . i got error > > ``` > plugin_daemon-1 | 2025/04/09 07:43:42 init.go:144: [PANIC]failed to init dify plugin db: failed to connect to `host=db user=postgres database=postgres`: server error (FATAL: no pg_hba.conf entry for host "192.168.128.7", user "postgres", database "postgres", no encryption (SQLSTATE 28000)) > ``` > > then i asked claude3.7 > > # PostgreSQL 连接错误解析 > 这个错误是 PostgreSQL 的访问控制配置问题,具体来说: > > ``` > FATAL: no pg_hba.conf entry for host "192.168.48.9", user "postgres", database "dify_plugin", no encryption (SQLSTATE 28000) > ``` > > ## 错误原因 > PostgreSQL 使用一个名为 `pg_hba.conf` (Host-Based Authentication) 的配置文件来控制哪些客户端可以连接到数据库服务器。这个错误表明: > > * 来自 IP 地址 `192.168.48.9` 的客户端 > * 尝试以用户 `postgres` 身份 > * 连接到 `dify_plugin` 数据库 > * 未使用加密连接 > > 但是 PostgreSQL 的 `pg_hba.conf` 配置文件中没有允许这种连接的规则。 > > ## 解决方法 > 1. **登录到 PostgreSQL 服务器**,找到 `pg_hba.conf` 文件: > # 通常在这些位置之一 > /var/lib/pgsql/data/pg_hba.conf > /etc/postgresql/[版本]/main/pg_hba.conf > /usr/local/pgsql/data/pg_hba.conf > 2. **添加适当的访问控制规则**,编辑 `pg_hba.conf` 文件: > ``` > # 允许特定 IP 地址访问特定数据库 > host dify_plugin postgres 192.168.48.9/32 md5 > > # 或允许整个子网 > host dify_plugin postgres 192.168.48.0/24 md5 > ``` > > > > > > > > > > > > 规则格式:`连接类型 数据库 用户 地址 认证方法` > 3. **重新加载 PostgreSQL 配置**: > sudo systemctl reload postgresql > # 或 > sudo pg_ctl reload > > ## 认证方法选项 > * `md5` - 要求密码认证(密码以MD5加密传输) > * `scram-sha-256` - 更安全的密码认证 > * `trust` - 无需密码(不建议用于生产环境) > * `peer` - 使用操作系统用户认证(仅本地连接) > * `reject` - 拒绝连接 > > ## 相关安全注意事项 > 1. 避免使用 `trust` 认证方法,除非在完全可信的环境中 > 2. 考虑使用 SSL 加密连接(在规则中使用 `hostssl` 而不是 `host`) > 3. 尽量限制特定 IP 地址而不是整个网段 > 4. 为数据库用户使用非默认用户名(避免使用 `postgres`) > > 这样修改后,来自 192.168.48.9 的连接请求应该可以正常访问数据库了。 > > i edit volumes/db/data/pgdata/pg_hba.conf , and add > > ``` > host all all 192.168.0.0/16 md5 > ``` > > at the end. > > restart db and plugin_daemon finally it all start . > > but i get another error in web service > > ``` > api-1 | sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) FATAL: database "dify" does not exist > ``` **It seems that the errors we encounter are different** 2025-04-09 15:58:05 goroutine 1 [running]: 2025-04-09 15:58:05 github.com/langgenius/dify-plugin-daemon/internal/utils/log.writeLog({0x16d5294, 0x5}, {0x170baea?, 0xc00064a388?}, 0x1, {0x0, 0x0, 0x0}) 2025-04-09 15:58:05 /app/internal/utils/log/log.go:40 +0x326 2025-04-09 15:58:05 github.com/langgenius/dify-plugin-daemon/internal/utils/log.Panic(...) 2025-04-09 15:58:05 /app/internal/utils/log/log.go:66 2025-04-09 15:58:05 main.main() 2025-04-09 15:58:05 /app/cmd/server/main.go:19 +0x76 2025-04-09 15:58:05 2025/04/09 07:58:05 main.go:19: **[PANIC]Error processing environment variables**
Author
Owner

@Pas0412 commented on GitHub (Apr 9, 2025):

same problem for me:
[PANIC]Error processing environment variables

@Pas0412 commented on GitHub (Apr 9, 2025): same problem for me: [PANIC]Error processing environment variables
Author
Owner

@huangpeihp commented on GitHub (Apr 9, 2025):

same problem for me:
[PANIC]Error processing environment variables

@huangpeihp commented on GitHub (Apr 9, 2025): same problem for me: [PANIC]Error processing environment variables
Author
Owner

@nozota commented on GitHub (Apr 9, 2025):

Try editting the following settings to your .env file:

PLUGIN_S3_USE_AWS_MANAGED_IAM=false
PLUGIN_S3_USE_PATH_STYLE=false
@nozota commented on GitHub (Apr 9, 2025): Try editting the following settings to your .env file: ```properties PLUGIN_S3_USE_AWS_MANAGED_IAM=false PLUGIN_S3_USE_PATH_STYLE=false ```
Author
Owner

@yangbinbin48 commented on GitHub (Apr 9, 2025):

Try editting the following settings to your .env file:尝试对 .env 文件编辑以下设置:

PLUGIN_S3_USE_AWS_MANAGED_IAM=false
PLUGIN_S3_USE_PATH_STYLE=false

this works

@yangbinbin48 commented on GitHub (Apr 9, 2025): > Try editting the following settings to your .env file:尝试对 .env 文件编辑以下设置: > > PLUGIN_S3_USE_AWS_MANAGED_IAM=false > PLUGIN_S3_USE_PATH_STYLE=false this works
Author
Owner

@shy20221121 commented on GitHub (Apr 9, 2025):

Try editting the following settings to your .env file:

PLUGIN_S3_USE_AWS_MANAGED_IAM=false
PLUGIN_S3_USE_PATH_STYLE=false

Image

Good! This method works

@shy20221121 commented on GitHub (Apr 9, 2025): > Try editting the following settings to your .env file: > > PLUGIN_S3_USE_AWS_MANAGED_IAM=false > PLUGIN_S3_USE_PATH_STYLE=false ![Image](https://github.com/user-attachments/assets/c62a238b-2e8e-4f37-9e53-686d7a1bf074) Good! This method works
Author
Owner

@beermedlar commented on GitHub (Apr 9, 2025):

Try editting the following settings to your .env file:

PLUGIN_S3_USE_AWS_MANAGED_IAM=false
PLUGIN_S3_USE_PATH_STYLE=false

thanks, this works

@beermedlar commented on GitHub (Apr 9, 2025): > Try editting the following settings to your .env file: > > PLUGIN_S3_USE_AWS_MANAGED_IAM=false > PLUGIN_S3_USE_PATH_STYLE=false thanks, this works
Author
Owner

@huangpeihp commented on GitHub (Apr 9, 2025):

Try editting the following settings to your .env file:

PLUGIN_S3_USE_AWS_MANAGED_IAM=false
PLUGIN_S3_USE_PATH_STYLE=false
thanks, this works

@huangpeihp commented on GitHub (Apr 9, 2025): > Try editting the following settings to your .env file: > > PLUGIN_S3_USE_AWS_MANAGED_IAM=false > PLUGIN_S3_USE_PATH_STYLE=false thanks, this works
Author
Owner

@Pas0412 commented on GitHub (Apr 9, 2025):

same problem for me: [PANIC]Error processing environment variables

after git checkout to the past commit like 1be0d26, it works, I think it's something wrong with the recent commits, haven't used the method mentioned by the reply above.

@Pas0412 commented on GitHub (Apr 9, 2025): > same problem for me: [PANIC]Error processing environment variables after git checkout to the past commit like 1be0d26, it works, I think it's something wrong with the recent commits, haven't used the method mentioned by the reply above.
Author
Owner

@Yangweichao123 commented on GitHub (Apr 9, 2025):

Try editting the following settings to your .env file:

PLUGIN_S3_USE_AWS_MANAGED_IAM=false
PLUGIN_S3_USE_PATH_STYLE=false

如果改完这2个配置文件后不生效的情况下,可以删掉plugin_daemon-1,然后再次使用安装docker compose up -d去安装覆盖一遍后就正常了

@Yangweichao123 commented on GitHub (Apr 9, 2025): > Try editting the following settings to your .env file: > > PLUGIN_S3_USE_AWS_MANAGED_IAM=false > PLUGIN_S3_USE_PATH_STYLE=false 如果改完这2个配置文件后不生效的情况下,可以删掉plugin_daemon-1,然后再次使用安装docker compose up -d去安装覆盖一遍后就正常了
Author
Owner

@feng9688 commented on GitHub (Apr 9, 2025):

Image

@feng9688 commented on GitHub (Apr 9, 2025): ![Image](https://github.com/user-attachments/assets/d3b1fef0-2577-40d1-9ba0-cf35d8e9af7c)
Author
Owner

@feng9688 commented on GitHub (Apr 9, 2025):

thanks, this works

@feng9688 commented on GitHub (Apr 9, 2025): thanks, this works
Author
Owner

@neverskr commented on GitHub (Apr 9, 2025):

Image
Imagewhy it dosen't work on me?

@neverskr commented on GitHub (Apr 9, 2025): ![Image](https://github.com/user-attachments/assets/9823d2b6-73e6-464b-98ff-b1695746c35c) ![Image](https://github.com/user-attachments/assets/d5d60b80-0dcf-4516-9b9e-a9baba463c71)why it dosen't work on me?
Author
Owner

@shy20221121 commented on GitHub (Apr 9, 2025):

Try docker compose down and then docker compose up -d

获取 Outlook for iOShttps://aka.ms/o0ukef


发件人: neverskr @.>
发送时间: Wednesday, April 9, 2025 9:03:30 PM
收件人: langgenius/dify @.
>
抄送: shy20221121 @.>; State change @.>
主题: Re: [langgenius/dify] docker-Plugin_daemon-1 Repeated restarts (Issue #17677)

2025-04-09.210223.png (view on web)https://github.com/user-attachments/assets/d5d60b80-0dcf-4516-9b9e-a9baba463c71why it dosen't work on me?


Reply to this email directly, view it on GitHubhttps://github.com/langgenius/dify/issues/17677#issuecomment-2789633130, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A4J2HDBZDIOL7RHE6SJ4T4L2YULCFAVCNFSM6AAAAAB2YE4ALWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDOOBZGYZTGMJTGA.
You are receiving this because you modified the open/close state.Message ID: @.***>

[https://avatars.githubusercontent.com/u/94233217?s=20&v=4]neverskr left a comment (langgenius/dify#17677)https://github.com/langgenius/dify/issues/17677#issuecomment-2789633130

2025-04-09.210223.png (view on web)https://github.com/user-attachments/assets/d5d60b80-0dcf-4516-9b9e-a9baba463c71why it dosen't work on me?


Reply to this email directly, view it on GitHubhttps://github.com/langgenius/dify/issues/17677#issuecomment-2789633130, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A4J2HDBZDIOL7RHE6SJ4T4L2YULCFAVCNFSM6AAAAAB2YE4ALWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDOOBZGYZTGMJTGA.
You are receiving this because you modified the open/close state.Message ID: @.***>

@shy20221121 commented on GitHub (Apr 9, 2025): Try docker compose down and then docker compose up -d 获取 Outlook for iOS<https://aka.ms/o0ukef> ________________________________ 发件人: neverskr ***@***.***> 发送时间: Wednesday, April 9, 2025 9:03:30 PM 收件人: langgenius/dify ***@***.***> 抄送: shy20221121 ***@***.***>; State change ***@***.***> 主题: Re: [langgenius/dify] docker-Plugin_daemon-1 Repeated restarts (Issue #17677) 2025-04-09.210223.png (view on web)<https://github.com/user-attachments/assets/d5d60b80-0dcf-4516-9b9e-a9baba463c71>why it dosen't work on me? ― Reply to this email directly, view it on GitHub<https://github.com/langgenius/dify/issues/17677#issuecomment-2789633130>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/A4J2HDBZDIOL7RHE6SJ4T4L2YULCFAVCNFSM6AAAAAB2YE4ALWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDOOBZGYZTGMJTGA>. You are receiving this because you modified the open/close state.Message ID: ***@***.***> [https://avatars.githubusercontent.com/u/94233217?s=20&v=4]neverskr left a comment (langgenius/dify#17677)<https://github.com/langgenius/dify/issues/17677#issuecomment-2789633130> 2025-04-09.210223.png (view on web)<https://github.com/user-attachments/assets/d5d60b80-0dcf-4516-9b9e-a9baba463c71>why it dosen't work on me? ― Reply to this email directly, view it on GitHub<https://github.com/langgenius/dify/issues/17677#issuecomment-2789633130>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/A4J2HDBZDIOL7RHE6SJ4T4L2YULCFAVCNFSM6AAAAAB2YE4ALWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDOOBZGYZTGMJTGA>. You are receiving this because you modified the open/close state.Message ID: ***@***.***>
Author
Owner

@neverskr commented on GitHub (Apr 9, 2025):

I tried twice, unfortunately, it doesn't work.

@neverskr commented on GitHub (Apr 9, 2025): I tried twice, unfortunately, it doesn't work.
Author
Owner

@lovpuss commented on GitHub (Jul 3, 2025):

我遇到了,最终 cp .env.example .env 解决

Image
@lovpuss commented on GitHub (Jul 3, 2025): 我遇到了,最终 cp .env.example .env 解决 <img width="739" alt="Image" src="https://github.com/user-attachments/assets/b5537338-b154-4378-aa42-e600ff9aa640" />
Author
Owner

@shuiRong commented on GitHub (Jan 22, 2026):

On our side, with the Kubernetes (K8s) deployment, the configuration above had no effect. However, after using the following environment variable and restarting dify-plugin-daemon, the issue was resolved.

DB_SSL_MODE: require

@shuiRong commented on GitHub (Jan 22, 2026): On our side, with the Kubernetes (K8s) deployment, the configuration above had no effect. However, after using the following environment variable and restarting dify-plugin-daemon, the issue was resolved. `DB_SSL_MODE: require`
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#12683