知识库

配置远程 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 并确认数据库已上线。

© . This site is unofficial and not affiliated with Neo4j, Inc.