geode-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Juan José Ramos Cassella (JIRA) <>
Subject [jira] [Created] (GEODE-3292) Embedded PULSE Connection Failure When jmx-manager-bind-address != localhost
Date Tue, 25 Jul 2017 14:15:00 GMT
Juan José Ramos Cassella created GEODE-3292:

             Summary: Embedded PULSE Connection Failure When jmx-manager-bind-address != localhost
                 Key: GEODE-3292
             Project: Geode
          Issue Type: Bug
          Components: pulse
            Reporter: Juan José Ramos Cassella

The PULSE webApp (embedded mode) fails to connect to the jmx-manager when a non-default {{jmx-manager-bind-address}}
is configured. The app tries to connect by default to {{service:jmx:rmi://localhost/jndi/rmi://localhost:17991/jmxrmi}}
whenever it detects it's running in embedded mode, instead of getting the local hostname through
{{InetAddress.getLocalHost().getCanonicalHostName()}} as it used to do before.
The problem was introduced by [GEODE-2927|],
commit [0f978a6df711d04e0c7c1926fb1e297d07c21aa3|;h=0f978a6].

Steps to reproduce:
$ export JAVA_ARGS="-Dgfsh.log-level=config -Dgfsh.log-dir=$(pwd)"

$ gfsh start locator --name=locator1 --force=true --connect=false \
	--J=-Dpulse.Log-Level=debug --J=-Dpulse.Log-File-Name=pulse.log --J=-Dpulse.Log-FileLocation=$(pwd)
    --J=-Dgemfire.jmx-manager=true --J=-Dgemfire.jmx-manager-start=true --J=-Dgemfire.jmx-manager-port=17991
    --J=-Dgemfire.jmx-manager-bind-address=$(ipconfig getifaddr en0)

$ gfsh start pulse

At this point, and after a successful login to PULSE, the application doesn't show any cluster
data and the exception can be seen (both in the logs and in the PULSE screen).
The easiest solution would be to revert back some lines of the changes made by commit [0f978a6df711d04e0c7c1926fb1e297d07c21aa3|;h=0f978a6],
as follows:

  public void contextInitialized(ServletContextEvent event) {

    boolean sysIsEmbedded = Boolean.getBoolean(PulseConstants.SYSTEM_PROPERTY_PULSE_EMBEDDED);

    if (sysIsEmbedded) {
      // jmx connection parameters"LOG_MSG_APP_RUNNING_EMBEDDED_MODE"));

  	  String sysPulseHost;
      try {
        // Get host name of machine running pulse in embedded mode
        sysPulseHost = InetAddress.getLocalHost().getCanonicalHostName();
      } catch (Exception e) {
        logger.debug(resourceBundle.getString("LOG_MSG_JMX_CONNECTION_UNKNOWN_HOST"), e);
        // Set default host name
        sysPulseHost = PulseConstants.GEMFIRE_DEFAULT_HOST;



      // SSL, all the other system properties are already set in the embedded VM


I can make the changes and submit a PR if someone assigns me this ticket.

This message was sent by Atlassian JIRA

View raw message