Skip to content

Unable to connect to confluent cloud #1479

@sivasini

Description

@sivasini

Description

I am trying to connect to confluent cloud hosted in Azure and consume the messages but on running the python code it give me the below error which I am unable to gauge.

2022-12-12 11:37:16,249 ERROR FAIL [python-example-consumer#consumer-1] [thrd:sasl_ssl://<NAME>.eastus.azure.confluent.cloud:9093/bootstra]: sasl_ssl://<NAME>.eastus.azure.confluent.cloud:9093/bootstrap: Connect to ipv4#20.XXX.XXX.XXX:9093 failed: Unknown error (after 21236ms in state CONNECT, 2 identical error(s) suppressed)

How do I check out the identical errors that are suppressed?

These are my configurations for consumer:

conf = {
        'bootstrap.servers': '<NAME>.eastus.azure.confluent.cloud:9093',
        'security.protocol': 'SASL_SSL',
        'sasl.mechanism': 'PLAIN',
        'sasl.username': client_key,
        'sasl.password': client_secret, 
        'group.id': 'consumer1',
        'client.id': 'python-example-consumer',
        'session.timeout.ms': 60000,
        'default.topic.config': {'auto.offset.reset': 'smallest'}
    }

Testing out with confluent-kafka=1.9.2

How to reproduce

c = Consumer(conf)
c.subscribe([topic])
try:
        while True:
            msg = c.poll(timeout=200.0)
            if msg is None:
                continue
            if msg.error():
                # Error or event
                if msg.error().code() == KafkaError._PARTITION_EOF:
                    # End of partition event
                    sys.stderr.write('%% %s [%d] reached end at offset %d\n' %
                                     (msg.topic(), msg.partition(), msg.offset()))
                else:
                    # Error
                    raise KafkaException(msg.error())
            else:
                print(msg.value())
                
    except KeyboardInterrupt:
        print('\nAborted by user\n')
    finally:
        c.close()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy