Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sandbox container access https request prompt 403 error, but api container access https request is OK #12974

Open
5 tasks done
justify-what opened this issue Jan 23, 2025 · 5 comments
Labels
🐞 bug Something isn't working 🤔 cant-reproduce We can not reproduce it or the information is limited

Comments

@justify-what
Copy link

Self Checks

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

Dify version

0.14.2

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

sandbox container access https request prompt 403 error, but api container access https request is OK

✔️ Expected Behavior

No response

❌ Actual Behavior

No response

@dosubot dosubot bot added 🐞 bug Something isn't working 🤔 cant-reproduce We can not reproduce it or the information is limited labels Jan 23, 2025
Copy link

dosubot bot commented Jan 23, 2025

I found a similar closed issue that might help you resolve the 403 error when the sandbox container accesses HTTPS requests, while the API container works fine. The suggested solution involves checking and configuring the squid.conf file:

  1. Ensure your domain is listed in squid.conf.
  2. Verify ACLs and Rules: Make sure your access control lists (ACLs) and HTTP access rules in squid.conf are correctly configured to allow traffic on the ports you're using.
  3. Check Squid Logs: Review the Squid logs for any specific error messages or clues that might indicate why the requests are being blocked.
  4. Restart Squid Service: After making changes to squid.conf, restart the Squid service to apply the new configuration.
  5. Test from Inside Docker: Perform curl tests from inside the Docker container to verify that the requests are being processed correctly.
  6. Firewall and Network Settings: Ensure that there are no firewall rules or network settings blocking access to the specified ports [1].

Additionally, ensure that the SANDBOX_ENABLE_NETWORK environment variable is set to true, and that the sandbox service is properly connected to the Docker network [2].

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other

@justify-what
Copy link
Author

The sandbox container accesses the https interface through the curl method prompting 403 @dosu

Copy link

dosubot bot commented Jan 23, 2025

The 403 error when the sandbox container accesses the HTTPS interface using the curl method is likely due to the domain not being listed in squid.conf. To resolve this issue, you should:

  1. Ensure your domain is listed in squid.conf.
  2. Run curl tests from inside the Docker container, not from your host machine.
  3. Verify that the squid.conf is properly configured to allow HTTPS requests. This includes defining the SSL_ports and Safe_ports ACLs to include port 443, allowing the CONNECT method for SSL_ports, and ensuring access from all sources is permitted [1][2].

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other

@justify-what
Copy link
Author

The configuration file has added port 8585 and is releasing all requests @dosu

Image

Copy link

dosubot bot commented Jan 23, 2025

Hey @justify-what! It looks like you're diving deep into configuration files and proxy settings. While I can help with technical questions and bug fixes, I'm not equipped to analyze images or provide feedback on visual content. If you think I should be able to help with this, feel free to reach out to the Dosu Team. They're always open to suggestions!

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working 🤔 cant-reproduce We can not reproduce it or the information is limited
Projects
None yet
Development

No branches or pull requests

1 participant