欢迎来到尧图网

客户服务 关于我们

您的位置:首页 > 汽车 > 时评 > 11.kafka开启jmx

11.kafka开启jmx

2025/2/7 9:38:14 来源:https://blog.csdn.net/z19861216/article/details/144189827  浏览:    关键词:11.kafka开启jmx

方式一:

1.进入/opt/kafka_2.13-3.3.2/bin目录

命令:

cd /opt/kafka_2.13-3.3.2/bin

[root@rhel77 ~]# cd /opt/kafka_2.13-3.3.2/bin
[root@rhel77 bin]# pwd
/opt/kafka_2.13-3.3.2/bin
[root@rhel77 bin]# 

2.备份kafka-run-class.sh

命令:

cp  kafka-run-class.sh kafka-run-class.sh.bak.20241202

[root@rhel77 bin]# cp  kafka-run-class.sh kafka-run-class.sh.bak.20241202
[root@rhel77 bin]# 
[root@rhel77 bin]# ls -l kafka-run-class.sh.*
-rwxr-xr-x 1 root root 10881 Dec  2 19:47 kafka-run-class.sh.bak.20241202
[root@rhel77 bin]# ls -l kafka-run-class.sh
-rwxr-xr-x 1 root root 10938 Dec  2 19:52 kafka-run-class.sh
[root@rhel77 bin]# 

3.编辑kafka-run-class.sh,添加如下内容,并保存

->某些服务器可能无法正确绑定ip,这时候我们需要显示指定绑定的host(ip/hostname.hostname 要做好映射关系):

按需

-Djava.rmi.server.hostname=192.1

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com