Database Reference
In-Depth Information
JConsole in remote mode
JMX also provides the option of connecting to the remote Java process or Neo4j instance
and viewing the various JMX beans. Perform the following steps to view JMX beans and
JConsole in remote mode in Linux OS. For windows, change the forward slash / to a back-
ward slash \, and rest of the steps remain the same:
1. Open
<$NEO4J_HOME>/conf/neo4j-wrapper.conf
and enable the fol-
lowing properties:
wrapper.java.additional=-|Dcom.sun.management.jmxremote.port=3637
wrapper.java.additional=-Dcom.sun.management.jmxremote.authenticate=true
wrapper.java.additional=-Dcom.sun.management.jmxremote.ssl=false
wrapper.java.additional=-Dcom.sun.management.jmxremote.password.file=conf/
jmx.password
wrapper.java.additional=-Dcom.sun.management.jmxremote.access.file=conf/
jmx.access
All the preceding properties define the configuration of JMX beans such as com-
munication port, username and password files, and so on.
2. Next we need to modify the username/password for connecting the JMX server re-
motely. Open
<$NEO4J_HOME>/conf/jmx.access
and uncomment the line
control readwrite
. Uncommenting this line will enable the admin role for
the JMX beans and you can modify and invoke the operations exposed by Neo4j
JMX beans.
3. Now we will add the username and password in
jmx.password
. Open
<$NEO4J_HOME>/conf/jmx.password
and at the end of file enter
con-
trol <space><password>
like
control Sumit
, where the first word is
the username and the second word is the password. The username should match
with the entry made in the
jmx.access
file.
4. We also need to make sure that the permissions for
conf/jmx.password
are
0600
in Linux. Open the console and execute
sudo chmod 0600 conf/
jmx.password
in Linux, and For windows, follow instructions given at
ht-
5. In your Linux console, execute
<$JAVA_HOME>/bin/jconsole
and select
Remote Process
, and in the textbox enter
localhost:3637
, username as
con-
trol
, and password as
Sumit
.