Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hit-testing error #12186

Closed
5 tasks done
1193700079 opened this issue Dec 28, 2024 · 5 comments
Closed
5 tasks done

hit-testing error #12186

1193700079 opened this issue Dec 28, 2024 · 5 comments
Labels
🐞 bug Something isn't working

Comments

@1193700079
Copy link

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

0.14.2

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

image
When using the knowledge base, the model performs segmented retrieval normally, but an error occurs during hit-testing, and the cause is unclear. My machine is a Raspberry Pi 5B with 8GB of RAM, and I am running services like Docker as usual. This issue appeared during regular use. I have looked through related issues but haven't found a suitable solution.

✔️ Expected Behavior

run success

❌ Actual Behavior

hit-testing error

@dosubot dosubot bot added the 🐞 bug Something isn't working label Dec 28, 2024
Copy link

dosubot bot commented Dec 28, 2024

Hello @1193700079! I'm here to help you with any bugs, questions, or contributions you may have. Let's work together to solve this issue.

The 400 Bad Request error during hit-testing in Dify could be due to several reasons. Here are some potential causes and solutions:

  1. Request Format: Ensure that the request payload is correctly formatted as JSON and that all required fields are included. Double-check the structure of the JSON data being sent.

  2. Authorization: Verify that the Authorization header is correctly formatted as 'Bearer '. An incorrect API key or format can lead to authorization issues [1].

  3. CORS Configuration: Check the CORS settings. Ensure that CONSOLE_CORS_ALLOW_ORIGINS and WEB_API_CORS_ALLOW_ORIGINS are properly configured, with the default being '*' if necessary [1].

  4. Error Handling: Review the error handling mechanisms in the perform_hit_testing method of the DatasetsHitTestingBase class. Specific errors like DatasetNotInitializedError, ProviderNotInitializeError, and others might provide more insight into the issue [2].

  5. Resource Constraints: Given that you are running this on a Raspberry Pi 5B, ensure that there are sufficient resources available. The 8GB RAM should generally be adequate, but check for any other processes that might be consuming resources.

  6. Logs and Debugging: Check the server logs for any additional error messages or stack traces that might provide more context about the 400 error. This can help pinpoint the exact issue.

If these steps do not resolve the issue, consider providing more detailed logs or error messages for further analysis.

To continue talking to Dosu, mention @dosu.


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

@1193700079
Copy link
Author

image

@1193700079
Copy link
Author

1193700079 commented Dec 28, 2024

image

/app/api/core/rag/retrieval/dataset_retrieval.py

docker images is langgenius/dify-api:0.14.2

@1193700079
Copy link
Author

1193700079 commented Dec 28, 2024

image
Exception in thread Thread-108 (_retriever):
Traceback (most recent call last):
File "/usr/local/lib/python3.12/threading.py", line 1075, in _bootstrap_inner
self.run()
File "/usr/local/lib/python3.12/threading.py", line 1012, in run
self._target(*self._args, **self._kwargs)
File "/app/api/core/rag/retrieval/dataset_retrieval.py", line 526, in _retriever
documents = RetrievalService.retrieve(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/api/core/rag/datasource/retrieval_service.py", line 106, in retrieve
raise ValueError(exception_message)
ValueError: Meta endpoint! Unexpected status code: 502, with response body: None.;
Meta endpoint! Unexpected status code: 502, with response body: None.

@crazywoola
Copy link
Member

Meta endpoint! Unexpected status code: 502, with response body: None.

This error suggests you do not have the weaviate started correctly, please check the container status if this service is alive.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants