ConnectionError: Server certificate CA fingerprint does not match the value configured in caFingerprint

i was trying to connect my nodejs app to an elasticsearch server running on https://localhost:9300 and this error “ConnectionError: Server certificate CA fingerprint does not match the value configured in caFingerprint” shows up continuously, i have provided the necessary credentials such as username, password and http_ca.crt file i also used a ca fingerprint to connect to the server this error shows up when i try the ca fingerprint, and if your wondering why i don’t use the .crt file that also has an error that says “ConnectionError: other side closed – Local: 127.0.0.1:45180, Remote: 127.0.0.1:9300” so it seems like i am out of luck, if anybody has encountered the same problem i would really like your insight.

Here is my JS code
Nodejs application code
and for more detail here is the output of the elasticsearch server when i try to connect
enter image description here

openssl x509 -fingerprint -sha256 -noout -in ./http_ca.crt
i used this command to generate a ca fingerprint, and it didn’t work

i also used another command “openssl s_client -connect lox509 -fingerprint -sha2s_client -connect localhost:9300 -servername localhost -showcerts </dev/null 2>/dev/null | openssl x509 -fingerprint -sha256 -noout -in /dev/stdin” to generate the ca fingerprint but it seems that it had the same result