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

**URL:** <https://forum.confluent.io/t/help-getting-poc-working-control-center-wont-connect-to-kafka/4005>\
**Category:** Ops\
**Created:** [26 January 2022 21:46 UTC](https://forum.confluent.io/t/help-getting-poc-working-control-center-wont-connect-to-kafka/4005 "2022-01-26T21:46:04Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![pebriggs](https://avatars.discourse-cdn.com/v4/letter/p/47e85d/32.png) [@pebriggs](https://forum.confluent.io/u/pebriggs)\
**Post date:** [26 January 2022 21:46 UTC](https://forum.confluent.io/t/help-getting-poc-working-control-center-wont-connect-to-kafka/4005/1 "2022-01-26T21:46:04Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![rmoff](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.confluent.io/rmoff/32/3_2.png) [@rmoff](https://forum.confluent.io/u/rmoff)\
**Post date:** [26 January 2022 22:07 UTC](https://forum.confluent.io/t/help-getting-poc-working-control-center-wont-connect-to-kafka/4005/2 "2022-01-26T22:07:38Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![pebriggs](https://avatars.discourse-cdn.com/v4/letter/p/47e85d/32.png) [@pebriggs](https://forum.confluent.io/u/pebriggs)\
**Post date:** [26 January 2022 22:20 UTC](https://forum.confluent.io/t/help-getting-poc-working-control-center-wont-connect-to-kafka/4005/3 "2022-01-26T22:20:13Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![mmuehlbeyer](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.confluent.io/mmuehlbeyer/32/1088_2.png) [@mmuehlbeyer](https://forum.confluent.io/u/mmuehlbeyer)\
**Post date:** [27 January 2022 06:55 UTC](https://forum.confluent.io/t/help-getting-poc-working-control-center-wont-connect-to-kafka/4005/4 "2022-01-27T06:55:34Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![pebriggs](https://avatars.discourse-cdn.com/v4/letter/p/47e85d/32.png) [@pebriggs](https://forum.confluent.io/u/pebriggs)\
**Post date:** [27 January 2022 15:27 UTC](https://forum.confluent.io/t/help-getting-poc-working-control-center-wont-connect-to-kafka/4005/5 "2022-01-27T15:27:21Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![mmuehlbeyer](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.confluent.io/mmuehlbeyer/32/1088_2.png) [@mmuehlbeyer](https://forum.confluent.io/u/mmuehlbeyer)\
**Post date:** [27 January 2022 15:36 UTC](https://forum.confluent.io/t/help-getting-poc-working-control-center-wont-connect-to-kafka/4005/6 "2022-01-27T15:36:48Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![pebriggs](https://avatars.discourse-cdn.com/v4/letter/p/47e85d/32.png) [@pebriggs](https://forum.confluent.io/u/pebriggs)\
**Post date:** [27 January 2022 15:52 UTC](https://forum.confluent.io/t/help-getting-poc-working-control-center-wont-connect-to-kafka/4005/7 "2022-01-27T15:52:06Z")

</div>

zookeeper.properties

```auto
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

```

---

<div class="post-metadata">

**Author:** ![pebriggs](https://avatars.discourse-cdn.com/v4/letter/p/47e85d/32.png) [@pebriggs](https://forum.confluent.io/u/pebriggs)\
**Post date:** [27 January 2022 16:31 UTC](https://forum.confluent.io/t/help-getting-poc-working-control-center-wont-connect-to-kafka/4005/9 "2022-01-27T16:31:27Z")

</div>

control-center.properties

```auto
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

```

---

<div class="post-metadata">

**Author:** ![mmuehlbeyer](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.confluent.io/mmuehlbeyer/32/1088_2.png) [@mmuehlbeyer](https://forum.confluent.io/u/mmuehlbeyer)\
**Post date:** [27 January 2022 16:35 UTC](https://forum.confluent.io/t/help-getting-poc-working-control-center-wont-connect-to-kafka/4005/10 "2022-01-27T16:35:32Z")

</div>

> [@pebriggs](#):
>
> `server.1=zoo1:2888:3888`

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

anything in the zookeeper logs?

---

<div class="post-metadata">

**Author:** ![pebriggs](https://avatars.discourse-cdn.com/v4/letter/p/47e85d/32.png) [@pebriggs](https://forum.confluent.io/u/pebriggs)\
**Post date:** [27 January 2022 16:48 UTC](https://forum.confluent.io/t/help-getting-poc-working-control-center-wont-connect-to-kafka/4005/11 "2022-01-27T16:48:42Z")

</div>

No that is the actual config…something wrong there?

---

<div class="post-metadata">

**Author:** ![pebriggs](https://avatars.discourse-cdn.com/v4/letter/p/47e85d/32.png) [@pebriggs](https://forum.confluent.io/u/pebriggs)\
**Post date:** [27 January 2022 17:08 UTC](https://forum.confluent.io/t/help-getting-poc-working-control-center-wont-connect-to-kafka/4005/12 "2022-01-27T17:08:56Z")

</div>

Where are the zookeeper logs located?

---

<div class="post-metadata">

**Author:** ![mmuehlbeyer](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.confluent.io/mmuehlbeyer/32/1088_2.png) [@mmuehlbeyer](https://forum.confluent.io/u/mmuehlbeyer)\
**Post date:** [27 January 2022 18:43 UTC](https://forum.confluent.io/t/help-getting-poc-working-control-center-wont-connect-to-kafka/4005/13 "2022-01-27T18:43:39Z")

</div>

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](https://zookeeper.apache.org/doc/r3.4.10/zookeeperAdmin.html#sc_configuration)

---

<div class="post-metadata">

**Author:** ![mmuehlbeyer](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.confluent.io/mmuehlbeyer/32/1088_2.png) [@mmuehlbeyer](https://forum.confluent.io/u/mmuehlbeyer)\
**Post date:** [27 January 2022 18:44 UTC](https://forum.confluent.io/t/help-getting-poc-working-control-center-wont-connect-to-kafka/4005/14 "2022-01-27T18:44:25Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![pebriggs](https://avatars.discourse-cdn.com/v4/letter/p/47e85d/32.png) [@pebriggs](https://forum.confluent.io/u/pebriggs)\
**Post date:** [27 January 2022 19:15 UTC](https://forum.confluent.io/t/help-getting-poc-working-control-center-wont-connect-to-kafka/4005/15 "2022-01-27T19:15:19Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![mmuehlbeyer](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.confluent.io/mmuehlbeyer/32/1088_2.png) [@mmuehlbeyer](https://forum.confluent.io/u/mmuehlbeyer)\
**Post date:** [27 January 2022 19:17 UTC](https://forum.confluent.io/t/help-getting-poc-working-control-center-wont-connect-to-kafka/4005/16 "2022-01-27T19:17:24Z")

</div>

ok so one step further I think 😉

what does netstat say?

anything in the logfiles for control center?

---

<div class="post-metadata">

**Author:** ![pebriggs](https://avatars.discourse-cdn.com/v4/letter/p/47e85d/32.png) [@pebriggs](https://forum.confluent.io/u/pebriggs)\
**Post date:** [27 January 2022 19:21 UTC](https://forum.confluent.io/t/help-getting-poc-working-control-center-wont-connect-to-kafka/4005/17 "2022-01-27T19:21:28Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![mmuehlbeyer](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.confluent.io/mmuehlbeyer/32/1088_2.png) [@mmuehlbeyer](https://forum.confluent.io/u/mmuehlbeyer)\
**Post date:** [27 January 2022 19:23 UTC](https://forum.confluent.io/t/help-getting-poc-working-control-center-wont-connect-to-kafka/4005/18 "2022-01-27T19:23:15Z")

</div>

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

what about iptables/firewalld anything in place?

---

<div class="post-metadata">

**Author:** ![pebriggs](https://avatars.discourse-cdn.com/v4/letter/p/47e85d/32.png) [@pebriggs](https://forum.confluent.io/u/pebriggs)\
**Post date:** [27 January 2022 19:41 UTC](https://forum.confluent.io/t/help-getting-poc-working-control-center-wont-connect-to-kafka/4005/19 "2022-01-27T19:41:33Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![mmuehlbeyer](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.confluent.io/mmuehlbeyer/32/1088_2.png) [@mmuehlbeyer](https://forum.confluent.io/u/mmuehlbeyer)\
**Post date:** [27 January 2022 19:45 UTC](https://forum.confluent.io/t/help-getting-poc-working-control-center-wont-connect-to-kafka/4005/20 "2022-01-27T19:45:44Z")

</div>

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)

---

<div class="post-metadata">

**Author:** ![pebriggs](https://avatars.discourse-cdn.com/v4/letter/p/47e85d/32.png) [@pebriggs](https://forum.confluent.io/u/pebriggs)\
**Post date:** [27 January 2022 22:20 UTC](https://forum.confluent.io/t/help-getting-poc-working-control-center-wont-connect-to-kafka/4005/21 "2022-01-27T22:20:20Z")

</div>

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…

[Next page](https://forum.confluent.io/t/help-getting-poc-working-control-center-wont-connect-to-kafka/4005.md?page=2)
