langgenius / dify

Dify is an open-source LLM app development platform. Dify's intuitive interface combines AI workflow, RAG pipeline, agent capabilities, model management, observability features and more, letting you quickly go from prototype to production.
https://dify.ai
Other
50.37k stars 7.22k forks source link

Report "Not a valid PEM pre boundary" error when I add a model #4238

Closed WhiteRoseinShangHai closed 5 months ago

WhiteRoseinShangHai commented 5 months ago

Self Checks

Dify version

0.6.7

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

when I add a model, report "Not a valid PEM pre boundary" error, I try add Zhipu and deepseek model.image

✔️ Expected Behavior

No response

❌ Actual Behavior

No response

dosubot[bot] commented 5 months ago

The error "Not a valid PEM pre boundary" you're encountering typically indicates an issue with the formatting of SSL/TLS certificates, particularly when a certificate does not have the correct PEM (Privacy Enhanced Mail) headers. This can happen if Dify is trying to establish a secure HTTPS connection and the certificate involved is improperly formatted. A properly formatted PEM certificate should start with -----BEGIN CERTIFICATE----- and end with -----END CERTIFICATE-----.

To address this issue, ensure that:

This error might not be directly related to the process of adding a model in Dify but could stem from how Dify is set up to communicate over HTTPS, either internally or with external services. If you can provide more details about the specific context in which this error occurs, it would help in identifying a more precise solution.

#### Details **Sources** - [添加deepseek模型时,输入API KEY后保存,显示Not a valid PEM pre boundary错误](https://github.com/langgenius/dify/issues/4222) - [en/tutorials/model-configuration/localai.md](https://github.com/langgenius/dify-docs/blob/main/en/tutorials/model-configuration/localai.md) - [en/tutorials/model-configuration/README.md](https://github.com/langgenius/dify-docs/blob/main/en/tutorials/model-configuration/README.md)
**About Dosu** This response is meant to be useful and save you time. It is **not meant to be a precise solution**, but rather a starting point for your own research. Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.

To continue the conversation, mention @dosu.

WhiteRoseinShangHai commented 5 months ago

I use dify in private net,it don't have domain, so I doesn't use ssl, use http not https

Hansen523 commented 5 months ago

@dosu I use dify in private net,it don't have domain, so I doesn't use ssl, use http not https

zeroameli commented 5 months ago

@WhiteRoseinShangHai Try checking the "encrypt_public_key" in table "tenants", it seem you got an invalid value.