0.15.3 upgrade 1.0.1,poetry run flask install-plugins --workers=2 failed
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.0.1
Cloud or Self Hosted
Self Hosted (Docker)
Steps to reproduce
✔️ Expected Behavior
I used ssrf_proxy to upgrade dify for pure Intranet isolation network, and configured ssrf for api, worker, and dify-plugins-daemon. When I executed install-plugins, errors were reported. I have tested that ssrf_proxy can be proxy to the Internet, and plug-ins can be downloaded through the proxy in the api container
❌ Actual Behavior
Extra data: line 1 column 5(char4)
@xiaoyunjie Hello there! I'm here to help you with any bugs, questions, or contributions. Let's tackle this issue together!
I found a similar issue related to the poetry run flask migrate-data-for-plugin command failing during an upgrade from version 0.15.3 to 1.0.0. This issue was closed with a pull request that addressed a specific error related to data truncation [1]. However, your issue seems to be related to a JSONDecodeError during the plugin installation process.
The error you're encountering, JSONDecodeError due to extra data at line 1, column 5, suggests that there might be an issue with the JSON response being received during the plugin installation process. This could be related to the configuration of the ssrf_proxy or the way the proxy is handling the JSON data.
To address this, ensure that your ssrf_proxy configuration is correctly set up to handle JSON responses without modification. Additionally, verify that the proxy settings for the API, worker, and dify-plugins-daemon are correctly configured to allow seamless communication and data transfer.
If the issue persists, you might want to check the logs for any additional information that could help identify the source of the malformed JSON response.
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
I think ssrf_proxy has been correctly configured. I can connect to the external network in my test, and api, worker and plugin-daemon have been correctly configured with agents. Since I haven't seen the information of Intranet upgrade, what else do I need to do。 @dosu
To ensure a successful upgrade of Dify in an intranet environment, you should verify a few key configurations:
-
Proxy Configuration: Ensure that your
ssrf_proxyis correctly configured to handle all necessary network requests. This includes setting up the correct cache peers and access control lists (ACLs) in your Squid proxy configuration. Make sure that the proxy settings in your Docker Compose files for the API, worker, and plugin-daemon services are correctly pointing to thessrf_proxy. -
Environment Variables: Double-check that all environment variables related to proxy settings are correctly set in your Docker Compose YAML files. This includes
HTTP_PROXY,HTTPS_PROXY, andNO_PROXYvariables. These should be configured to allow internal communication between services without being routed through the proxy. -
Network Configuration: Ensure that your Docker network settings allow for seamless communication between the services. This includes verifying that the
api,worker, andplugin_daemonservices can communicate with each other and with thessrf_proxy. -
Logs and Debugging: Check the logs of your services for any errors or warnings that might indicate misconfigurations or network issues. This can provide insights into where the JSONDecodeError might be originating from.
-
Plugin Installation: Since the error occurs during the plugin installation process, ensure that the plugins are accessible and that there are no network restrictions preventing their download and installation.
If these configurations are correct and the issue persists, consider reviewing the specific JSON responses being handled during the plugin installation to identify any discrepancies or malformed data.
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