知识库

配置远程 JMX 监控

为了启用 JMX 远程监控,请在 Neo4j 3.1.x 版本的 neo4j.conf 文件中编辑并取消注释以下行

dbms.jvm.additional=-Dcom.sun.management.jmxremote.port=3637
dbms.jvm.additional=-Dcom.sun.management.jmxremote.authenticate=true
dbms.jvm.additional=-Dcom.sun.management.jmxremote.password.file=conf/jmx.password
dbms.jvm.additional=-Dcom.sun.management.jmxremote.access.file=conf/jmx.access

取消注释上述行后,重启 neo4j。如果 neo4j 进程未启动,请查看 logs/neo4j.log 文件以查找错误。

如果您看到以下错误之一

Error: Password file not found: conf/jmx.password

Error: Access file not found: conf/jmx.access

这意味着 neo4j 无法找到 jmx.password 和/或 jmx.access 文件。为了解决此问题,您需要指定这些文件的完整路径,如下所示

dbms.jvm.additional=-Dcom.sun.management.jmxremote.password.file=$NEO4J_HOME/conf/jmx.password
dbms.jvm.additional=-Dcom.sun.management.jmxremote.access.file=$NEO4J_HOME/conf/jmx.access

进行上述更改后,重启 neo4j 并验证数据库是否已上线。

© . All rights reserved.