Logstash Conf Error For Tweet

I'm trying to do this . 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]}" } }

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

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

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.

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

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).

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

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.

root@client:/opt/logstash/bin# --configtest -f /etc/logstash/conf.d/02-beats-input.conf
it's not working. Where did i wrong?

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.

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" } }

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

I edit my last post

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

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

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 :slight_smile:

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

Have you even installed Elasticsearch?

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

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