Course: Elastic Observability Engineer On-Demand /home/elastic/ca/ca.crt: no such file or directory

Course: Elastic Observability Engineer On-Demand
lab 1.2
elastic) elastic@ip-172-31-42-236:~/heartbeat$ ./heartbeat test config
Exiting: error initializing publisher: 1 error: open /home/elastic/ca/ca.crt: no such file or directory reading accessing 'output.elasticsearch' (source:'heartbeat.yml')

how can i solve this issue ?

Hello @qabuomar

Welcome to the community.

Could you please share the heartbeat.yml

Thanks!!

---------------------------- Elasticsearch Output ----------------------------

------------ Elasticsearch Output ----------

output.elasticsearch:
hosts: ["elasticsearch:9200"]
protocol: "https"
username: "elastic"
password: "JcRZwmwBPduguAuv"
ssl.certificate_authorities: ["/home/elastic/ca/ca.crt"]

Authentication credentials - either API key or username/password.

#api_key: "id:api_key"
#username: "elastic"
#password: "changeme"

Configure monitors inline

heartbeat.monitors:
type: http
id: elasticsearch
name: Elasticsearch REST API
hosts: [""]
schedule: '@every 10s'
ssl.certificate_authorities: ["/home/elastic/ca/ca.crt"]
username: elastic
password: JcRZwmwBPduguAuv

Experimental: Set this to true to run heartbeat monitors exactly once at startup

heartbeat.run_once: true

Hi,
same issue here. Try:
cd /home/elastic
mkdir ca
cp /usr/share/elastic-agent/certificates/ca/ca.crt ca
fixes the issue for me

Hi there, same problem here.
It seems to me there is no"ca/ca.crt" in " /home/elastic/"...
can we do anything?

Hello @fabio.iovine

Welcome to the community.

As shared in previous post you can try below steps :

cd /home/elastic
mkdir ca
cp /usr/share/elastic-agent/certificates/ca/ca.crt ca

Thanks!!

1 Like

thanks a lot it is working fine .

1 Like