# Kafka output plugin java.lang.long error

**URL:** https://discuss.elastic.co/t/kafka-output-plugin-java-lang-long-error/145398
**Category:** Logstash
**Created:** [August 21, 2018, 1:54pm UTC](https://discuss.elastic.co/t/kafka-output-plugin-java-lang-long-error/145398 "2018-08-21T13:54:42Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![nich](https://avatars.discourse-cdn.com/v4/letter/n/e79b87/32.png) [@nich](https://discuss.elastic.co/u/nich)
#### Post date: [August 21, 2018, 1:54pm UTC](https://discuss.elastic.co/t/kafka-output-plugin-java-lang-long-error/145398/1 "2018-08-21T13:54:42Z")

</div>

When I try to use the Kafka output plugin I get this variable type error:

`[ERROR][logstash.outputs.kafka] Unable to create Kafka producer from given configuration {:kafka_error_message=>org.apache.kafka.common.config.ConfigException: Invalid value 32768 for configuration receive.buffer.bytes: Expected value to be a 32-bit integer, but it was a java.lang.Long, :cause=>nil}`

I am just testing, so the output configuration is very simple:

```auto
  kafka {
    codec => json
    topic_id => "logstash-test"
    bootstrap_servers => "foo.example.com:9092"
  }
}

```

Logstash version is 6.3.0, and Kafka output plugin version is 7.1.2. The platform is CentOS6 with Java OpenJDK version 1.8.0\_171.

I have tried explicitly setting the receive\_buffer\_bytes parameter, with and without enclosing in quotes, but that made no difference. Does anybody have any ideas on how to fix please?

---

<div class="post-metadata">

### Author: ![nich](https://avatars.discourse-cdn.com/v4/letter/n/e79b87/32.png) [@nich](https://discuss.elastic.co/u/nich)
#### Post date: [August 23, 2018, 1:06pm UTC](https://discuss.elastic.co/t/kafka-output-plugin-java-lang-long-error/145398/2 "2018-08-23T13:06:13Z")

</div>

For the benefit of anyone else with this issue, upgrading Logstash to v6.3.2 resolved this issue.

---

<div class="post-metadata">

### Author: ![cyb3rward0g](https://avatars.discourse-cdn.com/v4/letter/c/57b2e6/32.png) [@cyb3rward0g](https://discuss.elastic.co/u/cyb3rward0g)
#### Post date: [August 23, 2018, 9:34pm UTC](https://discuss.elastic.co/t/kafka-output-plugin-java-lang-long-error/145398/3 "2018-08-23T21:34:01Z")

</div>

FYI I am using Elastic Official Docker Images. I updated the Logstash Image 6.3.2 to 6.4.0 and the issue is the same. The kafka output plugin 7.1.2 seems to be the issue. [https://github.com/logstash-plugins/logstash-output-kafka/pull/198](https://github.com/logstash-plugins/logstash-output-kafka/pull/198) . FYI Version ELK 6.3.2 was working fine.

---

<div class="post-metadata">

### Author: ![cyb3rward0g](https://avatars.discourse-cdn.com/v4/letter/c/57b2e6/32.png) [@cyb3rward0g](https://discuss.elastic.co/u/cyb3rward0g)
#### Post date: [August 23, 2018, 9:53pm UTC](https://discuss.elastic.co/t/kafka-output-plugin-java-lang-long-error/145398/4 "2018-08-23T21:53:58Z")

</div>

Logstash 6.3.2 was released on July 24th ([https://www.elastic.co/downloads/past-releases](https://www.elastic.co/downloads/past-releases)) and the Logstash Kafka Output Plugin 7.1.1 was released on June 5th ([https://www.elastic.co/guide/en/logstash-versioned-plugins/current/v7.1.1-plugins-outputs-kafka.html](https://www.elastic.co/guide/en/logstash-versioned-plugins/current/v7.1.1-plugins-outputs-kafka.html)). I am using the official Docker Image for Logstash and the 6.3.2 then must have been shipped with the Logstash Kafka Output Plugin version 7.1.1 . After updating to Docker Image 6.4.0 (released August 23rd,2018) the Logstash Kafka Output Plugin Version 7.1.2 (released August 8th, 2018) is released as part of the image. I rolled back the Kafka output plugin the following way:

```auto
bin/logstash-plugin uninstall logstash-output-kafka
bin/logstash-plugin install --version 7.1.1 logstash-output-kafka

```

After doing that, everything now works fine

if you want to remove version 7.1.2 and install 7.1.1 . while Logstash is starting for the firs time you can do the following:

```auto
logstash-plugin remove logstash-output-kafka
logstash-plugin install --version 7.1.1 logstash-output-kafka

```

you should then get the following before running logstash:

```auto
Successfully removed logstash-output-kafka
Validating logstash-output-kafka-7.1.1
Installing logstash-output-kafka
Installation successful

```

---

<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: [September 20, 2018, 9:54pm UTC](https://discuss.elastic.co/t/kafka-output-plugin-java-lang-long-error/145398/5 "2018-09-20T21:54:14Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
