# Logstash Conf Error For Tweet

**URL:** <https://discuss.elastic.co/t/logstash-conf-error-for-tweet/49086>\
**Category:** Logstash\
**Created:** [May 3, 2016, 4:56pm UTC](https://discuss.elastic.co/t/logstash-conf-error-for-tweet/49086 "2016-05-03T16:56:23Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![teatone](https://avatars.discourse-cdn.com/v4/letter/t/d9b06d/32.png) [@teatone](https://discuss.elastic.co/u/teatone)\
**Post date:** [May 3, 2016, 4:56pm UTC](https://discuss.elastic.co/t/logstash-conf-error-for-tweet/49086/1 "2016-05-03T16:56:24Z")

</div>

Hi,  
I'm trying to do [this](http://david.pilato.fr/blog/2015/06/01/indexing-twitter-with-logstash-and-elasticsearch/) . But when i wrote all configurations and restart logstash. This error appears "Configuration error. Not restarting. Re-run with configtest parameter for details" .

I tryied to find out this error step by step. Then i figure it out it's about my output configuration.

I'm using digitalocean droplet with elk logging stack so it all set up already. I'm just trying to implement twitter configuration. I need help.  
this is my default output conf  
`output { elasticsearch { hosts => ["localhost:9200"] sniffing => true manage_template => false index => "%{[@metadata][beat]}-%{+YYYY.MM.dd}" document_type => "%{[@metadata][type]}" } }`

---

<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 3, 2016, 11:11pm UTC](https://discuss.elastic.co/t/logstash-conf-error-for-tweet/49086/2 "2016-05-03T23:11:56Z")

</div>

Does it error if you run LS and refer to the conf file manually?

---

<div class="post-metadata">

**Author:** ![teatone](https://avatars.discourse-cdn.com/v4/letter/t/d9b06d/32.png) [@teatone](https://discuss.elastic.co/u/teatone)\
**Post date:** [May 4, 2016, 5:19am UTC](https://discuss.elastic.co/t/logstash-conf-error-for-tweet/49086/3 "2016-05-04T05:19:07Z")

</div>

I don't know how to do it manually. Can you show me?

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [May 4, 2016, 5:31am UTC](https://discuss.elastic.co/t/logstash-conf-error-for-tweet/49086/4 "2016-05-04T05:31:47Z")

</div>

> This error appears "Configuration error. Not restarting. Re-run with configtest parameter for details" .

Run `/path/to/logstash --configtest -f /path/to/configfile` to get details.

---

<div class="post-metadata">

**Author:** ![teatone](https://avatars.discourse-cdn.com/v4/letter/t/d9b06d/32.png) [@teatone](https://discuss.elastic.co/u/teatone)\
**Post date:** [May 4, 2016, 5:48am UTC](https://discuss.elastic.co/t/logstash-conf-error-for-tweet/49086/5 "2016-05-04T05:48:07Z")

</div>

I get command not found. I'm using ubuntu. I think its about syntax. Could you show me with more detail.

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [May 4, 2016, 5:50am UTC](https://discuss.elastic.co/t/logstash-conf-error-for-tweet/49086/6 "2016-05-04T05:50:17Z")

</div>

It sounds like you didn't replace /path/to with the actual path to the Logstash binary (probably /opt/logstash/bin) and the path to your configuration file (probably /etc/logstash/conf.d).

---

<div class="post-metadata">

**Author:** ![teatone](https://avatars.discourse-cdn.com/v4/letter/t/d9b06d/32.png) [@teatone](https://discuss.elastic.co/u/teatone)\
**Post date:** [May 4, 2016, 5:53am UTC](https://discuss.elastic.co/t/logstash-conf-error-for-tweet/49086/7 "2016-05-04T05:53:42Z")

</div>

`root@client:/etc/logstash/conf.d# --configtest -f 02-beats-input.conf` it's like this. I think i did wrong

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [May 4, 2016, 5:56am UTC](https://discuss.elastic.co/t/logstash-conf-error-for-tweet/49086/8 "2016-05-04T05:56:54Z")

</div>

Your command should have the form `/path/to/logstash --configtest -f /path/to/configfile`, with /path/to replaced by the actual paths to the Logstash binary and your configuration file.

---

<div class="post-metadata">

**Author:** ![teatone](https://avatars.discourse-cdn.com/v4/letter/t/d9b06d/32.png) [@teatone](https://discuss.elastic.co/u/teatone)\
**Post date:** [May 4, 2016, 6:04am UTC](https://discuss.elastic.co/t/logstash-conf-error-for-tweet/49086/9 "2016-05-04T06:04:22Z")

</div>

`root@client:/opt/logstash/bin# --configtest -f /etc/logstash/conf.d/02-beats-input.conf`  
it's not working. Where did i wrong?  
[![](http://i.hizliresim.com/ZkbXrz.png) ](http://i.hizliresim.com/ZkbXrz.png)

[![](http://i.hizliresim.com/Vaq9ZR.png) ](http://i.hizliresim.com/Vaq9ZR.png)

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [May 4, 2016, 6:33am UTC](https://discuss.elastic.co/t/logstash-conf-error-for-tweet/49086/10 "2016-05-04T06:33:03Z")

</div>

The command you're running is `--configtest -f /etc/logstash/conf.d/02-beats-input.conf`. You're not including the Logstash command. Over and out.

---

<div class="post-metadata">

**Author:** ![teatone](https://avatars.discourse-cdn.com/v4/letter/t/d9b06d/32.png) [@teatone](https://discuss.elastic.co/u/teatone)\
**Post date:** [May 4, 2016, 7:02am UTC](https://discuss.elastic.co/t/logstash-conf-error-for-tweet/49086/11 "2016-05-04T07:02:53Z")

</div>

I get this  
`root@client:/opt/logstash/bin# /opt/logstash/bin/logstash --configtest -f /etc/logstash/conf.d/30-elasticsearch-output.conf Connection refused {:class=>"Manticore::SocketException", :level=>:error} Connection refused {:class=>"Manticore::SocketException", :level=>:error} Configuration OK`

this is my output conf  
`output { stdout { codec => dots } elasticsearch { hosts => "localhost" index => "twitter" document_type => "tweet" template => "twitter_template.json" template_name => "twitter" } }`

---

<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 4, 2016, 7:06am UTC](https://discuss.elastic.co/t/logstash-conf-error-for-tweet/49086/12 "2016-05-04T07:06:03Z")

</div>

Ok, so take a look at [https://www.elastic.co/guide/en/logstash/current/plugins-outputs-elasticsearch.html](https://www.elastic.co/guide/en/logstash/current/plugins-outputs-elasticsearch.html) and make some corrections 🙂

---

<div class="post-metadata">

**Author:** ![teatone](https://avatars.discourse-cdn.com/v4/letter/t/d9b06d/32.png) [@teatone](https://discuss.elastic.co/u/teatone)\
**Post date:** [May 4, 2016, 7:20am UTC](https://discuss.elastic.co/t/logstash-conf-error-for-tweet/49086/13 "2016-05-04T07:20:07Z")

</div>

I edit my last post

---

<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 4, 2016, 7:20am UTC](https://discuss.elastic.co/t/logstash-conf-error-for-tweet/49086/14 "2016-05-04T07:20:38Z")

</div>

Is ES running? Can you `curl localhost:9200` and get a response?

---

<div class="post-metadata">

**Author:** ![teatone](https://avatars.discourse-cdn.com/v4/letter/t/d9b06d/32.png) [@teatone](https://discuss.elastic.co/u/teatone)\
**Post date:** [May 4, 2016, 7:21am UTC](https://discuss.elastic.co/t/logstash-conf-error-for-tweet/49086/15 "2016-05-04T07:21:28Z")

</div>

> [@warkolm](#):
>
> curl localhost:9200

root@client:~# curl localhost:9200  
curl: (7) Failed to connect to localhost port 9200: Connection refused

---

<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 4, 2016, 7:25am UTC](https://discuss.elastic.co/t/logstash-conf-error-for-tweet/49086/16 "2016-05-04T07:25:47Z")

</div>

Ok, so ES isn't running on localhost.  
Is that where you installed it? Is the service running?

You need to do a bit of investigation on your own here, we don't have access to your systems 🙂

---

<div class="post-metadata">

**Author:** ![teatone](https://avatars.discourse-cdn.com/v4/letter/t/d9b06d/32.png) [@teatone](https://discuss.elastic.co/u/teatone)\
**Post date:** [May 4, 2016, 7:32am UTC](https://discuss.elastic.co/t/logstash-conf-error-for-tweet/49086/17 "2016-05-04T07:32:53Z")

</div>

I'm working on digitalocean droplet. I don't know where to look. But thanks anyway. You said it i have to figure it out some how

---

<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 4, 2016, 7:33am UTC](https://discuss.elastic.co/t/logstash-conf-error-for-tweet/49086/18 "2016-05-04T07:33:10Z")

</div>

Have you even installed Elasticsearch?

---

<div class="post-metadata">

**Author:** ![teatone](https://avatars.discourse-cdn.com/v4/letter/t/d9b06d/32.png) [@teatone](https://discuss.elastic.co/u/teatone)\
**Post date:** [May 4, 2016, 7:34am UTC](https://discuss.elastic.co/t/logstash-conf-error-for-tweet/49086/19 "2016-05-04T07:34:14Z")

</div>

yes it has been installed. before the twitter configuration. all system is working fine.

---

<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 4, 2016, 7:35am UTC](https://discuss.elastic.co/t/logstash-conf-error-for-tweet/49086/20 "2016-05-04T07:35:48Z")

</div>

If ES is not responding to `localhost:9200` then something is not right there.

[Next page](https://discuss.elastic.co/t/logstash-conf-error-for-tweet/49086.md?page=2)
