on sandbox kafka broker is binding to the ip of the VM. You can either
use the hostname (sandbox.hortonworks.com) or ip of the sandbox 

 netstat -anp | grep 6667
tcp        0      0 ::ffff:10.0.2.15:6667       :::*                    
   LISTEN      9485/java           
tcp        0      0 ::ffff:10.0.2.15:6667       ::ffff:10.0.2.15:59883  
   ESTABLISHED 9485/java           
tcp        0      0 ::ffff:10.0.2.15:59883      ::ffff:10.0.2.15:6667   
   ESTABLISHED 9485/java           
[root@sandbox ~]#
/usr/hdp/current/kafka-broker/bin/kafka-console-producer.sh
--broker-list 10.0.2.15:6667 --topic test
sdf
sf
asfd
afdas
^C[root@sandbox ~]#
/usr/hdp/current/kafka-broker/bin/kafka-console-producer.sh
--broker-list sandbox.hortonworks.com:6667 --topic test
sf
sf
asfa

/usr/hdp/current/kafka-broker/bin/kafka-console-consumer.sh --zookeeper
localhost:2181 --topic test --from-beginning
sdf
sf
asfd
afdas
sf
sf
asfa

On Fri, Dec 5, 2014, at 07:47 AM, Marco wrote:
> Ok, I've download Kafka by myself and that works. Anyways, thx for help,
> guys!
> 
> 2014-12-05 15:55 GMT+01:00 Marco <marco....@gmail.com>:
> > The port in server.configuration is indeed 6667.
> >
> >  bin/kafka-console-producer.sh --broker-list localhost:6667 --topic test
> >
> > -> same error :(
> >
> > I've tried also to change the port, use the hostname instead of 
> > localhost....
> >
> > I'm running the stuff in VMWare with sharing IP-address from my
> > host...don't know if this can intefere?
> >
> >
> > 2014-12-05 15:14 GMT+01:00 Harsha <ka...@harsha.io>:
> >> I think the default port for kafka running there is 6667. Can you check
> >> server.properties to see whats the port number
> >> -Harsha
> >>
> >> On Fri, Dec 5, 2014, at 06:10 AM, Marco wrote:
> >>> Yes, it's online and version -0.8.1.2.2.0.0-1084. jps lists it also
> >>>
> >>> 2014-12-05 14:56 GMT+01:00 svante karlsson <s...@csi.se>:
> >>> > I haven't run the sandbox but check if the kafka server is started at 
> >>> > all.
> >>> >
> >>> > ps -ef | grep kafka
> >>> >
> >>> >
> >>> >
> >>> > 2014-12-05 14:34 GMT+01:00 Marco <marco....@gmail.com>:
> >>> >
> >>> >> Hi,
> >>> >>
> >>> >> I've installed the Hortonworks Sandbox and try to get into Kafka.
> >>> >>
> >>> >> Unfortunately, even the simple tutorial does not work :(
> >>> >> http://kafka.apache.org/documentation.html#introduction
> >>> >>
> >>> >> If I try to send a message via
> >>> >>
> >>> >> bin/kafka-console-producer.sh --broker-list localhost:9092 --topic test
> >>> >>
> >>> >> I get
> >>> >>
> >>> >>  ERROR Producer connection to localhost:9092 unsuccessful
> >>> >> (kafka.producer.SyncProducer)
> >>> >>
> >>> >> java.net.ConnectException: Connection refused
> >>> >>         at sun.nio.ch.Net.connect0(Native Method)
> >>> >>         at sun.nio.ch.Net.connect(Net.java:465)
> >>> >>         at sun.nio.ch.Net.connect(Net.java:457)
> >>> >>         at 
> >>> >> sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:670)
> >>> >>         at 
> >>> >> kafka.network.BlockingChannel.connect(BlockingChannel.scala:57)
> >>> >>         at kafka.producer.SyncProducer.connect(SyncProducer.scala:141)
> >>> >>         at
> >>> >> kafka.producer.SyncProducer.getOrMakeConnection(SyncProducer.scala:156)
> >>> >>         at
> >>> >> kafka.producer.SyncProducer.kafka$producer$SyncProducer$$doSend(SyncProducer.scala:68)
> >>> >>         at kafka.producer.SyncProducer.send(SyncProducer.scala:112)
> >>> >>         at
> >>> >> kafka.client.ClientUtils$.fetchTopicMetadata(ClientUtils.scala:53)
> >>> >>         at
> >>> >> kafka.producer.BrokerPartitionInfo.updateInfo(BrokerPartitionInfo.scala:82)
> >>> >>         at
> >>> >> kafka.producer.async.DefaultEventHandler$$anonfun$handle$1.apply$mcV$sp(DefaultEventHandler.scala:67)
> >>> >>         at kafka.utils.Utils$.swallow(Utils.scala:167)
> >>> >>         at kafka.utils.Logging$class.swallowError(Logging.scala:106)
> >>> >>         at kafka.utils.Utils$.swallowError(Utils.scala:46)
> >>> >>         at
> >>> >> kafka.producer.async.DefaultEventHandler.handle(DefaultEventHandler.scala:67)
> >>> >>         at
> >>> >> kafka.producer.async.ProducerSendThread.tryToHandle(ProducerSendThread.scala:104)
> >>> >>         at
> >>> >> kafka.producer.async.ProducerSendThread$$anonfun$processEvents$3.apply(ProducerSendThread.scala:87)
> >>> >>         at
> >>> >> kafka.producer.async.ProducerSendThread$$anonfun$processEvents$3.apply(ProducerSendThread.scala:67)
> >>> >>         at scala.collection.immutable.Stream.foreach(Stream.scala:547)
> >>> >>         at
> >>> >> kafka.producer.async.ProducerSendThread.processEvents(ProducerSendThread.scala:66)
> >>> >>
> >>> >> In my server.properties the
> >>> >> host is set to host.name=sandbox.hortonworks.com, which is correct.
> >>> >>
> >>> >> Thanks for any help,
> >>> >> Marco
> >>> >>
> >>> >>
> >>> >>
> >>> >> --
> >>> >> Viele Grüße,
> >>> >> Marco
> >>> >>
> >>>
> >>>
> >>>
> >>> --
> >>> Viele Grüße,
> >>> Marco
> >
> >
> >
> > --
> > Viele Grüße,
> > Marco
> 
> 
> 
> -- 
> Viele Grüße,
> Marco

Reply via email to