Help getting POC working-Control Center won't connect to Kafka

I currently have 2 machines:

  • box 1 has Kafka (9092)
  • box 2 has ZooKeeper (2181) and Control Center (9021)

When we startup Control Center, for some reason it looks like it is trying to connect using localhost/127.0.0.1:9092…but this is NOT correct and NOT what is set in the properties file.

For some reason Control Center running on box 2 is not connecting to Kafka on box 1.

Any thoughts?

Which config file did you set for control center? How did you launch control center (what command line)?

We updated the control-center.properties file and used it in the command line when running control-center-start

hey @pebriggs
could you provide some more details, e.g config snippets, exact command line your starting with and so on?

Of course…
sudo ./control-center-start /devkafka/confluent-7.0.1/etc/confluent-control-center/control-center.properties

Something new discovered, if Zookeeper is NOT running, the process says it can’t connect to box 1 (proper address) but if Zookeeper is running, it says it can’t connect to localhost

thx
could you also provide the control-center.properties and maybe the zookeeper conf and so on?

zookeeper.properties

dataDir=/tmp/zookeeper
clientPort=2181
maxClientCnxns=0
tickTime=2000
dataDir=/var/lib/zookeeper/
clientPort=2181
initLimit=5
syncLimit=2
server.1=zoo1:2888:3888
autopurge.snapRetainCount=3
autopurge.purgeInterval=24

control-center.properties

bootstrap.servers = d01nsvl-atrdg01.sddev.lpl.com:9092
zookeeper.connect = d01nsvl-atrdg02.sddev.lpl.com:2181
confluent.controlcenter.data.dir=/tmp/confluent/control-center
confluent.license={LICENSE}
confluent.controlcenter.connect.kafkaconnectcluseter.cluster=http://localhost:8083
confluent.controlcenter.internal.topics.replication=1
confluent.controlcenter.command.topic.replication=1
confluent.controlcenter.ui.autoupdate.enable=true
confluent.controlcenter.usage.data.collection.enable=true
confluent.monitoring.interceptor.topic.replication=1
confluent.metrics.topic.replication=1

I assume this is a typo or is this the config in place at the moment?

anything in the zookeeper logs?

No that is the actual config…something wrong there?

Where are the zookeeper logs located?

server.1 should point to the servername where zookeeper is running

server.x=[hostname]:nnnnn[:nnnnn], etc
servers making up the ZooKeeper ensemble. When the server starts up, it determines which server it is by looking for the file myid in the data directory. That file contains the server number, in ASCII, and it should match x in server.x in the left hand side of this setting. The list of servers that make up ZooKeeper servers that is used by the clients must match the list of ZooKeeper servers that each ZooKeeper server has.
ZooKeeper Administrator's Guide

according to your description they should be in /devkafka/confluent-7.0.1/logs

Ok so we have the myid file with the value of 1 in it and we just updated the config to be
server.1=localhost:2888:3888

The logs and ports indicate to me that both Kafka and Zookeeper are running and talking to each other.

When we run control center now, it seems like it is getting stuck…running but not accessible via the UI on 9021.

ok so one step further I think :wink:

what does netstat say?

anything in the logfiles for control center?

The control center log file says connection to node -1 cannot be established

ok so it tries to connect to right host, correct?

what about iptables/firewalld anything in place?

I don’t think it is the right host…we have been trying to run control center on either box and it seems like we get the same thing…we had broker.id=1 so we changed it to auto generation…trying it now

hmm see
what’s the exact error in the logfile?

did you try to telnet from the control center host to the broker?
did you check with nestat on which interface the host is listening?

i would also recommend to check if the kafka cluster is running fine
to rule this as a potential source of errors
(e.g. create a dummy topic after starting zookeeper and kafka)

Having trouble replying, says something about a 2 hr limit. We have hit the wall so we are starting over…we are wiping out what we did and starting over.

We should be able to run Zookeeper, Kafka, and Control Center on the same machine right? Using localhost for all the host names?

Did this and we are getting the same error…something with the license module saying failed to get offsets by times…