Elasticsearch Connection Error

I have physical server with elasticsearch installed and from another computer I try to connect the elasticsearch with this code:

const esClient = new Client({node: 'https://my-ip-address:5621', auth: {username: 'elastic', password: 'mypassword'}, 
caFingerprint: "91:9F:49:82:A0:5D:5A:2E:FA:3D..."
tls: {rejectUnauthorized: false}})

I got this error: Error pinging server: ConnectionError: Invalid or malformed certificate

I generated this fingerprint from the server, in the server there is a container for elasticsearch and from /config/certs/ca.crt and /config/certs/elasticsearch.crt. Both fingerprints didn't work. Can anyone help me please?
Screenshot 2023-12-04 at 12.31.12

Hi @Burak_Karatay,

Thanks for sharing. It looks like an invalid certificate issue.

How are you getting a hold of the fingerprint? Are you following the command steps from here in the documentation?

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