Error trying to connect to confluent cloud topic

In trying to connect to a kafka topic in confluent cloud using a Golang client I receive the following error:

GroupCoordinator: b0-pkc-4nym6.us-east-1.aws.confluent.cloud:9092: Failed to resolve ‘b0-pkc-4nym6.us-east-1.aws.confluent.cloud:9092’: nodename nor servname provided, or not known (after 1ms in state CONNECT)

A DNS lookup on both the bootstrap server and the server in the error are both successful so the machine I am running this from finds them.

hey @scott.mullins.pluto

did you try to telnet the broker and check if a connection is successful?

did you try the go client develeoped by confluent?
https://docs.confluent.io/kafka-clients/go/current/overview.html

best,
michael

I am already using the confluent kafka client.

I haven’t tried telnet but I don’t know what that would show me that “dig” doesn’t.

❯ dig b0-pkc-4nym6.us-east-1.aws.confluent.cloud

; <<>> DiG 9.10.6 <<>> b0-pkc-4nym6.us-east-1.aws.confluent.cloud

;; global options: +cmd

;; Got answer:

;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 62366

;; flags: qr rd ra; QUERY: 1, ANSWER: 3, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:

; EDNS: version: 0, flags:; udp: 1232

;; QUESTION SECTION:

;b0-pkc-4nym6.us-east-1.aws.confluent.cloud. IN A

;; ANSWER SECTION:

b0-pkc-4nym6.us-east-1.aws.confluent.cloud. 9 IN A 54.205.44.89

b0-pkc-4nym6.us-east-1.aws.confluent.cloud. 9 IN A 3.232.233.245

b0-pkc-4nym6.us-east-1.aws.confluent.cloud. 9 IN A 52.3.21.250

;; Query time: 34 msec

;; SERVER: 10.253.0.1#53(10.253.0.1)

;; WHEN: Tue Jul 05 14:21:32 PDT 2022

;; MSG SIZE rcvd: 245

ok understand
telnet would should if a connection to the port is successful.
dig will show the dns resolution.

best,
michael

From the same machine the confluent CLI works perfectly well to consume and produce messages from this same cluster, so it’s not an obvious networking issue.

ok I see
how does you configuration look like?

best,
michael

Config below. I have since verified that the same setup, network, configuration, etc. works perfectly well with a different cluster.

bootstrap.servers=.confluent.cloud:9092
security.protocol=SASL_SSL
sasl.mechanisms=PLAIN
sasl.username=< CLUSTER API KEY >
sasl.password=< CLUSTER API SECRET >