# LocalJumpError Logstash 2.3.0

**URL:** <https://discuss.elastic.co/t/localjumperror-logstash-2-3-0/46984>\
**Category:** Logstash\
**Created:** [April 11, 2016, 11:56am UTC](https://discuss.elastic.co/t/localjumperror-logstash-2-3-0/46984 "2016-04-11T11:56:18Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![diwertowski](https://avatars.discourse-cdn.com/v4/letter/d/ac91a4/32.png) [@diwertowski](https://discuss.elastic.co/u/diwertowski)\
**Post date:** [April 11, 2016, 11:56am UTC](https://discuss.elastic.co/t/localjumperror-logstash-2-3-0/46984/1 "2016-04-11T11:56:18Z")

</div>

Logstash 2.3.0  
Windows Server 2008

If I start my Logstash-Shipper with this output-configuation...

```
output {
    redis { 
        host => ["redisserver1:6379","redisserver2:6380"]
	    shuffle_hosts => true
            data_type => "list" 
            key => "logstash"
	    batch => true
	    batch_events => 100
	    codec => json { charset => "ISO-8859-1"}
    }
}

```

i'll get this error:

**←[33mError encoding event {:exception=\>#\< LocalJumpError: unexpected next\>, :event=\>...**

without batch =\> true, everything is fine. why i cant use batch

---

<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:** [April 13, 2016, 2:02am UTC](https://discuss.elastic.co/t/localjumperror-logstash-2-3-0/46984/2 "2016-04-13T02:02:25Z")

</div>

Please upgrade to LS 2.3.1, there is a few known issues with 2.3.0.

---

<div class="post-metadata">

**Author:** ![diwertowski](https://avatars.discourse-cdn.com/v4/letter/d/ac91a4/32.png) [@diwertowski](https://discuss.elastic.co/u/diwertowski)\
**Post date:** [April 13, 2016, 8:04am UTC](https://discuss.elastic.co/t/localjumperror-logstash-2-3-0/46984/3 "2016-04-13T08:04:04Z")

</div>

Same in 2.3.1, but i found a workaround. You have to edit some code:  
logstash-2.3.0/vendor/jruby/1.9/gems/logstash-output-redis-2.0.4/lib/logstash/outputs/redis.rb

At line 233, original:

```
if @batch and @data_type == 'list' # Don't use batched method for pubsub.
      # Stud::Buffer
      buffer_receive(payload, key)
      next
end

```

You have to change next to **return** :

```
if @batch and @data_type == 'list' # Don't use batched method for pubsub.
      # Stud::Buffer
      buffer_receive(payload, key)
      return
end
```

---

<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:** [April 13, 2016, 8:05am UTC](https://discuss.elastic.co/t/localjumperror-logstash-2-3-0/46984/4 "2016-04-13T08:05:49Z")

</div>

Can you raise this against the plugin repo please?

> **[logstash-plugins/logstash-output-redis](https://github.com/logstash-plugins/logstash-output-redis)**
>
> Contribute to logstash-output-redis development by creating an account on GitHub.

---

<div class="post-metadata">

**Author:** ![IngaFeick](https://avatars.discourse-cdn.com/v4/letter/i/7ab992/32.png) [@IngaFeick](https://discuss.elastic.co/u/IngaFeick)\
**Post date:** [April 20, 2016, 12:06pm UTC](https://discuss.elastic.co/t/localjumperror-logstash-2-3-0/46984/5 "2016-04-20T12:06:34Z")

</div>

I have a similar problem with logstash 2.3.1 on ubuntu. Running a config that works perfectly fine with 2.1.1, on 2.3.1 it gives me

> :message=\>"Exception in pipelineworker, the pipeline stopped processing new events, please check your filter configuration and restart Logstash.", "exception"=\>#\<LocalJumpError: unexpected next\>, "backtrace"=\>["/appdata/logstash-2.3.1/vendor/local\_gems/aea1f510/logstash-filter-ms\_ctest\_errorratio-0.1.0/lib/logstash/filters/ms\_ctest\_errorratio.rb:45:in `filter'", "/appdata/logstash-2.3.1/vendor/bundle/jruby/1.9/gems/logstash-core-2.3.1-java/lib/logstash/filters/base.rb:151:in `multi\_filter'", "org/jruby/RubyArray.java:1613:in `each'", "/appdata/logstash-2.3.1/vendor/bundle/jruby/1.9/gems/logstash-core-2.3.1-java/lib/logstash/filters/base.rb:148:in `multi\_filter'", "(eval):190:in `filter_func'", "/appdata/logstash-2.3.1/vendor/bundle/jruby/1.9/gems/logstash-core-2.3.1-java/lib/logstash/pipeline.rb:267:in `filter\_batch'", "org/jruby/RubyArray.java:1613:in `each'", "org/jruby/RubyEnumerable.java:852:in `inject'", "/appdata/logstash-2.3.1/vendor/bundle/jruby/1.9/gems/logstash-core-2.3.1-java/lib/logstash/pipeline.rb:265:in `filter_batch'", "/appdata/logstash-2.3.1/vendor/bundle/jruby/1.9/gems/logstash-core-2.3.1-java/lib/logstash/pipeline.rb:223:in `worker\_loop'", "/appdata/logstash-2.3.1/vendor/bundle/jruby/1.9/gems/logstash-core-2.3.1-java/lib/logstash/pipeline.rb:201:in `start\_workers'"],

We're not using redis, we're using the elasticsearch output but the error message doesn't indicate that the problem arises from there. Out of the dozen logstashes that we run on 2.3.1, all of which are using the same elasticsearch plugin, this one is the only to show this behaviour.  
We have rolled back to 2.1.1 as a workaround.  
The config is:

> input  
> {  
> kafka  
> {  
> # some kafka config  
> }  
> }  
> filter  
> {

> date  
> {  
> match =\> ["[header][time]", "UNIX" ]  
> }

> if [metric][name] =~ /api/  
> {  
> drop {}  
> }

> ruby  
> {  
> code =\> '  
> splitted = event["[metric][name]"].split("-")  
> event["c\_test"] = splitted.pop()  
> event["method"] = splitted.join("\_")  
> '  
> }

> mutate  
> {  
> remove\_field =\> ["host", "version","path", "message", "@version", "set\_fields", "@set\_fields", "[header][time]", "unknown\_fields", "[metric][name]", "@version"]  
> add\_field =\> { "source" =\> "server" }  
> }

> ms\_ctest\_errorratio  
> {  
> # config for some custom plugin that we wrote to calculate error ratios  
> }

> if "miss\_ratio" in [tags]  
> {  
> mutate  
> {  
> add\_field =\> { "source" =\> "ratio\_calculator" }  
> }  
> }

> }  
> output  
> {

> elasticsearch  
> {  
> hosts =\> ["10.2.3.189","10.2.3.198","10.2.3.199","10.2.3.223","10.2.3.224"]  
> index =\> "java-ctests-ms-%{+YYYY.MM.dd}"  
> document\_type =\> "%{source}"  
> flush\_size =\> 5000  
> }
> 
> }

---

<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, 5:01am UTC](https://discuss.elastic.co/t/localjumperror-logstash-2-3-0/46984/6 "2017-07-06T05:01:26Z")

</div>

Closed on July 6, 2017, 5:01am UTC


