# Logstash connection issue with Elastic 9300 port

**URL:** <https://discuss.elastic.co/t/logstash-connection-issue-with-elastic-9300-port/91144>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-alerting\
**Created:** [June 28, 2017, 4:00pm UTC](https://discuss.elastic.co/t/logstash-connection-issue-with-elastic-9300-port/91144 "2017-06-28T16:00:09Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![gs21](https://avatars.discourse-cdn.com/v4/letter/g/b5e925/32.png) [@gs21](https://discuss.elastic.co/u/gs21)\
**Post date:** [June 28, 2017, 4:00pm UTC](https://discuss.elastic.co/t/logstash-connection-issue-with-elastic-9300-port/91144/1 "2017-06-28T16:00:09Z")

</div>

Hello Everyone,

I am facing issue in connecting to elastic from logstash using native port 9300.

# The # character at the beginning of a line indicates a comment. Use

# comments to describe your configuration.

input {  
beats {  
port =\> "5043"  
}  
}

# The filter part of this file is commented out to indicate that it is

# optional.

filter {

}  
output {  
elasticsearch {  
hosts =\> ["localhost:9300"]  
}  
}

The log message is below

[2017-06-28T10:09:41,704][INFO][logstash.outputs.elasticsearch] Running health check to see if an Elasticsearch connection is working {:healthcheck\_url=\>[http://localhost:9300/](http://localhost:9300/), :path=\>"/"}  
[2017-06-28T10:09:41,714][WARN][logstash.outputs.elasticsearch] Attempted to resurrect connection to dead ES instance, but got an error. {:url=\>#\<URI::HTTP:0x7dd3fe39 URL:[http://localhost:9300/](http://localhost:9300/)\>, :error\_type=\>LogStash::Outputs::ElasticSearch::HttpClient::Pool::HostUnreachableError, :error=\>"Elasticsearch Unreachable: [[http://localhost:9300/](http://localhost:9300/)][Manticore::ClientProtocolException] The server failed to respond with a valid HTTP response"}

Can any one of you please help me how to solve this ?

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [June 28, 2017, 4:28pm UTC](https://discuss.elastic.co/t/logstash-connection-issue-with-elastic-9300-port/91144/2 "2017-06-28T16:28:48Z")

</div>

Logstash by default uses the HTTP protocol these days, so you should configure it to connect to port 9200 instead.

---

<div class="post-metadata">

**Author:** ![gs21](https://avatars.discourse-cdn.com/v4/letter/g/b5e925/32.png) [@gs21](https://discuss.elastic.co/u/gs21)\
**Post date:** [June 28, 2017, 6:24pm UTC](https://discuss.elastic.co/t/logstash-connection-issue-with-elastic-9300-port/91144/3 "2017-06-28T18:24:51Z")

</div>

Thanks for your time and the reply Christian.

We have already implemented elastic search using java API which works only with 9300. So we are looking for some technology which will insert data into elastic search at port 9300. Using which we can do search with.

So is there any work around on using logstash to work with 9300 ? Or do you have any other alternative technical solution to populate data in elastic search server ?

Our input data to elastic server would be similar to log file which would keep getting updated every 30 minutes. Every time it gets updated we would like to read and update our elastic.

I am sorry if the provided information are not detailed.

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [June 28, 2017, 6:38pm UTC](https://discuss.elastic.co/t/logstash-connection-issue-with-elastic-9300-port/91144/4 "2017-06-28T18:38:47Z")

</div>

Why can you not allow Logstash to use the HTTP protocol over port 9200? How is this related to using the Java Transport client on port 9300?

---

<div class="post-metadata">

**Author:** ![gs21](https://avatars.discourse-cdn.com/v4/letter/g/b5e925/32.png) [@gs21](https://discuss.elastic.co/u/gs21)\
**Post date:** [June 28, 2017, 6:43pm UTC](https://discuss.elastic.co/t/logstash-connection-issue-with-elastic-9300-port/91144/5 "2017-06-28T18:43:53Z")

</div>

Christian,

In elastic search the data inserted using port number 9200 can not be accessed using native port 9300.

I mean the data inserted to the elastic using 9200 can not be searched using 9300 port.

Am I wrong here in my understanding ? Please correct me

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [June 28, 2017, 6:46pm UTC](https://discuss.elastic.co/t/logstash-connection-issue-with-elastic-9300-port/91144/6 "2017-06-28T18:46:14Z")

</div>

They are just different protocols, so there are no such limitations. Data is indexed as JSON documents, and it does not matter which protocol it came in through.

---

<div class="post-metadata">

**Author:** ![gs21](https://avatars.discourse-cdn.com/v4/letter/g/b5e925/32.png) [@gs21](https://discuss.elastic.co/u/gs21)\
**Post date:** [June 28, 2017, 6:48pm UTC](https://discuss.elastic.co/t/logstash-connection-issue-with-elastic-9300-port/91144/7 "2017-06-28T18:48:16Z")

</div>

Thanks for clarifying this. I will try this and update.

Thanks a ton for your time Christian

---

<div class="post-metadata">

**Author:** ![gs21](https://avatars.discourse-cdn.com/v4/letter/g/b5e925/32.png) [@gs21](https://discuss.elastic.co/u/gs21)\
**Post date:** [June 28, 2017, 10:29pm UTC](https://discuss.elastic.co/t/logstash-connection-issue-with-elastic-9300-port/91144/8 "2017-06-28T22:29:09Z")

</div>

Thanks Christian. It works. Till date I was thinking elastic maintains different data set for different ports (http and native) and are not accessible to each other, Thanks for helping me in this.

We can close this case.

---

<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:** [July 26, 2017, 10:29pm UTC](https://discuss.elastic.co/t/logstash-connection-issue-with-elastic-9300-port/91144/9 "2017-07-26T22:29:12Z")

</div>

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