'Failed to construct kafka producer: No resolvable bootstrap urls given in bootstrap.servers (Intermittent issue)

I am getting intermittent issues while accessing the kafka service from the Kubernetes pod.

org.apache.kafka.common.KafkaException: Failed to construct kafka producer
    at org.apache.kafka.clients.producer.KafkaProducer.<init>(KafkaProducer.java:432)
    at org.apache.kafka.clients.producer.KafkaProducer.<init>(KafkaProducer.java:298)
    at oracle.fs.framework.core.transports.event.kafka.KafkaFactory.createProducer(KafkaFactory.java:29)
    at oracle.fs.framework.core.transports.event.kafka.stream.KafkaStreamEventTransport.start(KafkaStreamEventTransport.java:165)
    at oracle.fs.framework.core.service.TransportLifecycleHandler.start(TransportLifecycleHandler.java:57)
    at oracle.fs.framework.core.service.AbstractService.start(AbstractService.java:400)
    at oracle.fs.foundation.bootstrap.Bootstrap.startDomain(Bootstrap.java:555)
    at oracle.fs.foundation.bootstrap.Bootstrap.startDomain(Bootstrap.java:188)
    at oracle.fs.foundation.bootstrap.Bootstrap.startDomain(Bootstrap.java:147)
    at oracle.fs.foundation.bootstrap.Bootstrap.startDomain(Bootstrap.java:102)
    at oracle.fs.service.driver.DomainServiceDriver.startService(DomainServiceDriver.java:24)
    at oracle.fs.service.driver.DomainServiceDriver.main(DomainServiceDriver.java:19)
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:88)
    at org.apache.kafka.clients.ClientUtils.parseAndValidateAddresses(ClientUtils.java:47)
    at org.apache.kafka.clients.producer.KafkaProducer.<init>(KafkaProducer.java:407)

I am not sure which causes this issue intermittently as I've found the bootstrap urls are correct.



Solution 1:[1]

Its the Format of spring.kafka.bootstrap-servers=port:9092 sample: spring.kafka.bootstrap-servers=localhost:9092 or spring.kafka.bootstrap-servers=127.0.0.1:9092, etc

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1