prometheus-community / elasticsearch_exporter

Elasticsearch stats exporter for Prometheus
Apache License 2.0
1.93k stars 790 forks source link

exporter docker-compose is not starting up #366

Open kishore0709 opened 4 years ago

kishore0709 commented 4 years ago

Hi Team,

I'm trying to run this exporter as a docker container using docker-compose. I'm running this exporter in the same host where ES service is running(not as a container). But when I'm trying to execute docker-compose I'm getting below error.

docker-compose -f docker-compose.yml up

Please help fix this issue.

Compose file:

elasticsearch_exporter: image: justwatch/elasticsearch_exporter:1.1.0 command:

Error: [root@xxxxxx:~/es_exporter]# docker-compose -f docker-compose.yml up Starting es_exporter_elasticsearch_exporter_1 ... error

ERROR: for es_exporter_elasticsearch_exporter_1 Cannot start service elasticsearch_exporter: b'driver failed programming external connectivity on endpoint es_exporter_elasticsearch_exporter_1 (e9abac3fa3d80d5acbf381ca5fe3f4dfd9610b13f2538d4e8244bdb26fe75b16): (iptables failed: iptables --wait -t nat -A DOCKER -p tcp -d 0/0 --dport 9108 -j DNAT --to-destination 172.17.0.2:9108 ! -i docker0: iptables: No chain/target/match by that name.\n (exit status 1))'

ERROR: for elasticsearch_exporter Cannot start service elasticsearch_exporter: b'driver failed programming external connectivity on endpoint es_exporter_elasticsearch_exporter_1 (e9abac3fa3d80d5acbf381ca5fe3f4dfd9610b13f2538d4e8244bdb26fe75b16): (iptables failed: iptables --wait -t nat -A DOCKER -p tcp -d 0/0 --dport 9108 -j DNAT --to-destination 172.17.0.2:9108 ! -i docker0: iptables: No chain/target/match by that name.\n (exit status 1))' ERROR: Encountered errors while bringing up the project.

sysadmind commented 4 years ago

This appears to be an issue with docker on the host you are running docker-compose on, not with the elasticsearch_exporter container itself. There's a long thread about the problem here: https://github.com/moby/moby/issues/16816. From what I can tell, the advice to try and resolve this issue is often to restart the docker service or to flush the IP tables chains.

kishore0709 commented 4 years ago

Hi,

Thanks for the help.

I'm able to start exporter. I just flushed the iptables and restarted docker to resolve this issue./

Regards, Kishor.

On Fri, Jul 17, 2020 at 7:29 PM Joe Adams notifications@github.com wrote:

This appears to be an issue with docker on the host you are running docker-compose on, not with the elasticsearch_exporter container itself. There's a long thread about the problem here: moby/moby#16816 https://github.com/moby/moby/issues/16816. From what I can tell, the advice to try and resolve this issue is often to restart the docker service or to flush the IP tables chains.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/justwatchcom/elasticsearch_exporter/issues/366#issuecomment-660122138, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADKUP26HBBOBQR33WBEOMIDR4BKKNANCNFSM4O5VBTLQ .