public class JmxmpAgent
extends java.lang.Object
Listens on 11099 unless overridden by system property brooklyn.jmxmp.port.
Use the usual com.sun.management.jmxremote.ssl to enable both SSL _and_ authentication (setting brooklyn.jmxmp.ssl.authenticate false if you need to disable authentication for some reason); unless you disable client-side server authentication you will need to supply brooklyn.jmxmp.ssl.keyStore, and similarly unless server-side client auth is off you'll need the corresponding trustStore (both pointing to files on the local file system).
Service comes up on: service:jmx:jmxmp://${HOSTNAME}:${PORT}
If RMI_REGISTRY_PORT_PROPERTY
is also set, this agent will start a normal JMX/RMI server bound to
all interfaces, which is contactable on: service:jmx:rmi:///jndi/rmi://${HOSTNAME}:${RMI_REGISTRY_PORT}/jmxrmi
NB: To use JConsole with this endpoing, you need the jmxremote_optional JAR, and the following command (even more complicated if using SSL): java -classpath $JAVA_HOME/lib/jconsole.jar:$HOME/.m2/repository/javax/management/jmxremote_optional/1.0.1_04/jmxremote_optional-1.0.1_04.jar sun.tools.jconsole.JConsole
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
AUTHENTICATE_CLIENTS_PROPERTY
whether to use SSL (TLS) certificates to authenticate the client;
requires a truststore to be set, and requires
USE_SSL_PROPERTY true
(different to 'com.sun.management.jmxremote.authenticate' because something else
insists on intercepting that and uses it for passwords);
defaults to true iff USE_SSL_PROPERTY is set because
who wouldn't want client authentication if you're encrypting the link |
static java.lang.String |
JMX_SERVER_ADDRESS_WILDCARD_PROPERTY
whether JMX should bind to all interfaces
|
static int |
JMXMP_DEFAULT_PORT |
static java.lang.String |
JMXMP_KEYSTORE_FILE_PROPERTY |
static java.lang.String |
JMXMP_KEYSTORE_KEY_PASSWORD_PROPERTY |
static java.lang.String |
JMXMP_KEYSTORE_PASSWORD_PROPERTY |
static java.lang.String |
JMXMP_KEYSTORE_TYPE_PROPERTY |
static java.lang.String |
JMXMP_PORT_PROPERTY
port to listen on; default to
JMXMP_DEFAULT_PORT |
static java.lang.String |
JMXMP_TRUSTSTORE_FILE_PROPERTY |
static java.lang.String |
JMXMP_TRUSTSTORE_PASSWORD_PROPERTY |
static java.lang.String |
JMXMP_TRUSTSTORE_TYPE_PROPERTY |
static java.lang.String |
RMI_HOSTNAME_PROPERTY
hostname to advertise, and if "jmx.remote.server.address.wildcard" is false also the hostname/interface to bind to
|
static java.lang.String |
RMI_REGISTRY_PORT_PROPERTY
optional port for RMI registry to listen on; if not supplied, RMI is disabled.
|
static java.lang.String |
TLS_JMX_REMOTE_PROFILES |
static java.lang.String |
TLS_NEED_AUTHENTICATE_CLIENTS_PROPERTY |
static java.lang.String |
TLS_SOCKET_FACTORY_PROPERTY |
static java.lang.String |
TLS_WANT_AUTHENTICATE_CLIENTS_PROPERTY |
static java.lang.String |
USE_SSL_PROPERTY
whether to use SSL (TLS) encryption; requires a keystore to be set
|
Constructor and Description |
---|
JmxmpAgent() |
Modifier and Type | Method and Description |
---|---|
static void |
agentmain(java.lang.String agentArgs) |
static void |
doMain(java.lang.String agentArgs) |
static void |
doMainForeground(java.lang.String agentArgs) |
static java.lang.String |
getLocalhostHostname(java.util.Properties properties) |
static void |
main(java.lang.String[] args) |
static javax.net.ssl.TrustManager |
newInspectAllTrustManager(javax.net.ssl.X509TrustManager delegate) |
static void |
premain(java.lang.String agentArgs) |
void |
setSslEnvFromProperties(java.util.Map<java.lang.String,java.lang.Object> env,
java.util.Properties properties) |
java.util.List<javax.management.remote.JMXConnectorServer> |
startConnectors(java.util.Properties properties) |
javax.management.remote.JMXConnectorServer |
startJmxmpConnector(java.util.Properties properties) |
javax.management.remote.JMXConnectorServer |
startNormalJmxRmiConnectorIfRequested(java.util.Properties properties)
optionally starts a normal JMXRMI connector in addition
|
public static final java.lang.String JMXMP_PORT_PROPERTY
JMXMP_DEFAULT_PORT
public static final java.lang.String RMI_HOSTNAME_PROPERTY
public static final java.lang.String JMX_SERVER_ADDRESS_WILDCARD_PROPERTY
public static final java.lang.String RMI_REGISTRY_PORT_PROPERTY
public static final java.lang.String USE_SSL_PROPERTY
public static final java.lang.String AUTHENTICATE_CLIENTS_PROPERTY
USE_SSL_PROPERTY
true
(different to 'com.sun.management.jmxremote.authenticate' because something else
insists on intercepting that and uses it for passwords);
defaults to true iff USE_SSL_PROPERTY
is set because
who wouldn't want client authentication if you're encrypting the linkpublic static final java.lang.String JMXMP_KEYSTORE_FILE_PROPERTY
public static final java.lang.String JMXMP_KEYSTORE_PASSWORD_PROPERTY
public static final java.lang.String JMXMP_KEYSTORE_KEY_PASSWORD_PROPERTY
public static final java.lang.String JMXMP_KEYSTORE_TYPE_PROPERTY
public static final java.lang.String JMXMP_TRUSTSTORE_FILE_PROPERTY
public static final java.lang.String JMXMP_TRUSTSTORE_PASSWORD_PROPERTY
public static final java.lang.String JMXMP_TRUSTSTORE_TYPE_PROPERTY
public static final java.lang.String TLS_NEED_AUTHENTICATE_CLIENTS_PROPERTY
public static final java.lang.String TLS_WANT_AUTHENTICATE_CLIENTS_PROPERTY
public static final java.lang.String TLS_SOCKET_FACTORY_PROPERTY
public static final java.lang.String TLS_JMX_REMOTE_PROFILES
public static final int JMXMP_DEFAULT_PORT
public static void premain(java.lang.String agentArgs)
public static void agentmain(java.lang.String agentArgs)
public static void doMain(java.lang.String agentArgs)
public static void doMainForeground(java.lang.String agentArgs)
public java.util.List<javax.management.remote.JMXConnectorServer> startConnectors(java.util.Properties properties)
public javax.management.remote.JMXConnectorServer startJmxmpConnector(java.util.Properties properties)
public javax.management.remote.JMXConnectorServer startNormalJmxRmiConnectorIfRequested(java.util.Properties properties)
public static java.lang.String getLocalhostHostname(java.util.Properties properties) throws java.net.UnknownHostException
java.net.UnknownHostException
public void setSslEnvFromProperties(java.util.Map<java.lang.String,java.lang.Object> env, java.util.Properties properties) throws java.lang.Exception
java.lang.Exception
public static final javax.net.ssl.TrustManager newInspectAllTrustManager(javax.net.ssl.X509TrustManager delegate)
public static void main(java.lang.String[] args)