# Can't connect to elastic cloud instance - NEST Client

**URL:** <https://discuss.elastic.co/t/cant-connect-to-elastic-cloud-instance-nest-client/282117>\
**Category:** Elasticsearch\
**Tags:** language-clients\
**Created:** [August 20, 2021, 8:05pm UTC](https://discuss.elastic.co/t/cant-connect-to-elastic-cloud-instance-nest-client/282117 "2021-08-20T20:05:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![knile](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/knile/32/93524_2.png) [@knile](https://discuss.elastic.co/u/knile)\
**Post date:** [August 20, 2021, 8:05pm UTC](https://discuss.elastic.co/t/cant-connect-to-elastic-cloud-instance-nest-client/282117/1 "2021-08-20T20:05:25Z")

</div>

Hello,  
I wanted to try out elastic cloud (free trial) today but I'm having issues connecting to it.  
I set up simple console application in c#  
net 5  
and latest NEST client

```auto
            var cloudId = "cloudid:xxxxxxxx";
            var credentials = new BasicAuthenticationCredentials("elastic", "xxxxxxxxxxxx");
            var pool = new CloudConnectionPool(cloudId, credentials);
            var settings = new ConnectionSettings(pool)
                .ThrowExceptions()
                .EnableDebugMode();

            var client = new ElasticClient(settings);

```

these are the errors that I'm getting  
Error: The client is unable to verify that the server is Elasticsearch due to an unsuccessful product check call. Some functionality may not be compatible if the server is running an unsupported product  
Error2: Authentication failed because the remote party sent a TLS alert: 'HandshakeFailure'.

What am I doing wrong ?

Thanks

---

<div class="post-metadata">

**Author:** ![davidlahuta](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidlahuta/32/93627_2.png) [@davidlahuta](https://discuss.elastic.co/u/davidlahuta)\
**Post date:** [August 24, 2021, 8:53am UTC](https://discuss.elastic.co/t/cant-connect-to-elastic-cloud-instance-nest-client/282117/2 "2021-08-24T08:53:03Z")

</div>

Hey, I had same issue.

I'm using default docker-compose for elastic search and kibana from docs.

Solution for me was to **use http protocol in connection string, instead of https.**

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [September 21, 2021, 8:53am UTC](https://discuss.elastic.co/t/cant-connect-to-elastic-cloud-instance-nest-client/282117/3 "2021-09-21T08:53:24Z")

</div>

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