public class JmxmpAgent extends 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 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 String |
JMX_SERVER_ADDRESS_WILDCARD_PROPERTY
whether JMX should bind to all interfaces
|
static int |
JMXMP_DEFAULT_PORT |
static String |
JMXMP_KEYSTORE_FILE_PROPERTY |
static String |
JMXMP_KEYSTORE_KEY_PASSWORD_PROPERTY |
static String |
JMXMP_KEYSTORE_PASSWORD_PROPERTY |
static String |
JMXMP_KEYSTORE_TYPE_PROPERTY |
static String |
JMXMP_PORT_PROPERTY
port to listen on; default to
JMXMP_DEFAULT_PORT |
static String |
JMXMP_TRUSTSTORE_FILE_PROPERTY |
static String |
JMXMP_TRUSTSTORE_PASSWORD_PROPERTY |
static String |
JMXMP_TRUSTSTORE_TYPE_PROPERTY |
static String |
RMI_HOSTNAME_PROPERTY
hostname to advertise, and if "jmx.remote.server.address.wildcard" is false also the hostname/interface to bind to
|
static String |
RMI_REGISTRY_PORT_PROPERTY
optional port for RMI registry to listen on; if not supplied, RMI is disabled.
|
static String |
TLS_JMX_REMOTE_PROFILES |
static String |
TLS_NEED_AUTHENTICATE_CLIENTS_PROPERTY |
static String |
TLS_SOCKET_FACTORY_PROPERTY |
static String |
TLS_WANT_AUTHENTICATE_CLIENTS_PROPERTY |
static 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(String agentArgs) |
static void |
doMain(String agentArgs) |
static void |
doMainForeground(String agentArgs) |
static String |
getLocalhostHostname(Properties properties) |
static void |
main(String[] args) |
static TrustManager |
newInspectAllTrustManager(X509TrustManager delegate) |
static void |
premain(String agentArgs) |
void |
setSslEnvFromProperties(Map<String,Object> env,
Properties properties) |
List<JMXConnectorServer> |
startConnectors(Properties properties) |
JMXConnectorServer |
startJmxmpConnector(Properties properties) |
JMXConnectorServer |
startNormalJmxRmiConnectorIfRequested(Properties properties)
optionally starts a normal JMXRMI connector in addition
|
public static final String JMXMP_PORT_PROPERTY
JMXMP_DEFAULT_PORTpublic static final String RMI_HOSTNAME_PROPERTY
public static final String JMX_SERVER_ADDRESS_WILDCARD_PROPERTY
public static final String RMI_REGISTRY_PORT_PROPERTY
public static final String USE_SSL_PROPERTY
public static final 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 String JMXMP_KEYSTORE_FILE_PROPERTY
public static final String JMXMP_KEYSTORE_PASSWORD_PROPERTY
public static final String JMXMP_KEYSTORE_KEY_PASSWORD_PROPERTY
public static final String JMXMP_KEYSTORE_TYPE_PROPERTY
public static final String JMXMP_TRUSTSTORE_FILE_PROPERTY
public static final String JMXMP_TRUSTSTORE_PASSWORD_PROPERTY
public static final String JMXMP_TRUSTSTORE_TYPE_PROPERTY
public static final String TLS_NEED_AUTHENTICATE_CLIENTS_PROPERTY
public static final String TLS_WANT_AUTHENTICATE_CLIENTS_PROPERTY
public static final String TLS_SOCKET_FACTORY_PROPERTY
public static final String TLS_JMX_REMOTE_PROFILES
public static final int JMXMP_DEFAULT_PORT
public static void premain(String agentArgs)
public static void agentmain(String agentArgs)
public static void doMain(String agentArgs)
public static void doMainForeground(String agentArgs)
public List<JMXConnectorServer> startConnectors(Properties properties)
public JMXConnectorServer startJmxmpConnector(Properties properties)
public JMXConnectorServer startNormalJmxRmiConnectorIfRequested(Properties properties)
public static String getLocalhostHostname(Properties properties) throws UnknownHostException
UnknownHostExceptionpublic void setSslEnvFromProperties(Map<String,Object> env, Properties properties) throws Exception
Exceptionpublic static final TrustManager newInspectAllTrustManager(X509TrustManager delegate)
public static void main(String[] args)
Copyright © 2012–2017 The Apache Software Foundation. All rights reserved.