# Error "Unknown setting 'protocol' for elasticsearch"

**URL:** https://discuss.elastic.co/t/error-unknown-setting-protocol-for-elasticsearch/49264
**Category:** Logstash
**Created:** [May 5, 2016, 7:25am UTC](https://discuss.elastic.co/t/error-unknown-setting-protocol-for-elasticsearch/49264 "2016-05-05T07:25:22Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![RdrgPorto](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rdrgporto/32/13278_2.png) [@RdrgPorto](https://discuss.elastic.co/u/RdrgPorto)
#### Post date: [May 5, 2016, 7:25am UTC](https://discuss.elastic.co/t/error-unknown-setting-protocol-for-elasticsearch/49264/1 "2016-05-05T07:25:22Z")

</div>

Hi,

I have installed **Logstash 2.3.1** and **logstash-output-elasticsearch\_java.gem** because I would like to use the options: protocol, cluster and node\_name in my output. When Logstash starts I receive the next error:

```
{:timestamp=>"2016-05-05T09:11:45.725000+0200", :message=>"Unknown setting 'protocol' for elasticsearch", :level=>:error}
{:timestamp=>"2016-05-05T09:11:45.726000+0200", :message=>"Unknown setting 'cluster' for elasticsearch", :level=>:error}
{:timestamp=>"2016-05-05T09:11:45.729000+0200", :message=>"Pipeline aborted due to error", :exception=>#<LogStash::ConfigurationError: Something is wrong with your configuration.>, :backtrace=>["/soft/sth/vendor/bundle/jruby/1.9/gems/logstash-core-2.3.1-java/lib/logstash/config/mixin.rb:134:in `config_init'", "/soft/sth/vendor/bundle/jruby/1.9/gems/logstash-core-2.3.1-java/lib/logstash/outputs/base.rb:63:in `initialize'", "/soft/sth/vendor/bundle/jruby/1.9/gems/logstash-core-2.3.1-java/lib/logstash/output_delegator.rb:74:in `register'", "/soft/sth/vendor/bundle/jruby/1.9/gems/logstash-core-2.3.1-java/lib/logstash/pipeline.rb:181:in `start_workers'", "org/jruby/RubyArray.java:1613:in `each'", "/soft/sth/vendor/bundle/jruby/1.9/gems/logstash-core-2.3.1-java/lib/logstash/pipeline.rb:181:in `start_workers'", "/soft/sth/vendor/bundle/jruby/1.9/gems/logstash-core-2.3.1-java/lib/logstash/pipeline.rb:136:in `run'", "/soft/sth/vendor/bundle/jruby/1.9/gems/logstash-core-2.3.1-java/lib/logstash/agent.rb:465:in `start_pipeline'"], :level=>:error}
{:timestamp=>"2016-05-05T09:11:48.735000+0200", :message=>"stopping pipeline", :id=>"main"}

```

I know that from **Logstash 2.x** this options are deprecated, however I have seen that with **logstash-output-elasticsearch\_java** I can use them.

Any ideas?

Thanks in advance,

Regards

---

<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: [May 5, 2016, 7:26am UTC](https://discuss.elastic.co/t/error-unknown-setting-protocol-for-elasticsearch/49264/2 "2016-05-05T07:26:49Z")

</div>

Providing your config would be helpful 🙂

---

<div class="post-metadata">

### Author: ![RdrgPorto](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rdrgporto/32/13278_2.png) [@RdrgPorto](https://discuss.elastic.co/u/RdrgPorto)
#### Post date: [May 5, 2016, 7:29am UTC](https://discuss.elastic.co/t/error-unknown-setting-protocol-for-elasticsearch/49264/3 "2016-05-05T07:29:23Z")

</div>

It is a simple configuration:

```
input {
  file {
    path => "/var/log/messages"
  }
}

output {
   stdout { codec => rubydebug }
   elasticsearch {
   hosts => "10.70.64.33"
   protocol => "http"
   cluster => "test"
  }
}
```

---

<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: [May 5, 2016, 7:37am UTC](https://discuss.elastic.co/t/error-unknown-setting-protocol-for-elasticsearch/49264/4 "2016-05-05T07:37:39Z")

</div>

Per the docs - [https://www.elastic.co/guide/en/logstash/current/plugins-outputs-elasticsearch.html](https://www.elastic.co/guide/en/logstash/current/plugins-outputs-elasticsearch.html) - `protocol` is not a valid setting.

---

<div class="post-metadata">

### Author: ![RdrgPorto](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rdrgporto/32/13278_2.png) [@RdrgPorto](https://discuss.elastic.co/u/RdrgPorto)
#### Post date: [May 5, 2016, 7:47am UTC](https://discuss.elastic.co/t/error-unknown-setting-protocol-for-elasticsearch/49264/5 "2016-05-05T07:47:22Z")

</div>

But with **logstash-output-elasticsearch\_java** we can use "protocol" no?

- [https://www.elastic.co/guide/en/logstash/current/plugins-outputs-elasticsearch\_java.html](https://www.elastic.co/guide/en/logstash/current/plugins-outputs-elasticsearch_java.html)

---

<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: [May 5, 2016, 7:47am UTC](https://discuss.elastic.co/t/error-unknown-setting-protocol-for-elasticsearch/49264/6 "2016-05-05T07:47:37Z")

</div>

Yes, but you are not using that plugin.

---

<div class="post-metadata">

### Author: ![RdrgPorto](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rdrgporto/32/13278_2.png) [@RdrgPorto](https://discuss.elastic.co/u/RdrgPorto)
#### Post date: [May 5, 2016, 7:57am UTC](https://discuss.elastic.co/t/error-unknown-setting-protocol-for-elasticsearch/49264/7 "2016-05-05T07:57:10Z")

</div>

I have installed it with the command (in **Logstash 2.3.1** normal):

> bin/logstash-plugin install logstash-output-elasticsearch\_java-2.1.3.gem

Moreover, I have downloaded **Logstash 2.3.1 All Plugins** , in this version if you see **Gemfile** , you will see:

> gem "logstash-output-elasticsearch\_java"

In both cases it doesn't works.

---

<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: [May 5, 2016, 8:08am UTC](https://discuss.elastic.co/t/error-unknown-setting-protocol-for-elasticsearch/49264/8 "2016-05-05T08:08:56Z")

</div>

I would recommend sticking with the default HTTP protocol. There is a reason support for transport and node mode was moved into a separate plugin. What is it you want to achieve that the HTTP based plugin can not do?

If you still want to use it, you will need to provide some additional details. What does your configuration with elasticsearch\_java plugin look like? What is it that does not work?

---

<div class="post-metadata">

### Author: ![RdrgPorto](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rdrgporto/32/13278_2.png) [@RdrgPorto](https://discuss.elastic.co/u/RdrgPorto)
#### Post date: [May 5, 2016, 8:27am UTC](https://discuss.elastic.co/t/error-unknown-setting-protocol-for-elasticsearch/49264/9 "2016-05-05T08:27:08Z")

</div>

I am doing several tests with the options protocol, cluster and node\_name. Now, it works, I made a mistake in a part of my logstash's configuration.

Thanks for all.

---

<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 6, 2017, 4:59am UTC](https://discuss.elastic.co/t/error-unknown-setting-protocol-for-elasticsearch/49264/10 "2017-07-06T04:59:19Z")

</div>


