confluentinc / cp-ansible

Ansible playbooks for the Confluent Platform
Apache License 2.0
37 stars 406 forks source link

Control center fails to connect to brokers #131

Closed KyleKotowick closed 5 years ago

KyleKotowick commented 5 years ago

I'm using a default configuration with the PLAINTEXT template, changing nothing but the host IP addresses in the inventory. After installing, Kafka and Zookeeper work fine, able to create topics. Control center, however, fails miserably, showing the following error in control-center.log:

 ERROR [main] Broker check failed. Ensure that Kafka is running on any of the hosts: [10.3.1.3:9092, 10.3.1.5:9092, 10.3.1.4:9092] (io.confluent.controlcenter.KafkaHelper)

And the following error in control-center-kafka.log:

[2019-08-21 21:17:38,252] WARN [kafka-admin-client-thread | adminclient-1] [AdminClient clientId=adminclient-1] Connection to node 1 (CENTOS-7/10.3.1.6:9092) could not be established. Broker may not be available. (org.apache.kafka.clients.NetworkClient)

[2019-08-21 21:17:38,453] WARN [kafka-admin-client-thread | adminclient-1] [AdminClient clientId=adminclient-1] Connection to node 3 (CENTOS-7/10.3.1.6:9092) could not be established. Broker may not be available. (org.apache.kafka.clients.NetworkClient)

[2019-08-21 21:17:38,854] WARN [kafka-admin-client-thread | adminclient-1] [AdminClient clientId=adminclient-1] Connection to node 2 (CENTOS-7/10.3.1.6:9092) could not be established. Broker may not be available. (org.apache.kafka.clients.NetworkClient)

What's really weird here, is it's seems to be trying to connect to all three brokers at 10.3.1.6? But, that IP is not specified in the list of Kafka broker hosts, and it certainly shouldn't be the same for all three brokers.

Installing on CentOS 7, firewalls all disabled. I cannot figure out why control center can't connect to the brokers.

This is the hosts file:

all:
  vars:
    ansible_connection: ssh
    ansible_become: true
    security_mode: plaintext
    ansible_ssh_user: myusername
preflight:
  hosts:
    10.3.1.3:
    10.3.1.4:
    10.3.1.5:
    10.3.1.6:
ssl_CA:
  hosts:
    10.3.1.3:
zookeeper:
  hosts:
    10.3.1.3:
    10.3.1.4:
    10.3.1.5:
broker:
  hosts:
    10.3.1.3:
      kafka:
        broker:
          id: 1
    10.3.1.4:
      kafka:
        broker:
          id: 2
    10.3.1.5:
      kafka:
        broker:
          id: 3
schema-registry:
  hosts:
    10.3.1.3:
control-center:
  hosts:
    10.3.1.6:
      confluent:
        control:
          center:
            config:
              confluent.controlcenter.connect.cluster: 10.3.1.3:8083
connect-distributed:
  hosts:
    10.3.1.3:
kafka-rest:
  hosts:
    10.3.1.3:
ksql:
  hosts:
    10.3.1.4:
JumaX commented 5 years ago

@kkotowick What version of the playbooks are you running? Based on having the 'pre-flight' role, I suspect this is an older unsupported version. Do you see the same issue with the 5.3.0-post branch?

JumaX commented 5 years ago

@kkotowick because I haven't heard back from you in some time on this, I am going to go ahead and close it out.