I am running the confluent kafka containers, one for kraft and one for a broker. The containers are ran in podman and use network ‘host’. I need to use the JMX interface to monitor stats, for this i have enabled JMX using KAFKA_JMX_OPTS, as below:
How are you configuring kafka in the containers? e.g., do you have a Docker Compose file? I’m wondering what listeners you have configured (KAFKA_LISTENERS / KAFKA_ADVERTISED_LISTENERS environment variables)
Very likely it’s JMX-related, either RMI or there’s also a port for local connections. Check this and this out for further reading and ways to configure those ports. Bear in mind that the image you’re using includes Java 11, so any post-Java 11 features wouldn’t be doable out of the box. If you really needed those features you might attempt upgrading java in the image (*ymmv).
thanks. Interesting that confluent recommend Java 17 but build containers using ubi8 (java 11) and not ubi8/openjdk-17. I suspect the port is the local jmx port which i dont think can be changed or disabled in java 11 ;(.