8000 starting container failed: No such network · Issue #2015 · moby/libnetwork · GitHub
[go: up one dir, main page]

Skip to content

starting container failed: No such network #2015

@soletan

Description

@soletan

Tried setting up docker service in a docker swarm consisting of three nodes. After deploying service does not start with docker inspect showing error message given as subject.

OS: Ubuntu 16.04.3

docker version:

Client:
 Version:      17.09.0-ce
 API version:  1.32
 Go version:   go1.8.3
 Git commit:   afdb6
8000
d4
 Built:        Tue Sep 26 22:42:18 2017
 OS/Arch:      linux/amd64

Server:
 Version:      17.09.0-ce
 API version:  1.32 (minimum version 1.12)
 Go version:   go1.8.3
 Git commit:   afdb6d4
 Built:        Tue Sep 26 22:40:56 2017
 OS/Arch:      linux/amd64
 Experimental: false

docker info:

Containers: 179
 Running: 0
 Paused: 0
 Stopped: 179
Images: 5
Server Version: 17.09.0-ce
Storage Driver: overlay2
 Backing Filesystem: extfs
 Supports d_type: true
 Native Overlay Diff: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
 Volume: local
 Network: bridge host macvlan null overlay
 Log: awslogs fluentd gcplogs gelf journald json-file logentries splunk syslog
Swarm: active
 NodeID: x7d8n8g52ag6tf07camgh6sb9
 Is Manager: true
 ClusterID: b8dke0zbjde7dl2k0eqe9roib
 Managers: 3
 Nodes: 3
 Orchestration:
  Task History Retention Limit: 5
 Raft:
  Snapshot Interval: 10000
  Number of Old Snapshots to Retain: 0
  Heartbeat Tick: 1
  Election Tick: 3
 Dispatcher:
  Heartbeat Period: 5 seconds
 CA Configuration:
  Expiry Duration: 3 months
  Force Rotate: 0
 Autolock Managers: false
 Root Rotation In Progress: false
 Node Address: 88.99.123.129
 Manager Addresses:
  138.201.189.209:2377
  88.99.123.129:2377
  94.130.185.164:2377
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 06b9cb35161009dcb7123345749fef02f7cea8e0
runc version: 3f2f8b84a77f73d38244dd690525642a72156c64
init version: 949e6fa
Security Options:
 apparmor
 seccomp
  Profile: default
Kernel Version: 4.4.0-98-generic
Operating System: Ubuntu 16.04.3 LTS
OSType: linux
Architecture: x86_64
CPUs: 2
Total Memory: 3.765GiB
Name: node3
ID: NRAH:VWTG:NUSQ:NFB3:L2KS:O7YT:6SRW:FQYV:OO62:DSXA:KD3K:IGZ6
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Experimental: false
Insecure Registries:
 127.0.0.0/8
Live Restore Enabled: false

WARNING: No swap limit support

docker node ls:

ID                            HOSTNAME            STATUS              AVAILABILITY        MANAGER STATUS
cpsi2ewjcx7qlu2lpjw9fsb2h     node1               Ready               Active              Leader
pq7v3piqgqzkj3l7kvx0w7uzi     node2               Ready               Active              Reachable
x7d8n8g52ag6tf07camgh6sb9 *   node3               Ready               Active              Reachable

docker network ls:

NETWORK ID          NAME                   DRIVER              SCOPE
bf95d5d3539b        bridge                 bridge              local
mto9swbvn9v2        cepharum_ssh_default   overlay             swarm
0478c8f99b75        docker_gwbridge        bridge              local
0771dc108ce1        host                   host                local
qo5dp6dr295m        ingress                overlay             swarm
1e50251be4d4        none                   null                local

docker service ps cepharum_ssh_ssh:

ID                  NAME                     IMAGE                 NODE                DESIRED STATE       CURRENT STATE                ERROR                              PORTS
npuf3t78r9qu        cepharum_ssh_ssh.1       cepharum/ssh:latest   node3               Ready               Ready 4 seconds ago
zrlxkn7dfeca         \_ cepharum_ssh_ssh.1   cepharum/ssh:latest   node1               Shutdown            Failed 23 minutes ago        "starting container failed: No…"
zz6rpl53fm2u         \_ cepharum_ssh_ssh.1   cepharum/ssh:latest   node1               Shutdown            Complete about an hour ago
zx8pwdbcxgcf         \_ cepharum_ssh_ssh.1   cepharum/ssh:latest   node2               Shutdown            Failed 24 minutes ago        "starting container failed: No…"
zz4sdsei67ay         \_ cepharum_ssh_ssh.1   cepharum/ssh:latest   node3               Shutdown            Complete 2 hours ago

docker inspect zrlxkn7dfeca:

[
    {
        "ID": "zrlxkn7dfecak4v74tuaw2pqs",
        "Version": {
            "Index": 49140
        },
        "CreatedAt": "2017-11-19T18:30:45.871194263Z",
        "UpdatedAt": "2017-11-19T18:30:51.310932181Z",
        "Labels": {},
        "Spec": {
            "ContainerSpec": {
                "Image": "cepharum/ssh:latest@sha256:72fbbe17b489dd1f6f15ccdd1c8d6ba5d24cdac067b1c12380f5652865cedfdd",
                "Labels": {
                    "com.docker.stack.namespace": "cepharum_ssh"
                },
                "Privileges": {
                    "CredentialSpec": null,
                    "SELinuxContext": null
                },
                "Mounts": [
                    {
                        "Type": "volume",
                        "Source": "cepharum_ssh_users",
                        "Target": "/home",
                        "VolumeOptions": {
                            "Labels": {
                                "com.docker.stack.namespace": "cepharum_ssh"
                            }
                        }
                    },
                    {
                        "Type": "volume",
                        "Source": "cepharum_ssh_registry",
                        "Target": "/etc/registry",
                        "ReadOnly": true,
                        "VolumeOptions": {
                            "Labels": {
                                "com.docker.stack.namespace": "cepharum_ssh"
                            }
                        }
                    }
                ]
            },
            "Resources": {},
            "Placement": {
                "Platforms": [
                    {
                        "Architecture": "amd64",
                        "OS": "linux"
                    }
                ]
            },
            "Networks": [
                {
                    "Target": "mto9swbvn9v26bwbzuxbjled1",
                    "Aliases": [
                        "ssh"
                    ]
                }
            ],
            "ForceUpdate": 0
        },
        "ServiceID": "454caf7y28a6ec1r17bxqvddn",
        "Slot": 1,
        "NodeID": "cpsi2ewjcx7qlu2lpjw9fsb2h",
        "Status": {
            "Timestamp": "2017-11-19T18:30:51.043942362Z",
            "State": "failed",
            "Message": "starting",
            "Err": "starting container failed: No such network: cepharum_ssh_default",
            "ContainerStatus": {
                "ContainerID": "de15d63f987a49a68c5d12d15b4c65d1468d566346160391a96a7200103d1296",
                "ExitCode": 128
            },
            "PortStatus": {}
        },
        "DesiredState": "shutdown",
        "NetworksAttachments": [
            {
                "Network": {
                    "ID": "qo5dp6dr295mfag9ef0r65rdt",
                    "Version": {
                        "Index": 48611
                    },
                    "CreatedAt": "2017-10-30T12:05:33.398078736Z",
                    "UpdatedAt": "2017-11-19T18:25:24.111819005Z",
                    "Spec": {
                        "Name": "ingress",
                        "Labels": {},
                        "DriverConfiguration": {},
                        "Ingress": true,
                        "IPAMOptions": {
                            "Driver": {},
                            "Configs": [
                                {
                                    "Subnet": "10.255.0.0/16",
                                    "Gateway": "10.255.0.1"
                                }
                            ]
                        },
                        "Scope": "swarm"
                    },
                    "DriverState": {
                        "Name": "overlay",
                        "Options": {
                            "com.docker.network.driver.overlay.vxlanid_list": "4096"
                        }
                    },
                    "IPAMOptions": {
                        "Driver": {
                            "Name": "default"
                        },
                        "Configs": [
                            {
                                "Subnet": "10.255.0.0/16",
                                "Gateway": "10.255.0.1"
                            }
                        ]
                    }
                },
                "Addresses": [
                    "10.255.0.6/16"
                ]
            },
            {
                "Network": {
                    "ID": "mto9swbvn9v26bwbzuxbjled1",
                    "Version": {
                        "Index": 48612
                    },
                    "CreatedAt": "2017-11-19T15:11:13.266600832Z",
                    "UpdatedAt": "2017-11-19T18:25:24.117529331Z",
                    "Spec": {
                        "Name": "cepharum_ssh_default",
                        "Labels": {
                            "com.docker.stack.namespace": "cepharum_ssh"
                        },
                        "DriverConfiguration": {
                            "Name": "overlay"
                        },
                        "Scope": "swarm"
                    },
                    "DriverState": {
                        "Name": "overlay",
                        "Options": {
                            "com.docker.network.driver.overlay.vxlanid_list": "4097"
                        }
                    },
                    "IPAMOptions": {
                        "Driver": {
                            "Name": "default"
                        },
                        "Configs": [
                            {
                                "Subnet": "10.0.0.0/24",
                                "Gateway": "10.0.0.1"
                            }
                        ]
                    }
                },
                "Addresses": [
                    "10.0.0.3/24"
                ]
            }
        ]
    }
]

excerpt from syslog:
syslog-excerpt.txt

ifconfig:

docker0   Link encap:Ethernet  HWaddr 02:42:af:7d:e5:8e
          inet addr:172.17.0.1  Bcast:0.0.0.0  Mask:255.255.0.0
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

docker_gwbridge Link encap:Ethernet  HWaddr 02:42:b3:3e:db:c8
          inet addr:172.18.0.1  Bcast:0.0.0.0  Mask:255.255.0.0
          inet6 addr: fe80::42:b3ff:fe3e:dbc8/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:648 (648.0 B)

eth0      Link encap:Ethernet  HWaddr 96:00:00:03:22:ed
          inet addr:88.99.123.129  Bcast:88.99.123.129  Mask:255.255.255.255
          inet6 addr: 2a01:4f8:1c17:419d::1/64 Scope:Global
          inet6 addr: fe80::9400:ff:fe03:22ed/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:53329 errors:0 dropped:0 overruns:0 frame:0
          TX packets:52317 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:14672174 (14.6 MB)  TX bytes:11342796 (11.3 MB)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:6648 errors:0 dropped:0 overruns:0 frame:0
          TX packets:6648 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1
          RX bytes:1011784 (1.0 MB)  TX bytes:1011784 (1.0 MB)

veth8e7a84d Link encap:Ethernet  HWaddr 7a:96:ab:a0:92:fc
          inet6 addr: fe80::7896:abff:fea0:92fc/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:16 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:1296 (1.2 KB)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0