We're updating the issue view to help you get more done. 

elasticsearch output broken when using new "workers" parameter

Description

When I set the "workers" parameter to any value bigger than 1 on the elasticsearch plugin (with embedded => true in my case), no data gets written to elasticsearch:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 $ sudo /etc/init.d/logstash stop $ # make sure no logstash process is still running $ sudo rm -fr /opt/logstash/data/elasticsearch/ $ sudo /etc/init.d/logstash start $ ps ax | grep logstash 30747 pts/5 Sl 3:10 /usr/bin/java -Xmx4096m -Djava.io.tmpdir=/opt/logstash/tmp -jar /opt/logstash/logstash.jar agent --config /etc/logstash/conf.d --log /var/log/logstash/logstash.log -w 16 $ find /opt/logstash/data/elasticsearch/ -path '*logstash-2013.10.30*' | wc -l 497 $ find /opt/logstash/data/elasticsearch/ | wc -l 556 $ # seems good, but: # curl -s localhost:9200/_status?pretty { "ok" : true, "_shards" : { "total" : 0, "successful" : 0, "failed" : 0 }, "indices" : { } }

... and obviously kibana and friends fail to fetch data from elasticsearch.

When I set "workers => 1", everything work fine.

To add confusion, when I start with 1 worker and later change to something > 1 and restart logstash, http://localhost:9200/_status?pretty shows the index is there, but a closer look shows that nothing is getting written to it anymore (various *size counters aren't incremented anymore). And obviously no new events show up in kibana.

FTR, relevant parts of my config:

1 2 3 4 5 6 7 8 9 10 11 12 input { udp { type => "syslog" port => 5514 } } output { elasticsearch { embedded => true workers => 2 } }

running with "-w 8"

Environment

None

Status

Assignee

Logstash Developers

Reporter

Marc Fournier

Affects versions

1.2.2

Priority