docker: Error response from daemon: driver failed programming external connectivity on endpoint elasticsearch

docker: Error response from daemon: driver failed programming external connectivity on endpoint elasticsearch (b51e8b7ec36d8bc086b3290ddcc00c777df457b1e3af55898bdcef22393bf130): (iptables failed: iptables –wait -t nat -A DOCKER -p tcp -d 0/0 –dport 9300 -j DNAT –to-destination 172.17.0.3:9300 ! -i docker0: iptables: No chain/target/match by that name.
(exit status 1)).

解决方法

docker服务启动时定义的自定义链DOCKER被清除
1、重启即可
systemctl restart docker

2、重新执行
docker run –name elasticsearch -d -e ES_JAVA_OPTS=”-Xms512m -Xmx512m” -e “discovery.type=single-node” -p 9200:9200 -p 9300:9300 elasticsearch:7.7.0

文档更新时间: 2021-09-07 08:00   作者:admin