premunk
premunk

Reputation: 423

Logstash refusing to start or listen to elastic search

I have setup Logstash and Elastic Search using Homebrew. Logstash takes forever to get connected or to start up. This is the way I start up Logstash (added the protocol from another answer on SO)

logstash -e 'input { udp {port => 5228 codec => json_lines}} output {elasticsearch { host => localhostprotocol => "http"} stdout {codec => rubydebug }}'

I start ES with just elasticsearch and the output I get on Logstash terminal is:

Using milestone 2 input plugin 'udp'. This plugin should be stable, but if you see strange behavior, please let us know! For more information on plugin milestones, see http://logstash.net/docs/1.4.2/plugin-milestones {:level=>:warn}

Nothing ever changes, nor does it get started. I should be receiving a connection added to elastic search but this is what I see on ES windwow:

[2015-03-10 14:02:32,170][INFO ][node                     ] [Hub] version[1.4.4], pid[72525], build[c88f77f/2015-02-19T13:05:36Z]
[2015-03-10 14:02:32,170][INFO ][node                     ] [Hub] initializing
[2015-03-10 14:02:32,173][INFO ][plugins                  ] [Hub] loaded [], sites []
[2015-03-10 14:02:33,725][INFO ][node                     ] [Hub] initialized
[2015-03-10 14:02:33,725][INFO ][node                     ] [Hub] starting
[2015-03-10 14:02:33,774][INFO ][transport                ] [Hub] bound_address {inet[/127.0.0.1:9300]}, publish_address {inet[/127.0.0.1:9300]}
[2015-03-10 14:02:33,787][INFO ][discovery                ] [Hub] elasticsearch_pramesh/5P2E4VDFRFyDAsXOHH-MJw
[2015-03-10 14:02:37,556][INFO ][cluster.service          ] [Hub] new_master [Hub][5P2E4VDFRFyDAsXOHH-MJw][hostname.local][inet[/127.0.0.1:9300]], reason: zen-disco-join (elected_as_master)
[2015-03-10 14:02:37,571][INFO ][http                     ] [Hub] bound_address {inet[/127.0.0.1:9200]}, publish_address {inet[/127.0.0.1:9200]}
[2015-03-10 14:02:37,571][INFO ][node                     ] [Hub] started
[2015-03-10 14:02:37,818][INFO ][gateway                  ] [Hub] recovered [1] indices into cluster_state

Where should I start debugging from? I have tried some suggestions on SO but nothing seems to so as much give me an error, from where I could proceed.

Upvotes: 1

Views: 786

Answers (1)

SimonH
SimonH

Reputation: 984

It looks as if you've got a typo there, you need a space between localhost and protocol. However, I'd advise also adding the port as below:

output {
    elasticsearch { host => "localhost" protocol => "http" port =>"9200"} 
    stdout {codec => rubydebug }
}

Upvotes: 1

Related Questions