When you use a non-OpenAI agent and the agent is located outside of mainland China, you will often get an error: Connection reset by peer error when callingmodel - ConnectionResetError(104) #22189
GrittyXue
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Therefore, in order to solve this problem, you need to configure a proxy server and other measures, modify the docker-compose configuration file, and configure the proxy port.
It should be noted that the configuration of the proxy may cause the vector library, database, sandbox and other internal services to fail to run due to the proxy. At this time, you need to set it to skip this proxy and the network segment of the intranet to prevent dify from working properly due to the proxy server.
You must check out the no_proxy web in dify ,maybe other web that is the internal web server,such as sandbox
`
x-shared-env: &shared-api-worker-env
HOST_PROXY: ${HOST_PROXY:-http://172.19.0.1:7890}
API service
services:
api:
image: langgenius/dify-api:1.5.1
dns:
- 8.8.8.8
- 8.8.4.4
restart: always
environment:
# proxy you need to change
http_proxy: "${HOST_PROXY}"
https_proxy: "${HOST_PROXY}"
# you must check out the no_proxy web in dify ,maybe other web that is the internal web server
no_proxy: >
localhost,127.0.0.1,::1,
plugin_daemon,
sandbox,
weaviate,
172.16.0.0/12,
172.19.0.0/16,
10.0.0.0/8,
192.168.0.0/16
depends_on:
db:
condition: service_healthy
redis:
condition: service_started
volumes:
# Mount the storage directory to the container, for storing user files.
- ./volumes/app/storage:/app/api/storage
networks:
- ssrf_proxy_network
- default
plugin daemon
plugin_daemon:
image: langgenius/dify-plugin-daemon:0.1.3-local
restart: always
environment:
# proxy you need to change
http_proxy: "${HOST_PROXY}"
https_proxy: "${HOST_PROXY}"
# you must check out the no_proxy web in dify ,maybe other web that is the internal web server
no_proxy: >
localhost,127.0.0.1,::1,
plugin_daemon,
sandbox,
weaviate,
172.16.0.0/12,
172.19.0.0/16,
10.0.0.0/8,
192.168.0.0/16
`
Beta Was this translation helpful? Give feedback.
All reactions