Failed to add interface to sandbox

d1snin

I'm trying to run two Docker containers attached to a single Docker network using Docker Compose. I'm running into the following error when I run the containers:

Error response from daemon: failed to add interface veth5b3bcc5 to sandbox: 
error setting interface "veth5b3bcc5" IP to 172.19.0.2/16: 
cannot program address 172.19.0.2/16 in sandbox 
interface because it conflicts with existing 
route {Ifindex: 10 Dst: 172.19.0.0/16 Src: 172.19.0.1 Gw: <nil> Flags: [] Table: 254}

My docker-compose.yml looks like this:

version: '3'

volumes:
  dsn-redis-data:
    driver: local

  dsn-redis-conf:
    driver: local

networks:
  dsn-net:
    driver: bridge

services:
  duty-students-notifier:
    image: duty-students-notifier:latest
    network_mode: host
    container_name: duty-students-notifier
    build:
      context: ../
      dockerfile: ./docker/Dockerfile
    env_file: ../.env
    volumes:
      - /etc/timezone:/etc/timezone:ro
      - /etc/localtime:/etc/localtime:ro
    networks:
      - dsn-net
    restart: always

  dsn-redis:
    image: redis:latest
    expose:
      - 5432
    volumes:
      - dsn-redis-data:/var/lib/redis
      - dsn-redis-conf:/usr/local/etc/redis/redis.conf
    networks:
      - dsn-net
    restart: always

Thanks!

David Maze

The network_mode: host setting generally disables Docker networking, and can interfere with other options. In your case it looks like it might be trying to apply the networks: configuration to the host system network layer.

network_mode: host is almost never necessary, and deleting it may resolve this issue.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Failed to declare MonadPlus interface

From Dev

Failed to convert []interface{} to []byte: "interface {} is []interface [], not []uint8"

From Dev

Add module inside cuckoo sandbox

From Dev

Playground Xcode : Failed to obtain sandbox extension

From Dev

Failed to locate a binder for interface

From Dev

Intero : Failed to load interface for Lib

From Dev

Failed to obtain sandbox extension for path Swift playground error

From Dev

Failed create pod sandbox: rpc error: code = Unknown desc = NetworkPlugin cni failed to set up pod network

From Dev

Failed to add API

From Dev

Haskell Failed to load interface for module

From Dev

Failed to add MvvmCross 6.0.0

From Dev

Failed to add callback to vector

From Dev

Starting container failed: subnet sandbox join failed for \"10.255.0.0/16\"

From Dev

Taiko throws Error: Failed to launch chrome No usable sandbox

From Dev

Kubernetes deploy failed with "Failed create pod sandbox" in GKE

From Dev

Failed to add the foreign key

From Dev

Add DKK (Danish Krone) to Sandbox Business Account

From Dev

Gnome graphical interface failed to load

From Dev

Paypal sandbox zero balance testing failed

From Dev

Failed to add/activate connection

From Dev

Failed to get the Accelerometer readings on Kaa SandBox server

From Dev

PayPal Sandbox IPN URL returns "Secure Connection Failed"

From Dev

Add prefix failed with percentage

From Dev

Sandbox extension creation failed: client lacks entitlements? for path:

From Dev

How to add bot to coversation in Circuit sandbox?

From Dev

Can not add criteria api predicate in Kotlin, getting Type interface failed error

From Dev

Failed to load interface for ‘System’

From Dev

Failed to add navigation dependency

From Dev

Docker Compose - Changing the network mode to "host" results in error: Error response from daemon: failed to add interface veth701c890 to sandbox

Related Related

  1. 1

    Failed to declare MonadPlus interface

  2. 2

    Failed to convert []interface{} to []byte: "interface {} is []interface [], not []uint8"

  3. 3

    Add module inside cuckoo sandbox

  4. 4

    Playground Xcode : Failed to obtain sandbox extension

  5. 5

    Failed to locate a binder for interface

  6. 6

    Intero : Failed to load interface for Lib

  7. 7

    Failed to obtain sandbox extension for path Swift playground error

  8. 8

    Failed create pod sandbox: rpc error: code = Unknown desc = NetworkPlugin cni failed to set up pod network

  9. 9

    Failed to add API

  10. 10

    Haskell Failed to load interface for module

  11. 11

    Failed to add MvvmCross 6.0.0

  12. 12

    Failed to add callback to vector

  13. 13

    Starting container failed: subnet sandbox join failed for \"10.255.0.0/16\"

  14. 14

    Taiko throws Error: Failed to launch chrome No usable sandbox

  15. 15

    Kubernetes deploy failed with "Failed create pod sandbox" in GKE

  16. 16

    Failed to add the foreign key

  17. 17

    Add DKK (Danish Krone) to Sandbox Business Account

  18. 18

    Gnome graphical interface failed to load

  19. 19

    Paypal sandbox zero balance testing failed

  20. 20

    Failed to add/activate connection

  21. 21

    Failed to get the Accelerometer readings on Kaa SandBox server

  22. 22

    PayPal Sandbox IPN URL returns "Secure Connection Failed"

  23. 23

    Add prefix failed with percentage

  24. 24

    Sandbox extension creation failed: client lacks entitlements? for path:

  25. 25

    How to add bot to coversation in Circuit sandbox?

  26. 26

    Can not add criteria api predicate in Kotlin, getting Type interface failed error

  27. 27

    Failed to load interface for ‘System’

  28. 28

    Failed to add navigation dependency

  29. 29

    Docker Compose - Changing the network mode to "host" results in error: Error response from daemon: failed to add interface veth701c890 to sandbox

HotTag

Archive