How to Remote Manage » History » Revision 3
Revision 2 (Henning Blohm, 16.02.2020 22:17) → Revision 3/7 (Henning Blohm, 16.02.2020 22:21)
h1. How to Remote Manage A significant amount of internal state and operations of a z2 system can be accessed via JMX using tools such as jconsole. In order to access z2 via JMX some JMX related configuration should be applied. h2. Configuring JMX access in Z2 h2. Accessing a Java VM remotely via JMX It should not be necessary, but unfortunately, as JMX in based on RMI, accessing to a Java VM via JMX remotely can be non-trivial. Here are two practical approaches: h3. Accessing a Remote JVM via JMX directly TBC h3. Accessing a Remote JVM via JMX via an SSH tunnel protected, localhost only, no user name required TBC h2. Remote Synchronization and Log Streaming Starting with version 2.8, Z2 offers a built-in command line utility to synchronize (with log output) and provide streaming access to the z2 home log. When in Z2_HOME/bin run: <pre><code class="bash"> java -cp z.jar com.zfabrik.launch.Manage -? </code></pre> for the usage: <pre><code class="bash"> SYNOPSIS java -cp z.jar Manage <command> <options> COMMANDS sync The sync performs a synchronization of a running (remote) z2 Home. showlog Continuously stream the z2 Home log of a running z2 Home to the current stderr. OPTIONS -url <url> JMX URL identifying the target z2 Home. Defaults to service:jmx:rmi:///jndi/rmi://localhost:7777/jmxrmi The URL may be shortened to <host>:<port> (e.g. localhost:7777) -user <username> Username used for JMX authentication. Optional. -pass <password> Password used for JMX authentication. Optional. Mandatory when a username has been set -b <n> Number of lines to read before current (if available) when running showlog. EXAMPLE java -cp z.jar com.zfabrik.launch.Manage showlog -url host:7777 -user admin -pass admin </code></pre>