dify icon indicating copy to clipboard operation
dify copied to clipboard

(Caused by SSLError(SSLEOFError(8, '[SSL: UNEXPECTED_EOF_WHILE_READING] EOF occurred in violation of protocol (_ssl.c:1000)')))

Open pigracing opened this issue 11 months ago • 7 comments

Self Checks

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

Dify version

1.3.1

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

I installed plugin OpenAI-API-compatible of version 0.0.14 my llm api service was deployed in Deno when i add llm with plugin OpenAI-API-compatible, report the wrong message:

An error occurred during credentials validation: HTTPSConnectionPool(host='xxxx.deno.dev', port=443): Max retries exceeded with url: /v1/chat/completions (Caused by SSLError(SSLEOFError(8, '[SSL: UNEXPECTED_EOF_WHILE_READING] EOF occurred in violation of protocol (_ssl.c:1000)')))

in the dify version 1.2,it work fine!

✔️ Expected Behavior

No response

❌ Actual Behavior

No response

pigracing avatar Apr 30 '25 13:04 pigracing

A similar issue was reported in a closed thread regarding SSL errors in Dify's self-hosted Docker setup. The issue was related to SSL handshake errors and was resolved by updating to a newer version of Dify that included specific fixes [1].

For your specific issue with Dify version 1.3.1, here are some steps you can take to troubleshoot and potentially resolve the SSL error:

  1. Update Dify: Ensure you are using the latest version of Dify, as updates may include important fixes for SSL-related issues.

  2. Environment Variables: If you are using Docker Compose, try unsetting the HTTP_PROXY and HTTPS_PROXY environment variables before running your setup.

  3. Configuration Adjustments: When connecting to local services, replace 'localhost' with 'host.docker.internal' in your configuration. This can help resolve network-related issues within Docker.

  4. SSL Verification: You can configure Dify to bypass SSL certificate verification errors by setting the HTTP_REQUEST_NODE_SSL_VERIFY configuration to False in the dify_config.

  5. Certbot Container: Since Dify version 1.3.1 includes a Certbot container for managing SSL certificates, ensure that it is correctly configured and running to handle SSL connections properly [2].

These steps should help address the SSL error you are encountering. If the issue persists, further investigation into the specific configuration of your Deno deployment and SSL setup may be necessary.

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] avatar Apr 30 '25 13:04 dosubot[bot]

i use docker compose and i do not use http proxy

pigracing avatar Apr 30 '25 13:04 pigracing

any body who can help me? why?

pigracing avatar May 01 '25 16:05 pigracing

Have you solved it? I had the same problem configuring xai

snakeJohn avatar May 07 '25 02:05 snakeJohn

no, but sometimes work fine, i don't know why? the remote api service does work fine, when i call it outside dify it work fine

pigracing avatar May 10 '25 16:05 pigracing

no, but sometimes work fine, i don't know why? the remote api service does work fine, when i call it outside dify it work fine

I figured it out; the solution was to add a proxy to almost all the containers.

snakeJohn avatar May 23 '25 13:05 snakeJohn

no, but sometimes work fine, i don't know why? the remote api service does work fine, when i call it outside dify it work fine

I figured it out; the solution was to add a proxy to almost all the containers.

Hello, can you teach me how to add proxy to the container? I really want to solve this problem, thank you!

Derekzhym avatar May 29 '25 04:05 Derekzhym

no, but sometimes work fine, i don't know why? the remote api service does work fine, when i call it outside dify it work fine

I figured it out; the solution was to add a proxy to almost all the containers.

Hello, can you teach me how to add proxy to the container? I really want to solve this problem, thank you!

Send your docker-compose.yaml file to the AI (I'm using Gemini), and have it add proxy settings to almost every container.

snakeJohn avatar Jun 03 '25 02:06 snakeJohn

it work fine now when i use v1.4.0

pigracing avatar Jun 12 '25 01:06 pigracing

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

Issue Summary:

  • You reported an SSL EOF error using the OpenAI-API-compatible plugin v0.0.14 with Dify v1.3.1 in a self-hosted Docker setup.
  • The error did not occur in Dify v1.2.
  • Troubleshooting suggestions included updating Dify, adjusting Docker network settings, and configuring SSL verification.
  • Another user shared that adding proxy settings to containers helped resolve a similar issue.
  • You confirmed the issue was resolved after upgrading to Dify v1.4.0.

Next Steps:

  • Please confirm if this issue is still relevant with the latest version of Dify.
  • If it is, feel free to comment to keep the discussion open; otherwise, I will automatically close this issue in 15 days.

Thank you for your understanding and contribution!

dosubot[bot] avatar Aug 31 '25 16:08 dosubot[bot]