Docker-compose cannot add veth (virtual interface) for docker connection

Question :
Here is my docker-compose.yaml:

version: '2'

services:
    elasticsearch:
        image: 'elasticsearch:latest'
        ports:
            - "9200:9200"

    logstash:
        build: './logstash_image'
        links:
            - elasticsearch
        ports:
            - "5000:5000"
            - "5001:5001"
            - "5201:5201"
            - "5202:5202"
            - "5203:5203"

    kibana:
        image: 'kibana:latest'
        ports:
             - '5601:5601'
        links:
             - elasticsearch
        volumes:
             - ./kibana.yml:/opt/kibana/config/kibana.yml

And here is mine Dockerfile:

FROM logstash:latest

LABEL maintainer1.name="anon" \
      maintainer1.email="anon@mail.com" \
      maintainer2.name="myname" \
      maintainer2.email="myname@somemail.com"

RUN /opt/logstash/bin/logstash-plugin install logstash-input-log4j2-logstash2 logstash-output-syslog
# FIX: use `logstash-input-log4j2` instead of `logstash-input-log4j2-logstash2`?
# other plugins: logstash-input-http, logstash-input-log4j
COPY logstash.conf /etc/logstash/conf.d/logstash.conf

ENTRYPOINT ["logstash","-f","/etc/logstash/conf.d/logstash.conf", "--debug"]

This was used to create just fine a few days ago, however I am currently getting the following error message:

[root@somemachine elk_stack]# docker-compose up -d
Creating network "elkstack_default" with the default driver
Building logstash
Step 1 : FROM logstash:latest
 ---> 1ca34df702f8
Step 2 : LABEL maintainer1.name ...
 ---> Using cache
 ---> 6dd78ac216f2
Step 3 : RUN /opt/logstash/bin/logstash-plugin install logstash-input-log4j2-logstash2 logstash-output-syslog
 ---> Running in 885b0429b3a4
ERROR: Service 'logstash' failed to build: failed to create endpoint focused_almeida on network bridge: adding interface veth0491201 to bridge docker0 failed: operation not supported

ERROR: the service "logstash" service could not be built: could not create the focus_almeida endpoint on the network bridge: add veth0491201 interface to docker0 bridge failed: operation is not supported

, , (1) docker-compose logstash elkstack_logstash_1 , .
(2) veth0491201 - docker0, - , docker0.

:
docker ps -a :

CONTAINER ID        IMAGE                       COMMAND                  CREATED             STATUS              PORTS                                        NAMES
885b0429b3a4        6dd78ac216f2                "/bin/sh -c '/opt/log"   18 minutes ago      Created                                                          focused_almeida

docker network ls :

NETWORK ID          NAME                          DRIVER            
23bcc8c01ad4        bridge                        bridge              
4aea66903c6b        none                          null                
67cb26c508d9        host                          host                
9fc4a42bbcf6        elkstack_default              bridge  

docker network inspect elkstack_default:

[
    {
        "Name": "elkstack_default",
        "Id": "9fc4a42bbcf6800889f8e9bc71ab394ebf6f97b21e0ce2345253b055d17138aa",
        "Scope": "local",
        "Driver": "bridge",
        "IPAM": {
            "Driver": "default",
            "Options": null,
            "Config": [
                {
                    "Subnet": "172.19.0.0/16",
                    "Gateway": "172.19.0.1/16"
                }
            ]
        },
        "Containers": {},
        "Options": {}
    }
]

route -n:

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         10.0.120.1      0.0.0.0         UG    100    0        0 docker0
10.0.120.0      0.0.0.0         255.255.255.0   U     100    0        0 docker0
172.17.0.0      0.0.0.0         255.255.0.0     U     0      0        0 br-83e64c848669
172.19.0.0      0.0.0.0         255.255.0.0     U     0      0        0 br-9fc4a42bbcf6

:

  • docker --version: 1.10.2, c3959b1
    docker-compose --version: docker-compose version 1.8.0, build f3628c7
    Docker?
  • , , , ..
    , 172.18.0.0 - , , Docker , . , ?
  • , (2), , , :
networks:
    net:
        driver: bridge
        ipam:
            driver: default
            config:
            - subnet: 172.30.0.0/16
              ip_range: 172.30.5.0/24
  • - , , , , .
  • , , , .

    uname -a: Linux somemachine 3.10.0-327.10.1.el7.x86_64 #1 SMP Tue Feb 16 17:03:50 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
    cat/etc/centos-release: CentOS Linux release 7.2.1511 (Core)

:
 - http://54.71.194.30:4017/articles/networking/#how-docker-networks-a-container
 - https://github.com/docker/docker/issues/23047
 - https://github.com/docker/docker/issues/15341

+4
2

.

, , unix brctl veth ?

:

brctl addif veth0491201 docker0

, script, , . .

, veth , , . ​​ .

sûre ip.

, .

, "brctl addif veth0491201 docker0" .

" ", , , , , " " ( ), ( ).

+1

Source: https://habr.com/ru/post/1658187/


All Articles