confluentinc / cp-docker-images

[DEPRECATED] Docker images for Confluent Platform.
Apache License 2.0
1.14k stars 704 forks source link

What is the extra random port in kafka and how to set it to bind to localhost? #789

Open johnzhanghua opened 5 years ago

johnzhanghua commented 5 years ago

This happens on host and docker images, besides the famous 9092:9093 port, there is another dynamic port that kafka listens to.

I am using the /usr/local/kafka/bin/kafka-server-start.sh to run kafka.

ps -ef |grep kafka |grep -v grep |awk '{print $2}' 15580

netstat -tnpl |grep 15580 (Not all processes could be identified, non-owned process info will not be shown, you would have to be root to see it all.) *tcp6 0 0 :::37023 ::: LISTEN 15580/java*
tcp6 0 0 192.168.64.18:9092 :::
LISTEN 15580/java
tcp6 0 0 192.168.64.18:9093 :::* LISTEN 15580/java

What is the port "37023" above? how to disable it? Can it be bind to "localhost" ?