48
45

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

docker run実行時のiptablesエラー

Last updated at Posted at 2016-03-06

Dockerホスト上でdb01 サーバなるコンテナをdocker run しようとしたら、なんとiptables のエラーでコンテナを作成できない。。。。
どうしよう。。。

■ エラー内容

docker: Error response from daemon: failed to create endpoint db01 on network bridge: COMMAND_FAILED: '/sbin/iptables -t nat -A DOCKER -p tcp -d 0/0 --dport 3306 -j DNAT --to-destination 172.17.0.2:3306 ! -i docker0' failed: iptables: No chain/target/match by that name..

■ 解決方法
Docker 管理のネットワークファイルの再構成をします。

# mv /var/lib/docker/network/files /tmp/docker-iptables-err
# systemctl restart docker

■ 補足
/var/lib/docker/network/files を削除しただけで、既存コンテナは問題なく通信できます。
さすがにdocker デーモンの再起動ではコンテナは止まりますが、再起動後、ネットワークは問題なく利用できました。

48
45
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
48
45

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?