elasticsearch wrong username and knowledge dataset can't be created #12608

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

Originally created by @3210448723 on GitHub (Apr 7, 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


I modified .env and set
VECTOR_STORE=elasticsearch
ELASTICSEARCH_PORT=9201 # The modification is due to my previous deployment of Elasticsearch's Docker container
ELASTICSEARCH_USERNAME=zy
ELASTICSEARCH_PASSWORD=qqqq1111
KIBANA_PORT=5601 # The modification is due to my previous deployment of Elasticsearch's Docker container
When I access' ip: 9201 ', I must enter elastic and qqq1111 to access it


Here are the errors in the knowledge base.
Image

✔️ Expected Behavior

username=zy
password=qqqq1111

Actual Behavior

username=elastic
password=qqqq1111

Originally created by @3210448723 on GitHub (Apr 7, 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 --- I modified `.env` and set VECTOR_STORE=elasticsearch ELASTICSEARCH_PORT=9201 # The modification is due to my previous deployment of Elasticsearch's Docker container ELASTICSEARCH_USERNAME=zy ELASTICSEARCH_PASSWORD=qqqq1111 KIBANA_PORT=5601 # The modification is due to my previous deployment of Elasticsearch's Docker container When I access' ip: 9201 ', I must enter elastic and qqq1111 to access it --- Here are the errors in the knowledge base. ![Image](https://github.com/user-attachments/assets/c77a563f-fd36-4fcd-8567-3807bd5cf2b2) ### ✔️ Expected Behavior username=zy password=qqqq1111 ### ❌ Actual Behavior username=elastic password=qqqq1111
yindo added the 🐞 bug🤔 cant-reproduce labels 2026-02-21 19:08:11 -05:00
yindo closed this issue 2026-02-21 19:08:11 -05:00
Author
Owner

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

Hello @3210448723! I'm here to help you with your bug report and any questions you might have. While you wait for a human maintainer, feel free to ask me anything related to your issue or how to contribute.

I found a similar unsolved discussion regarding Elasticsearch configuration errors in a Docker environment. You might find it helpful to check out the discussion titled Elasticsearch Configuration Error in Docker Environment [1].

In your case, it seems like there might be a mismatch between the credentials set in your .env file and those required by your Elasticsearch instance. Double-check that the username and password in your .env file match those configured in your Elasticsearch setup. Additionally, ensure that the changes in the .env file are correctly applied and that the Docker containers are restarted to reflect these changes.

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 7, 2025): <!-- Greeting --> Hello @3210448723! I'm here to help you with your bug report and any questions you might have. While you wait for a human maintainer, feel free to ask me anything related to your issue or how to contribute. <!-- Answer --> I found a similar unsolved discussion regarding Elasticsearch configuration errors in a Docker environment. You might find it helpful to check out the discussion titled [Elasticsearch Configuration Error in Docker Environment](https://github.com/langgenius/dify/discussions/8912) <sup>[[1]](https://github.com/langgenius/dify/discussions/8912)</sup>. In your case, it seems like there might be a mismatch between the credentials set in your `.env` file and those required by your Elasticsearch instance. Double-check that the username and password in your `.env` file match those configured in your Elasticsearch setup. Additionally, ensure that the changes in the `.env` file are correctly applied and that the Docker containers are restarted to reflect these changes. <!-- 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/59a8c6b9-a259-453f-ae3f-8ecc2d94119b?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/59a8c6b9-a259-453f-ae3f-8ecc2d94119b?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/59a8c6b9-a259-453f-ae3f-8ecc2d94119b?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/59a8c6b9-a259-453f-ae3f-8ecc2d94119b?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/59a8c6b9-a259-453f-ae3f-8ecc2d94119b?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/59a8c6b9-a259-453f-ae3f-8ecc2d94119b?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/59a8c6b9-a259-453f-ae3f-8ecc2d94119b?feedback_type=other)</sup>
Author
Owner

@crazywoola commented on GitHub (Apr 7, 2025):

If you modify the value, you will need to remove the container and create it again.

@crazywoola commented on GitHub (Apr 7, 2025): If you modify the value, you will need to remove the container and create it again.
Author
Owner

@3210448723 commented on GitHub (Apr 7, 2025):

If you modify the value, you will need to remove the container and create it again.

Of course, but problems still arise.

@3210448723 commented on GitHub (Apr 7, 2025): > If you modify the value, you will need to remove the container and create it again. Of course, but problems still arise.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#12608