Open Megadeth9919 opened 4 hours ago
@Megadeth9919 Hello there! I'm here to help you with bugs, questions, and becoming a contributor. Let's squash those bugs together! 🤖
I found some similar issues and discussions that might help you resolve the 502 error related to the sandbox service in your self-hosted Dify environment:
Local Docker Setup Failure - This discussion is open and might contain relevant troubleshooting steps for Docker setup issues [1].
Sandbox can't use - This is another open discussion that addresses issues with the sandbox service [2].
Sandbox service start - This discussion is also open and might provide insights into starting the sandbox service correctly [3].
For resolving the 502 error, ensure the following:
Sandbox Service Availability: Verify that the sandbox service is running. Use docker compose ps
to check the status of all containers and ensure the sandbox service is active [4].
Configuration Settings: Check that the dify_config.CODE_EXECUTION_ENDPOINT
and dify_config.CODE_EXECUTION_API_KEY
are correctly set. The API key should match the one configured in your setup [4].
Network and Proxy Configuration: Ensure there are no network issues and that the ssrf_proxy
service is running and properly configured. The proxy settings should match the proxy service's address [4].
Nginx Configuration: Use the command docker ps -q | xargs -n 1 docker inspect --format '{{ .Name }}: {{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}'
to find the correct IP addresses for your containers. Update the Nginx configuration with these IPs and restart the Nginx container [4].
These steps should help you troubleshoot and resolve the 502 error in your Dify setup.
To continue talking to Dosu, mention @dosu.
2024-10-23 13:47:28,357.357 INFO [Thread-4423 (process_request_thread)] [_internal.py:97] - 127.0.0.1 - - [23/Oct/2024 13:47:28] "POST /console/api/apps/9cf38c92-14a7-4332-94d4-27d434680235/advanced-chat/workflows/draft/run HTTP/1.1" 200 - 2024-10-23 13:47:28,805.805 INFO [Thread-4424 (_generate_worker)] [_client.py:1038] - HTTP Request: POST https://open.bigmodel.cn/api/paas/v4/chat/completions "HTTP/1.1 200 OK" 2024-10-23 13:47:30,946.946 INFO [Thread-4424 (_generate_worker)] [_client.py:1038] - HTTP Request: POST http://127.0.0.1:8194/v1/sandbox/run "HTTP/1.1 502 Bad Gateway"
(empty)
2024-10-23 21:50:02 [GIN] 2024/10/23 - 13:50:02 | 200 | 41.25µs | ::1 | GET "/health" 2024-10-23 21:50:32 [GIN] 2024/10/23 - 13:50:32 | 200 | 32.272µs | ::1 | GET "/health" 2024-10-23 21:51:02 [GIN] 2024/10/23 - 13:51:02 | 200 | 43.875µs | ::1 | GET "/health" 2024-10-23 21:51:32 [GIN] 2024/10/23 - 13:51:32 | 200 | 33.745µs | ::1 | GET "/health"
Self Checks
Dify version
0.9.2
Cloud or Self Hosted
Self Hosted (Source)
Steps to reproduce
✔️ Expected Behavior
No response
❌ Actual Behavior
No response