prometheus-community / elasticsearch_exporter

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

"failed to retrieve cluster info from ES" err="Get \"http://elastic:***@192.168.219.154:9200/\": EOF" #627

Open lijianxin03 opened 2 years ago

lijianxin03 commented 2 years ago

level=error ts=2022-09-15T08:31:35.680788528Z caller=clusterinfo.go:267 msg="failed to get cluster info" err="Get \"http://elastic:***@192.168.219.154:9200/\": EOF" level=error ts=2022-09-15T08:31:35.680870032Z caller=clusterinfo.go:188 msg="failed to retrieve cluster info from ES" err="Get \"http://elastic:***@192.168.219.154:9200/\": EOF" level=info ts=2022-09-15T08:31:45.683135638Z caller=main.go:250 msg="initial cluster info call timed out" level=info ts=2022-09-15T08:31:45.683474154Z caller=main.go:285 msg="starting elasticsearch_exporter" addr=:9114

my cmd: ./elasticsearch_exporter --es.uri="http://elastic:elastic@192.168.219.154:9200" --es.ca="/elasticsearch-8.4.0/kibana/elasticsearch-ca.pem" --es.all --es.cluster_settings --es.indices_settings --es.shards --es.snapshots es -url :https://192.168.219.154:9200/

es-running logs:

[2022-09-15T16:37:55,509][WARN ][o.e.h.AbstractHttpServerTransport] [es-84node03] caught exception while handling client http traffic, closing connection Netty4HttpChannel{localAddress=/192.168.219.154:9200, remoteAddress=/192.168.219.154:48366}io.netty.handler.codec.DecoderException: javax.net.ssl.SSLHandshakeException: Received fatal alert: bad_certificate at io.netty.codec@4.1.77.Final/io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:480) at io.netty.codec@4.1.77.Final/io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:279) at io.netty.transport@4.1.77.Final/io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) at io.netty.transport@4.1.77.Final/io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) at io.netty.transport@4.1.77.Final/io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)

See logs for more details.

how i solve this ?

sysadmind commented 2 years ago

--es.uri in your command is "http" but it appears that your elasticsearch should be using "https".

sysadmind commented 1 year ago

Are you sure that you are using the correct protocol? This looks to me like trying to load eleasticsearch over http when it is serving over https.