This article is a mirror article of machine translation, please click here to jump to the original article.

View: 14627|Reply: 3

Kafka configures JMX remote monitoring

[Copy link]
Posted on 2021-6-25 10:47:09 | | | |
When using the kafka-eagle panel, the application will get some metric data from JMX, and if the JMX configuration is not enabled, it will report the following error:



2021-06-25 10:16:06 INFO  [KafkaZKPoolUtils.Thread-393] - Release pool,and available size [32]
2021-06-25 10:16:08 ERROR [Mx4jServiceImpl.Thread-398] - JMX service url[192.168.1.182:-1] create has error,msg is java.io.IOException cannot be cast to javax.management.remote.JMXConnector
java.lang.ClassCastException: java.io.IOException cannot be cast to javax.management.remote.JMXConnector2021-06-25 10:16:08 ERROR [Mx4jServiceImpl.Thread-401] - JMX service url[192.168.1.182:-1] create has error,msg is java.io.IOException cannot be cast to javax.management.remote.JMXConnector

[2021-06-25 09:36:02] Mx4jServiceImpl.Thread-55 - ERROR - Get topic size from jmx has error, msg is java.io.IOException cannot be cast to javax.management.remote.JMXConnector
[2021-06-25 09:36:02] Mx4jServiceImpl.Thread-62 - ERROR - JMX service url[192.168.1.182:-1] create has error,msg is java.io.IOException cannot be cast to javax.management.remote.JMXConnector
How does Kafka enable JMX?

Java JMX is simple to understand and use
https://www.itsvse.com/thread-9967-1-1.html


For example, in the Windows version, open the kafka-server-start.bat script and add the following configuration on the first line:

After the modification is completed, you can obtain some metric information through JMX normally, as shown in the figure below:







Previous:Java JMX is simple to understand and use
Next:CentOS 7 installs the Node exporter
 Landlord| Posted on 2021-7-8 09:57:58 |
Linux setup

 Landlord| Posted on 2021-12-24 11:25:05 |
JMX configuration, and the Linux environment can also directly modify the kafka-server-start.sh file, as follows:

 Landlord| Posted on 2021-12-24 11:27:24 |
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com