# Issue with Kafka input with Logstash

**URL:** https://discuss.elastic.co/t/issue-with-kafka-input-with-logstash/111327
**Category:** Logstash
**Created:** [December 12, 2017, 12:13pm UTC](https://discuss.elastic.co/t/issue-with-kafka-input-with-logstash/111327 "2017-12-12T12:13:08Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![SJN8](https://avatars.discourse-cdn.com/v4/letter/s/f08c70/32.png) [@SJN8](https://discuss.elastic.co/u/SJN8)
#### Post date: [December 12, 2017, 12:13pm UTC](https://discuss.elastic.co/t/issue-with-kafka-input-with-logstash/111327/1 "2017-12-12T12:13:08Z")

</div>

Hi All,

I am using Kafka as input for Logstash , with below configuration to consume topics

input {  
kafka {  
zk\_connect =\> {"localhost:2181"}  
topic\_id =\> {"ITSB"}  
}  
}

but i am not able to start Logstash , getting below error

[2017-12-12T12:26:53,902][ERROR][logstash.agent] Failed to execute action {:action=\>LogStash::PipelineAction::Create/pipeline\_id:main, :exception=\>"LogStash::ConfigurationError", :message=\>"Expected one of #, =\> at line 3, column 36 (byte 54) after input {\n kafka {\n zk\_connect =\> {"localhost:2181"",

can someone please help on the same ?  
also let know if more details are required .

looks like syntax issue but i am not able to figure it out .

---

<div class="post-metadata">

### Author: ![Jon\_D](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jon_d/32/25657_2.png) [@Jon\_D](https://discuss.elastic.co/u/Jon_D)
#### Post date: [December 12, 2017, 12:57pm UTC](https://discuss.elastic.co/t/issue-with-kafka-input-with-logstash/111327/2 "2017-12-12T12:57:31Z")

</div>

Hello,

try this :

```
input {
     kafka {
            bootstrap_servers => "host1:port,host2:port"
            topics => ["topicname"]
        }
}

```

Port will be the kafka port (9092) if you didn't change it.

The zk\_connect parameter in consumer configs is deprecated as far as I know.

Hope this helps,  
regards,  
Jonas

---

<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: [January 9, 2018, 12:57pm UTC](https://discuss.elastic.co/t/issue-with-kafka-input-with-logstash/111327/3 "2018-01-09T12:57:31Z")

</div>

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