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

Podman deployment issues: RuntimeError: missing networks: default and socket.gaierror: [Errno -3] Temporary failure in name resolution #4773

Closed
4 tasks done
elviswf opened this issue May 29, 2024 · 3 comments
Labels
🐞 bug Something isn't working

Comments

@elviswf
Copy link

elviswf commented May 29, 2024

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).
  • Please do not modify this template :) and fill in all the required fields.

Dify version

0.6.9

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

Docker deploy:

sudo podman-compose -f ./docker-compose.yaml up

✔️ Expected Behavior

Docker deployed normally.

❌ Actual Behavior

podman-compose version: 1.0.6
['podman', '--version', '']
using podman version: 4.6.1
Traceback (most recent call last):
File "/bin/podman-compose", line 11, in
load_entry_point('podman-compose==1.0.6', 'console_scripts', 'podman-compose')()
File "/usr/lib/python3.6/site-packages/podman_compose.py", line 2940, in main
podman_compose.run()
File "/usr/lib/python3.6/site-packages/podman_compose.py", line 1420, in run
self._parse_compose_file()
File "/usr/lib/python3.6/site-packages/podman_compose.py", line 1567, in _parse_compose_file
raise RuntimeError(f"missing networks: {missing_nets_str}")
RuntimeError: missing networks: default

@elviswf
Copy link
Author

elviswf commented May 29, 2024

Adding the default networks solved my problem.
docker-compose.yaml: line 478-485 changed to this:

networks:
  # create a network between sandbox, api and ssrf_proxy, and can not access outside.
  ssrf_proxy_network:
    driver: bridge
    internal: true
  default:
    driver: bridge

@dosubot dosubot bot added the 🐞 bug Something isn't working label May 29, 2024
Copy link

dosubot bot commented May 29, 2024

Hey @elviswf! I'm here to assist you with any bugs, questions, or contributions you might have. Let's tackle this together!

Great to hear that adding the default networks resolved your issue! If you encounter any further problems or have any more questions, feel free to ask. Happy coding!

Details

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.

@elviswf elviswf changed the title RuntimeError: missing networks: default Podman deployment issues: RuntimeError: missing networks: default and socket.gaierror: [Errno -3] Temporary failure in name resolution May 30, 2024
@elviswf
Copy link
Author

elviswf commented May 30, 2024

I found another issue in podman deployment process:
socket.gaierror: [Errno -3] Temporary failure in name resolution

It says the sandbox is not in the networks.

When I add default to the sandbox config, the error is solved. docker-compose.yaml: line 406-407

  sandbox:
    image: langgenius/dify-sandbox:0.2.0
    restart: always
    environment:
      # The DifySandbox configurations
      # Make sure you are changing this key for your deployment with a strong key.
      # You can generate a strong key using `openssl rand -base64 42`.
      API_KEY: dify-sandbox
      GIN_MODE: 'release'
      WORKER_TIMEOUT: 15
      ENABLE_NETWORK: 'true'
      HTTP_PROXY: 'http://ssrf_proxy:3128'
      HTTPS_PROXY: 'http://ssrf_proxy:3128'
    volumes:
      - ./volumes/sandbox/dependencies:/dependencies:z
    networks:
      - ssrf_proxy_network
      - default

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants