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

Meta endpoint! Unexpected status code: 404 using weaviate vdb #10398

Closed
5 tasks done
Derican opened this issue Nov 7, 2024 · 6 comments
Closed
5 tasks done

Meta endpoint! Unexpected status code: 404 using weaviate vdb #10398

Derican opened this issue Nov 7, 2024 · 6 comments
Labels
👻 feat:rag Embedding related issue, like qdrant, weaviate, milvus, vector database. stale Issue has not had recent activity or appears to be solved. Stale issues will be automatically closed

Comments

@Derican
Copy link

Derican commented Nov 7, 2024

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

v0.11.0

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

  1. use docker-compose to create dify
  2. add docs to knowledge, select high quality and openai embedding

✔️ Expected Behavior

docs are indexed

❌ Actual Behavior

Screenshot 2024-11-06 224858

@dosubot dosubot bot added the 👻 feat:rag Embedding related issue, like qdrant, weaviate, milvus, vector database. label Nov 7, 2024
Copy link

dosubot bot commented Nov 7, 2024

I found a similar unsolved discussion regarding a 404 error with Weaviate: Error: Response output is missing or does not contain embeddings [1].

Additionally, here are some potential solutions and considerations for resolving the 404 error when using Dify with Weaviate:

  1. Configuration Settings: Ensure that your Weaviate configuration settings are correct. You should have the following environment variables set:

    • VECTOR_STORE set to weaviate.
    • WEAVIATE_ENDPOINT pointing to the correct Weaviate endpoint (e.g., http://weaviate:8080).
    • Ensure that API key authentication is correctly configured if enabled [2].
  2. Network Configuration: Verify that your Docker network settings allow communication between Dify and Weaviate. Dify uses a custom Docker network for internal communication, so ensure that Weaviate is accessible on the default network [3].

  3. Error Handling: Dify tolerates 404 errors during certain operations, such as deleting non-existent objects. However, if you're encountering a 404 during indexing, it might indicate a misconfiguration or connectivity issue [4].

  4. Logs and Debugging: Check the logs for any error messages that might provide more context on the issue. Dify logs errors at the INFO level and above, which can help diagnose connectivity issues [5].

If these steps do not resolve the issue, consider reviewing the detailed configuration and network settings to ensure everything is set up correctly.

To continue talking to Dosu, mention @dosu.

@Derican
Copy link
Author

Derican commented Nov 7, 2024

I have mentioned info in Issue#3216 and #734 , but neither of the solutions worked. The network to openai is tested and it worked, proxy setting is in #9960 . Logs of worker and weaviate are pasted below:
image
image

@crazywoola
Copy link
Member

Can you attach the results of docker ps.

@Derican
Copy link
Author

Derican commented Nov 7, 2024

Can you attach the results of docker ps.

image

@Derican
Copy link
Author

Derican commented Nov 7, 2024

I figure out by adding networks to weaviate:

weaviate:
    image: semitechnologies/weaviate:1.19.0
    profiles:
      - ''
      - weaviate
    restart: always
    volumes:
      # Mount the Weaviate data directory to the con tainer.
      - ./volumes/weaviate:/var/lib/weaviate
    environment:
      # The Weaviate configurations
      # You can refer to the [Weaviate](https://weaviate.io/developers/weaviate/config-refs/env-vars) documentation for more information.
      PERSISTENCE_DATA_PATH: ${WEAVIATE_PERSISTENCE_DATA_PATH:-/var/lib/weaviate}
      QUERY_DEFAULTS_LIMIT: ${WEAVIATE_QUERY_DEFAULTS_LIMIT:-25}
      AUTHENTICATION_ANONYMOUS_ACCESS_ENABLED: ${WEAVIATE_AUTHENTICATION_ANONYMOUS_ACCESS_ENABLED:-false}
      DEFAULT_VECTORIZER_MODULE: ${WEAVIATE_DEFAULT_VECTORIZER_MODULE:-none}
      CLUSTER_HOSTNAME: ${WEAVIATE_CLUSTER_HOSTNAME:-node1}
      AUTHENTICATION_APIKEY_ENABLED: ${WEAVIATE_AUTHENTICATION_APIKEY_ENABLED:-true}
      AUTHENTICATION_APIKEY_ALLOWED_KEYS: ${WEAVIATE_AUTHENTICATION_APIKEY_ALLOWED_KEYS:-WVF5YThaHlkYwhGUSmCRgsX3tD5ngdN8pkih}
      AUTHENTICATION_APIKEY_USERS: ${WEAVIATE_AUTHENTICATION_APIKEY_USERS:-hello@dify.ai}
      AUTHORIZATION_ADMINLIST_ENABLED: ${WEAVIATE_AUTHORIZATION_ADMINLIST_ENABLED:-true}
      AUTHORIZATION_ADMINLIST_USERS: ${WEAVIATE_AUTHORIZATION_ADMINLIST_USERS:-hello@dify.ai}
    networks:
      - ssrf_proxy_network
      - default

and adding no_proxy to api and worker:

worker:
    image: langgenius/dify-api:0.11.0
    restart: always
    environment:
      # Use the shared environment variables.
      <<: *shared-api-worker-env
      # Startup mode, 'worker' starts the Celery worker for processing the queue.
      MODE: worker
      HTTP_PROXY: ${SANDBOX_HTTP_PROXY:-http://ssrf_proxy:3128}
      HTTPS_PROXY: ${SANDBOX_HTTPS_PROXY:-http://ssrf_proxy:3128}
      no_proxy: 'localhost,127.0.0.1,172.*.*.*,.local,weaviate'

And be aware that knowledge base must be re-created as the index of previously created base will not work on retrying indexing.

Copy link

dosubot bot commented Dec 8, 2024

Hi, @Derican. I'm Dosu, and I'm helping the Dify team manage their backlog. I'm marking this issue as stale.

Issue Summary

  • You reported a 404 error with Weaviate in Dify version 0.11.0 using a self-hosted Docker setup.
  • Suggested solutions included checking configuration settings, network configurations, and logs.
  • You resolved the issue by modifying the Docker setup with specific network configurations and environment variables.
  • Recreating the knowledge base was necessary for proper indexing.

Next Steps

  • Is this issue still relevant to the latest version of the Dify repository? If so, please comment to keep the discussion open.
  • Otherwise, this issue will be automatically closed in 15 days.

Thank you for your understanding and contribution!

@dosubot dosubot bot added the stale Issue has not had recent activity or appears to be solved. Stale issues will be automatically closed label Dec 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
👻 feat:rag Embedding related issue, like qdrant, weaviate, milvus, vector database. stale Issue has not had recent activity or appears to be solved. Stale issues will be automatically closed
Projects
None yet
Development

No branches or pull requests

2 participants