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
docker-compose启动失败 #101
Comments
What kind of distro is used and can you list the loaded iptables modules ? |
This usually happens when iptables has been flushed after Docker has been started. Can you cleanup the Docker containers, restart Docker, and then run docker-compose? |
I faced the similar problem and flushing Docker did not solve it (my environment; Ubuntu 18.04, Docker 18.09.3). version: '3'
services:
server:
# ...(snip)...
node:
# ...(snip)...
volumes:
- /lib/modules:/lib/modules
cap_add:
- ALL
volumes:
k3s-server: {} The messages like;
still be shown, but the status of the pods on kube-system namespace was Running. $ kubectl --kubeconfig kubeconfig.yaml get pods --all-namespaces
NAMESPACE NAME READY STATUS RESTARTS AGE
kube-system coredns-7748f7f6df-rvz5z 1/1 Running 0 3m19s
kube-system helm-install-traefik-nmr75 1/1 Running 0 3m18s Is it the expected behavior? |
Linux version 3.10.0-957.1.3.el7.x86_64 (mockbuild@kbuilder.bsys.centos.org) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-36) (GCC) ) #1 SMP |
docker没有运行其他的容器 ,这是一台全新的docker 主机。 |
|
Closing due to age. Possibly a use case for k3d. |
[root@ceph-client k3s]# docker-compose up --scale node=3
Starting k3s_node_1 ...
Starting k3s_server_1 ...
Starting k3s_node_2 ...
Starting k3s_server_1 ... error
Starting k3s_node_1 ... done
Starting k3s_node_2 ... done
Starting k3s_node_3 ... done
(exit status 1))
ERROR: for server Cannot start service server: driver failed programming external connectivity on endpoint k3s_server_1 (e22cd8969a88f79716a88d6cea5de8bc6b8ca25bdc084297256cd9ab551f2164): (iptables failed: iptables --wait -t nat -A DOCKER -p tcp -d 0/0 --dport 6443 -j DNAT --to-destination 172.18.0.5:6443 ! -i br-b41a9cad8102: iptables: No chain/target/match by that name.
(exit status 1))
ERROR: Encountered errors while bringing up the project.
[root@ceph-client k3s]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
4ae38a0b108e rancher/k3s:v0.1.0 "/bin/k3s agent" 2 minutes ago Up 43 seconds k3s_node_2
b70e96deca73 rancher/k3s:v0.1.0 "/bin/k3s agent" 2 minutes ago Up 43 seconds k3s_node_1
e789f47f0e7e rancher/k3s:v0.1.0 "/bin/k3s agent" 2 minutes ago Up 43 seconds k3s_node_3
[root@ceph-client k3s]# docker-compose ps
Name Command State Ports
k3s_node_1 /bin/k3s agent Up
k3s_node_2 /bin/k3s agent Up
k3s_node_3 /bin/k3s agent Up
k3s_server_1 /bin/k3s server --disable- ... Exit 1
[root@ceph-client k3s]# docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
4ae38a0b108e rancher/k3s:v0.1.0 "/bin/k3s agent" 2 minutes ago Up About a minute k3s_node_2
b70e96deca73 rancher/k3s:v0.1.0 "/bin/k3s agent" 2 minutes ago Up About a minute k3s_node_1
e789f47f0e7e rancher/k3s:v0.1.0 "/bin/k3s agent" 2 minutes ago Up About a minute k3s_node_3
92c7cbdfd7e4 rancher/k3s:v0.1.0 "/bin/k3s server -..." 2 minutes ago Exited (1) 2 minutes ago k3s_server_1
[root@ceph-client k3s]# iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
The text was updated successfully, but these errors were encountered: