geode-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (GEODE-3292) Embedded PULSE Connection Failure When jmx-manager-bind-address != localhost
Date Fri, 28 Jul 2017 09:59:00 GMT

    [ https://issues.apache.org/jira/browse/GEODE-3292?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16104742#comment-16104742
] 

ASF GitHub Bot commented on GEODE-3292:
---------------------------------------

GitHub user jujoramos opened a pull request:

    https://github.com/apache/geode/pull/664

    Fix for GEODE-3292

    Embedded PULSE Connection Failure When jmx-manager-bind-address != localhost
    
    - ManagementAgent sets the 'pulse.host' system property whenever a 'jmx-manager-bind-address'
is configured.
    - PULSE gets the hostname of the local JMX Manager through the 'pulse.host' system property,
reverting to 'localhost' by default.
    
    Thank you for submitting a contribution to Apache Geode.
    
    In order to streamline the review of the contribution we ask you
    to ensure the following steps have been taken:
    
    ### For all changes:
    - [X] Is there a JIRA ticket associated with this PR? Is it referenced in the commit message?
    
    - [X] Has your PR been rebased against the latest commit within the target branch (typically
`develop`)?
    
    - [X] Is your initial contribution a single, squashed commit?
    
    - [X] Does `gradlew build` run cleanly?
    
    - [X] Have you written or updated unit tests to verify your changes?
    
    - [ ] If adding new dependencies to the code, are these dependencies licensed in a way
that is compatible for inclusion under [ASF 2.0](http://www.apache.org/legal/resolved.html#category-a)?
    
    ### Note:
    Please ensure that once the PR is submitted, you check travis-ci for build issues and
    submit an update to your PR as soon as possible. If you need help, please send an
    email to dev@geode.apache.org.


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/jujoramos/geode feature/GEODE-3292

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/geode/pull/664.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #664
    
----
commit 0c3e15f619ddd08f02ba8e2a8818f22d308c8bde
Author: Juan Jose Ramos Cassella <jujoramos@gmail.com>
Date:   2017-07-28T09:55:20Z

    GEODE-3292: Embedded PULSE Connection Failure When jmx-manager-bind-address != localhost
    
    - ManagementAgent sets the 'pulse.host' system property whenever a 'jmx-manager-bind-address'
is configured.
    - PULSE gets the hostname of the local JMX Manager through the 'pulse.host' system property,
reverting to 'localhost' by default.

----


> Embedded PULSE Connection Failure When jmx-manager-bind-address != localhost
> ----------------------------------------------------------------------------
>
>                 Key: GEODE-3292
>                 URL: https://issues.apache.org/jira/browse/GEODE-3292
>             Project: Geode
>          Issue Type: Bug
>          Components: pulse
>            Reporter: Juan José Ramos Cassella
>            Assignee: Juan José Ramos Cassella
>            Priority: Minor
>
> 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|https://issues.apache.org/jira/browse/GEODE-2927],
commit [0f978a6df711d04e0c7c1926fb1e297d07c21aa3|https://git-wip-us.apache.org/repos/asf?p=geode.git;h=0f978a6].
> Steps to reproduce:
> {code:none}
> $ 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
> {code}
> 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|https://git-wip-us.apache.org/repos/asf?p=geode.git;h=0f978a6],
as follows:
> {code:title=PulseAppListener.java|borderStyle=solid}
> @Override
>   public void contextInitialized(ServletContextEvent event) {
>   	(...)
>     boolean sysIsEmbedded = Boolean.getBoolean(PulseConstants.SYSTEM_PROPERTY_PULSE_EMBEDDED);
>     if (sysIsEmbedded) {
>       // jmx connection parameters
>       logger.info(resourceBundle.getString("LOG_MSG_APP_RUNNING_EMBEDDED_MODE"));
>       repository.setJmxUseLocator(false);
>       //----------------------------------------------------------------------------------------
>   	  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;
>       }
>       repository.setHost(sysPulseHost);
>       //----------------------------------------------------------------------------------------
>       repository.setPort(System.getProperty(PulseConstants.SYSTEM_PROPERTY_PULSE_PORT,
>           PulseConstants.GEMFIRE_DEFAULT_PORT));
>       // SSL, all the other system properties are already set in the embedded VM
>       repository.setUseSSLManager(
>           Boolean.valueOf(System.getProperty(PulseConstants.SYSTEM_PROPERTY_PULSE_USESSL_MANAGER)));
>       repository.setUseSSLLocator(
>           Boolean.valueOf(System.getProperty(PulseConstants.SYSTEM_PROPERTY_PULSE_USESSL_LOCATOR)));
> 	(...)
>   }
> {code}
> I can make the changes and submit a PR if someone assigns me this ticket.
> Cheers.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message