The plugin_daemon cannot start and keeps restarting. #12747

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

Originally created by @ZH0517 on GitHub (Apr 10, 2025).

Self Checks

  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit report (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

Provide a description of requested docs changes

[PANIC]Error processing environment variables: envconfig.Process: assigning S3_USE_AWS_MANAGED_IAM to S3UseAwsManagedIam: converting '' to type bool. details: strconv.ParseBool: parsing "": invalid syntax

I have checked that S3_USE_AWS_MANAGED_IAM is set to false

Originally created by @ZH0517 on GitHub (Apr 10, 2025). ### Self Checks - [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 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. ### Provide a description of requested docs changes [PANIC]Error processing environment variables: envconfig.Process: assigning S3_USE_AWS_MANAGED_IAM to S3UseAwsManagedIam: converting '' to type bool. details: strconv.ParseBool: parsing "": invalid syntax I have checked that S3_USE_AWS_MANAGED_IAM is set to false
yindo closed this issue 2026-02-21 19:08:49 -05:00
Author
Owner

@ZH0517 commented on GitHub (Apr 10, 2025):

Version 1.2.0 was used

@ZH0517 commented on GitHub (Apr 10, 2025): Version 1.2.0 was used
Author
Owner

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

Hello @ZH0517! I'm Dosu, your friendly bot here to help you solve bugs, answer questions, and guide you on becoming a contributor. I'm here while you wait for a human maintainer. How can I assist you today?

To resolve the issue with the plugin_daemon repeatedly restarting due to the environment variable error, ensure that the S3_USE_AWS_MANAGED_IAM environment variable is correctly set. Although you mentioned setting it to false, it seems the value might not be properly assigned. Here are steps to fix this:

  1. Explicitly set the environment variable in your .env file:

    PLUGIN_S3_USE_AWS_MANAGED_IAM=false
    PLUGIN_S3_USE_PATH_STYLE=false
    
  2. Add a default value in your docker-compose.yaml to ensure the variable is interpreted correctly:

    plugin_daemon:
      environment:
        S3_USE_AWS_MANAGED_IAM: ${PLUGIN_S3_USE_AWS_MANAGED_IAM:-true}
    

These steps should help prevent the error by ensuring the variable is correctly interpreted as a boolean [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 10, 2025): <!-- Greeting --> Hello @ZH0517! I'm [Dosu](https://dosu.dev), your friendly bot here to help you solve bugs, answer questions, and guide you on becoming a contributor. I'm here while you wait for a human maintainer. How can I assist you today? <!-- Answer --> To resolve the issue with the `plugin_daemon` repeatedly restarting due to the environment variable error, ensure that the `S3_USE_AWS_MANAGED_IAM` environment variable is correctly set. Although you mentioned setting it to false, it seems the value might not be properly assigned. Here are steps to fix this: 1. Explicitly set the environment variable in your `.env` file: ```properties PLUGIN_S3_USE_AWS_MANAGED_IAM=false PLUGIN_S3_USE_PATH_STYLE=false ``` 2. Add a default value in your `docker-compose.yaml` to ensure the variable is interpreted correctly: ```yaml plugin_daemon: environment: S3_USE_AWS_MANAGED_IAM: ${PLUGIN_S3_USE_AWS_MANAGED_IAM:-true} ``` These steps should help prevent the error by ensuring the variable is correctly interpreted as a boolean <sup>[[1]](https://github.com/langgenius/dify/issues/17725)</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/02db3cf7-f6a4-4ce5-bcbf-90f6954f9c4d?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/02db3cf7-f6a4-4ce5-bcbf-90f6954f9c4d?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/02db3cf7-f6a4-4ce5-bcbf-90f6954f9c4d?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/02db3cf7-f6a4-4ce5-bcbf-90f6954f9c4d?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/02db3cf7-f6a4-4ce5-bcbf-90f6954f9c4d?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/02db3cf7-f6a4-4ce5-bcbf-90f6954f9c4d?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/02db3cf7-f6a4-4ce5-bcbf-90f6954f9c4d?feedback_type=other)</sup>
Author
Owner

@grassfish1122 commented on GitHub (Apr 10, 2025):

Hello @ZH0517! I'm Dosu, your friendly bot here to help you solve bugs, answer questions, and guide you on becoming a contributor. I'm here while you wait for a human maintainer. How can I assist you today?

To resolve the issue with the plugin_daemon repeatedly restarting due to the environment variable error, ensure that the S3_USE_AWS_MANAGED_IAM environment variable is correctly set. Although you mentioned setting it to false, it seems the value might not be properly assigned. Here are steps to fix this:

  1. Explicitly set the environment variable in your .env file:
    PLUGIN_S3_USE_AWS_MANAGED_IAM=false
    PLUGIN_S3_USE_PATH_STYLE=false
  2. Add a default value in your docker-compose.yaml to ensure the variable is interpreted correctly:
    plugin_daemon:
    environment:
    S3_USE_AWS_MANAGED_IAM: ${PLUGIN_S3_USE_AWS_MANAGED_IAM:-true}

These steps should help prevent the error by ensuring the variable is correctly interpreted as a boolean [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

I tried this method, and it works.

@grassfish1122 commented on GitHub (Apr 10, 2025): > Hello [@ZH0517](https://github.com/ZH0517)! I'm [Dosu](https://dosu.dev), your friendly bot here to help you solve bugs, answer questions, and guide you on becoming a contributor. I'm here while you wait for a human maintainer. How can I assist you today? > > To resolve the issue with the `plugin_daemon` repeatedly restarting due to the environment variable error, ensure that the `S3_USE_AWS_MANAGED_IAM` environment variable is correctly set. Although you mentioned setting it to false, it seems the value might not be properly assigned. Here are steps to fix this: > > 1. Explicitly set the environment variable in your `.env` file: > PLUGIN_S3_USE_AWS_MANAGED_IAM=false > PLUGIN_S3_USE_PATH_STYLE=false > 2. Add a default value in your `docker-compose.yaml` to ensure the variable is interpreted correctly: > plugin_daemon: > environment: > S3_USE_AWS_MANAGED_IAM: ${PLUGIN_S3_USE_AWS_MANAGED_IAM:-true} > > These steps should help prevent the error by ensuring the variable is correctly interpreted as a boolean [[1]](https://github.com/langgenius/dify/issues/17725). > > _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/02db3cf7-f6a4-4ce5-bcbf-90f6954f9c4d?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/02db3cf7-f6a4-4ce5-bcbf-90f6954f9c4d?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/02db3cf7-f6a4-4ce5-bcbf-90f6954f9c4d?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/02db3cf7-f6a4-4ce5-bcbf-90f6954f9c4d?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/02db3cf7-f6a4-4ce5-bcbf-90f6954f9c4d?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/02db3cf7-f6a4-4ce5-bcbf-90f6954f9c4d?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/02db3cf7-f6a4-4ce5-bcbf-90f6954f9c4d?feedback_type=other) I tried this method, and it works.
Author
Owner

@grassfish1122 commented on GitHub (Apr 10, 2025):

The source code might have some errors. I used the raw .env.example file but encountered this issue.

@grassfish1122 commented on GitHub (Apr 10, 2025): The source code might have some errors. I used the raw .env.example file but encountered this issue.
Author
Owner

@ZH0517 commented on GitHub (Apr 10, 2025):

This solved my problem, but I couldn't set the api-key when I wanted to use the deepseek model

Image

@ZH0517 commented on GitHub (Apr 10, 2025): This solved my problem, but I couldn't set the api-key when I wanted to use the deepseek model ![Image](https://github.com/user-attachments/assets/4dc1f601-f449-4f31-8622-aa1a190c1f80)
Author
Owner

@Moiyu1998 commented on GitHub (Apr 10, 2025):

I have encountered the same issue.

@Moiyu1998 commented on GitHub (Apr 10, 2025): I have encountered the same issue.
Author
Owner

@iwaim commented on GitHub (Apr 10, 2025):

The source code might have some errors. I used the raw .env.example file but encountered this issue.

fixed it #17722

@iwaim commented on GitHub (Apr 10, 2025): > The source code might have some errors. I used the raw .env.example file but encountered this issue. fixed it #17722
Author
Owner

@Eliujux commented on GitHub (Apr 18, 2025):

[root@vm66 docker]# grep S3 docker-compose.yaml
S3_ENDPOINT: ${S3_ENDPOINT:-}
S3_REGION: ${S3_REGION:-us-east-1}
S3_BUCKET_NAME: ${S3_BUCKET_NAME:-difyai}
S3_ACCESS_KEY: ${S3_ACCESS_KEY:-}
S3_SECRET_KEY: ${S3_SECRET_KEY:-}
S3_USE_AWS_MANAGED_IAM: ${S3_USE_AWS_MANAGED_IAM:-false}
PLUGIN_S3_USE_AWS_MANAGED_IAM: ${PLUGIN_S3_USE_AWS_MANAGED_IAM:-}
PLUGIN_S3_ENDPOINT: ${PLUGIN_S3_ENDPOINT:-}
PLUGIN_S3_USE_PATH_STYLE: ${PLUGIN_S3_USE_PATH_STYLE:-}
S3_USE_AWS_MANAGED_IAM: ${PLUGIN_S3_USE_AWS_MANAGED_IAM:-}
S3_ENDPOINT: ${PLUGIN_S3_ENDPOINT:-}
S3_USE_PATH_STYLE: ${PLUGIN_S3_USE_PATH_STYLE:-}

I found this 2 variables PLUGIN_S3_USE_AWS_MANAGED_IAM PLUGIN_S3_USE_PATH_STYLE are not set in .env .
so i just add them like:

[root@vm66 docker]# grep S3 .env
# S3 Configuration
S3_ENDPOINT=
S3_REGION=us-east-1
S3_BUCKET_NAME=difyai
S3_ACCESS_KEY=
S3_SECRET_KEY=
``#Whether to use AWS managed IAM roles for authenticating with the S3 service.`
S3_USE_AWS_MANAGED_IAM=false
PLUGIN_S3_USE_AWS_MANAGED_IAM=false
PLUGIN_S3_USE_PATH_STYLE=false

then the problem fixed.

@Eliujux commented on GitHub (Apr 18, 2025): [root@vm66 docker]# grep S3 docker-compose.yaml S3_ENDPOINT: ${S3_ENDPOINT:-} S3_REGION: ${S3_REGION:-us-east-1} S3_BUCKET_NAME: ${S3_BUCKET_NAME:-difyai} S3_ACCESS_KEY: ${S3_ACCESS_KEY:-} S3_SECRET_KEY: ${S3_SECRET_KEY:-} S3_USE_AWS_MANAGED_IAM: ${S3_USE_AWS_MANAGED_IAM:-false} PLUGIN_S3_USE_AWS_MANAGED_IAM: **${PLUGIN_S3_USE_AWS_MANAGED_IAM:-}** PLUGIN_S3_ENDPOINT: ${PLUGIN_S3_ENDPOINT:-} PLUGIN_S3_USE_PATH_STYLE: **${PLUGIN_S3_USE_PATH_STYLE**:-} S3_USE_AWS_MANAGED_IAM: ${PLUGIN_S3_USE_AWS_MANAGED_IAM:-} S3_ENDPOINT: ${PLUGIN_S3_ENDPOINT:-} S3_USE_PATH_STYLE: ${PLUGIN_S3_USE_PATH_STYLE:-} I found this 2 variables **PLUGIN_S3_USE_AWS_MANAGED_IAM** **PLUGIN_S3_USE_PATH_STYLE** are not set in .env . so i just add them like: [root@vm66 docker]# grep S3 .env `# S3 Configuration` S3_ENDPOINT= S3_REGION=us-east-1 S3_BUCKET_NAME=difyai S3_ACCESS_KEY= S3_SECRET_KEY= ``#Whether to use AWS managed IAM roles for authenticating with the S3 service.` S3_USE_AWS_MANAGED_IAM=false **PLUGIN_S3_USE_AWS_MANAGED_IAM=false PLUGIN_S3_USE_PATH_STYLE=false** then the problem fixed.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#12747