Couldn't connect to elasticsearch cluster hosted in the cloud

In order to connect to elasticsearch hosted in the elastic cloud rather than using the local one, I added to httpbeat.full.yml those two lines of code but no connection had been established : > "Ikbel_abd:MyCloudId"

cloud.auth: "elastic:MyPwd"
hosts: ["ElasticsearchIdInCloud:9243"]

The error description while executing httpbeat is =>

2018/09/18 09:53:12.530051 output.go:109: DBG  output worker: publish 2 events
 2018/09/18 09:53:12.530051 client.go:642: DBG  ES Ping(url=, timeout=1m30s)
    2018/09/18 09:53:12.544065 metrics.go:39: INFO Non-zero metrics in the last 30s: libbeat.outputs.messages_dropped=1 libbeat.publisher.messages_in_worker_queues=2 libbeat.publisher.published_events=2
    2018/09/18 09:53:12.601129 client.go:647: DBG  Ping request failed with: 401 Unauthorized
    2018/09/18 09:53:12.601129 single.go:140: ERR Connecting error publishing events (retrying): 401 Unauthorized
    2018/09/18 09:53:12.602131 single.go:156: DBG  send fail
    2018/09/18 09:53:16.249242 service.go:33: DBG  Received sigterm/sigint, stopping
    2018/09/18 09:53:16.249242 service.go:39: DBG  Received svc stop/shutdown request

That would suggest your login details are wrong. I would check them using a basic curl request.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.