You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Sönke Liebau (JIRA)" <ji...@apache.org> on 2017/11/16 09:11:00 UTC

[jira] [Comment Edited] (KAFKA-4) Confusing Error mesage from producer when no kafka brokers are available

    [ https://issues.apache.org/jira/browse/KAFKA-4?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16254975#comment-16254975 ] 

Sönke Liebau edited comment on KAFKA-4 at 11/16/17 9:10 AM:
------------------------------------------------------------

Current error message when no broker is available is:

{code}
WARN Connection to node -1 could not be established. Broker may not be available. (org.apache.kafka.clients.NetworkClient)
{code}

This message was introduced by KAFKA-5179, so I think it is save to say that we can close this ticket as well with the same fix version. Before that there were other error messages that also improved upon this message, but I don't think we need to provide the entire history here..



was (Author: sliebau):
Current error message when no broker is available is:

{code}
WARN Connection to node -1 could not be established. Broker may not be available. (org.apache.kafka.clients.NetworkClient)
{code}

This message was introduced by KAFKA-5179, so I think it is save to say that we can close this ticket as well with the same fix version.


> Confusing Error mesage from producer when no kafka brokers are available
> ------------------------------------------------------------------------
>
>                 Key: KAFKA-4
>                 URL: https://issues.apache.org/jira/browse/KAFKA-4
>             Project: Kafka
>          Issue Type: Bug
>    Affects Versions: 0.6
>            Priority: Minor
>             Fix For: 0.11.0.0
>
>
> If no kafka brokers are available the producer gives the following error: 
> Exception in thread "main" kafka.common.InvalidPartitionException: Invalid number of partitions: 0 
> Valid values are > 0 
> at kafka.producer.Producer.kafka$producer$Producer$$getPartition(Producer.scala:144) 
> at kafka.producer.Producer$$anonfun$3.apply(Producer.scala:112) 
> at kafka.producer.Producer$$anonfun$3.apply(Producer.scala:102) 
> at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:206) 
> at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:206) 
> at scala.collection.IndexedSeqOptimized$class.foreach(IndexedSeqOptimized.scala:34) 
> at scala.collection.mutable.WrappedArray.foreach(WrappedArray.scala:32) 
> at scala.collection.TraversableLike$class.map(TraversableLike.scala:206) 
> at scala.collection.mutable.WrappedArray.map(WrappedArray.scala:32) 
> at kafka.producer.Producer.send(Producer.scala:102) 
> at kafka.javaapi.producer.Producer.send(Producer.scala:101) 
> at com.linkedin.nusviewer.PublishTestMessage.main(PublishTestMessage.java:45) 
> This is confusing. The problem is that no brokers are available, we should make this more clear.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)