Monday, May 16, 2016

Logstash doesn't work with Kafka output

With the following configuration:

input {
  file {
    path => "/home/izeye/programs/logstash-2.3.2/some.log"
    start_position => beginning
  }
}

output {
  kafka {
    bootstrap_servers => "1.2.3.4:9092"
    topic_id => "some-topic"
    codec => line
  }

#  stdout {
#  }
}

the following command didn't work:

./bin/logstash -f some.conf >> logstash.log 2>&1 &

Trying with Java client didn't work, either.

In my case, the cause was the wrong host name which is unreachable.

So I modified `config/server.properties` as follows:

advertised.host.name=1.2.3.4

After that, both Logstash and Java client worked.

No comments:

Post a Comment