# Logstash Connectivity Issue with Elastic Search on Elastic Cloud

**URL:** <https://discuss.elastic.co/t/logstash-connectivity-issue-with-elastic-search-on-elastic-cloud/241585>\
**Category:** Logstash\
**Created:** [July 17, 2020, 6:31am UTC](https://discuss.elastic.co/t/logstash-connectivity-issue-with-elastic-search-on-elastic-cloud/241585 "2020-07-17T06:31:13Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![dhirajagarwal2010](https://avatars.discourse-cdn.com/v4/letter/d/a3d4f5/32.png) [@dhirajagarwal2010](https://discuss.elastic.co/u/dhirajagarwal2010)\
**Post date:** [July 17, 2020, 6:31am UTC](https://discuss.elastic.co/t/logstash-connectivity-issue-with-elastic-search-on-elastic-cloud/241585/1 "2020-07-17T06:31:13Z")

</div>

I am not able to connect my logstash instance on my local server with Elastic Search on Elastic Cloud . The user tag in logstash encodes the @ symbol in the email address twice to %2540. I guess because of this Elastic Cloud is not able to identify the credentials specified on logstash.config file.

I have provided the valid Cloud ID and Cloud Authentication Details in logstash.yml file

```auto
input {
  file {
    path => "C:/Users/abc/Downloads/reed_uk.csv"
    start_position => "beginning"
  }
}

filter {
      csv {
        columns => ["category","city","company_name","geo","job_board","job_description","job_requirements","job_title","job_type","post_date","salary_offered","state"]
     }
    }

output {
  elasticsearch { 
  hosts => ["https://444d61228d4d407f8e42b438e01b28c1.us-east-1.aws.found.io:9243"]
  user => <Elastic-Cloud-Email-Address}
  password => <Elastic-Cloud-Password}
  index => "sampleindex"
  }
  stdout {}

 }

```

This is the error I am getting on starting logstash on my local server -

```auto
error_type=>LogStash::Outputs::ElasticSearch::HttpClient::Pool::BadResponseCodeError, :error=>"Got response code '401' contacting Elasticsearch at URL 'https://444d61228d4d407f8e42b438e01b28c1.us-east-1.aws.found.io:9243/'"} 

```

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [July 21, 2020, 12:16am UTC](https://discuss.elastic.co/t/logstash-connectivity-issue-with-elastic-search-on-elastic-cloud/241585/2 "2020-07-21T00:16:34Z")

</div>

Are you quoting the password? If not, try that.

---

<div class="post-metadata">

**Author:** ![dhirajagarwal2010](https://avatars.discourse-cdn.com/v4/letter/d/a3d4f5/32.png) [@dhirajagarwal2010](https://discuss.elastic.co/u/dhirajagarwal2010)\
**Post date:** [July 21, 2020, 12:41am UTC](https://discuss.elastic.co/t/logstash-connectivity-issue-with-elastic-search-on-elastic-cloud/241585/3 "2020-07-21T00:41:20Z")

</div>

I have provided the user as elastic in double quotes and password in the same manner as well.

Along with that I have provided the valid cloud.id and cloud.auth in logstash.yml. Previously in logstash.config file I was providing my elastic cloud console credentials where the email address was getting encoded twice . So I entered the elastic search rest credentials instead . I am able to connect to the same Elastic Search instance through CURL and High Level Rest Client. But the problem is with Logstash . I am also able to connect Logstash to my Elastic Server on localhost but the issue still persists on connecting it to instance on Elastic Cloud.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [July 21, 2020, 12:51am UTC](https://discuss.elastic.co/t/logstash-connectivity-issue-with-elastic-search-on-elastic-cloud/241585/4 "2020-07-21T00:51:25Z")

</div>

Ahh ok. This is not your Cloud login.

When you create a new cluster you would have been given an `elastic` user and a password for that. That is what you need to use. If you didn't write that down then check out [https://www.elastic.co/guide/en/cloud/current/ec-password-reset.html](https://www.elastic.co/guide/en/cloud/current/ec-password-reset.html).

---

<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:** [August 18, 2020, 12:51am UTC](https://discuss.elastic.co/t/logstash-connectivity-issue-with-elastic-search-on-elastic-cloud/241585/5 "2020-08-18T00:51:31Z")

</div>

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