Using elastic cloud I am trying to connect metricbeats with the provided cloud.id/auth.
I'm seeing this in the logs
{"log.level":"info","@timestamp":"2022-03-25T05:56:18.524Z","log.logger":"publisher_pipeline_output","log.origin":{"file.name":"pipeline/client_worker.go","file.line":141},"message":"Attempting to reconnect to backoff(elasticsearch(https://{elastic_url}.us-east-2.aws.elastic-cloud.com:9243)) with 250 reconnect attempt(s)","service.name":"metricbeat","ecs.version":"1.6.0"}
The docs here state that it should be using 443 by default.
The base64 encoded cloud.id found in the Elasticsearch Service web console does not explicitly specify a port. This means that Metricbeat will default to using port 443 when using cloud.id, not the commonly configured cloud endpoint port 9243.
Any idea why 9243 would be showing up in the logs if 443 should be used by default?
It could be due to using an 'older' cloud.id that still has port 9243 as part of it. You should base64 decode the part of the cloud.id to confirm the URL does not have a port specified.
If it does, you could regenerate a new version of the cloud.id that either excludes the port (9243) or explicitly specifies 443.
It does not require a new deployment. Take the decoded portion and edit it as you want (replace 9243 with 443 or completely remove :9243) and just base64 encode it again. The format of the Cloud ID is the deployment name, a colon and then the encoded portion is the Cloud Provider/Region domain (with optional port number), Elasticsearch Cluster ID and Kibana ID separated by '$' characters.
Example - replace vars with your values and if you want the port or not:
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.