ZooKeeper JMX enabled by default 怎么解决
To disable JMX in ZooKeeper, you can follow these steps:
- Open the
zoo.cfgfile in a text editor. - Find the
admin.enableServerproperty and set it tofalse. This will disable the JMX server. - Save the file and restart ZooKeeper for the changes to take effect.
Alternatively, you can also disable JMX by setting the JAVA_OPTS environment variable before starting ZooKeeper. Add the following line to your shell startup script (e.g., .bashrc or .bash_profile):
export JAVA_OPTS="-Dcom.sun.management.jmxremote=false"
After setting the environment variable, restart ZooKeeper.
Note that these steps will disable JMX for the entire ZooKeeper instance. If you want to enable or disable JMX for specific components or applications, you may need to modify the respective configuration files or startup scripts.
原文地址: https://www.cveoy.top/t/topic/h5hT 著作权归作者所有。请勿转载和采集!