How to Remote Manage » History » Revision 3
« Previous |
Revision 3/7
(diff)
| Next »
Henning Blohm, 16.02.2020 22:21
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.
Configuring JMX access in Z2¶
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:
Accessing a Remote JVM via JMX directly¶
TBC
Accessing a Remote JVM via JMX via an SSH tunnel¶
protected, localhost only, no user name required
TBC
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:
java -cp z.jar com.zfabrik.launch.Manage -?
for the usage:
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
Updated by Henning Blohm almost 5 years ago · 3 revisions