# Node.js Application Fail to Connect Elasticsearch

**URL:** <https://discuss.elastic.co/t/node-js-application-fail-to-connect-elasticsearch/348223>\
**Category:** Elasticsearch\
**Created:** [November 29, 2023, 11:32am UTC](https://discuss.elastic.co/t/node-js-application-fail-to-connect-elasticsearch/348223 "2023-11-29T11:32:55Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![Burak\_Karatay](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/burak_karatay/32/123772_2.png) [@Burak\_Karatay](https://discuss.elastic.co/u/Burak_Karatay)\
**Post date:** [December 4, 2023, 11:50am UTC](https://discuss.elastic.co/t/node-js-application-fail-to-connect-elasticsearch/348223/6 "2023-12-04T11:50:27Z")

</div>

Hello @carly.richmond I need your help about another issue

> [@Elasticsearch Connection Error](https://discuss.elastic.co/t/elasticsearch-connection-error/348536):
>
> 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 con…

---

_[View the full topic](https://discuss.elastic.co/t/node-js-application-fail-to-connect-elasticsearch/348223)._
