After setting up VPC peering, I tried connecting to MSK serverless via the Kafka Client,but the error is coming as address is not resolvable
./kafka-topics.sh --list --bootstrap-server boot-xxxxxx.x3.kafka-serverless.ap-southeast-1.amazonaws.com:9098 --command-config client.properties
[2023-07-17 05:09:43,153] WARN Couldn't resolve server boot-xxxxxx.x3.kafka-serverless.ap-southeast-1.amazonaws.com:9098 from bootstrap.servers as DNS resolution failed for boot-pkzowg6y.c3.kafka-serverless.ap-southeast-1.amazonaws.com (org.apache.kafka.clients.ClientUtils)
Exception in thread "main" org.apache.kafka.common.KafkaException: Failed to create new KafkaAdminClient
at org.apache.kafka.clients.admin.KafkaAdminClient.createInternal(KafkaAdminClient.java:540)
at org.apache.kafka.clients.admin.Admin.create(Admin.java:134)
at kafka.admin.TopicCommand$AdminClientTopicService$.createAdminClient(TopicCommand.scala:229)
at kafka.admin.TopicCommand$AdminClientTopicService$.apply(TopicCommand.scala:233)
at kafka.admin.TopicCommand$.main(TopicCommand.scala:58)
at kafka.admin.TopicCommand.main(TopicCommand.scala)
Caused by: org.apache.kafka.common.config.ConfigException: No resolvable bootstrap urls given in bootstrap.servers
at org.apache.kafka.clients.ClientUtils.parseAndValidateAddresses(ClientUtils.java:89)
at org.apache.kafka.clients.ClientUtils.parseAndValidateAddresses(ClientUtils.java:48)
at org.apache.kafka.clients.admin.KafkaAdminClient.createInternal(KafkaAdminClient.java:494)
... 5 more
I have verified the working of VPC peering.
- what can be wrong here ?
- Is it possible to connect to MSK serverless offering outside VPC ? if yes, how can it be done.
Thanks.
yes, they both are enabled, I checked similar stuff for "Provisioned" MSK and that works