You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@geode.apache.org by Vahram Aharonyan <va...@vmware.com> on 2017/02/22 08:09:33 UTC

NullPointerException during SystemManagementService.startManager

Hi All,

We are getting java.lang.NullPointerException while trying to start JMX Manager Node by invoking ManagementService.startManager:

org.apache.geode.management.ManagementException: java.lang.NullPointerException
        at org.apache.geode.management.internal.FederatingManager.startManager(FederatingManager.java:139)
        at org.apache.geode.management.internal.SystemManagementService.startManager(SystemManagementService.java:467)
Caused by: java.lang.NullPointerException
        at org.apache.geode.management.internal.MemberMessenger.broadcastManagerInfo(MemberMessenger.java:64)
        at org.apache.geode.management.internal.FederatingManager.startManager(FederatingManager.java:132)
        ... 45 more

This seems to be due to MBeanJMXAdapter. localGemFireMBean being empty by that point.

Please note that before startManager call from Java code gemfire locator was successfully started, cache was created, necessary Regions were created using this configuration:

                        .set("jmx-manager", "true")
                        .set("jmx-manager-start", "false")

Could you please let us know whether we miss something in configuration or anything else need to be performed before starting JMX manager Node dynamically?

Thanks,
Vahram.


RE: NullPointerException during SystemManagementService.startManager

Posted by Vahram Aharonyan <va...@vmware.com>.
Hi Jinmei,

It seems we have been able to solve this issue. The issue was related to absence of jopt-simple jar in classpath. By mistake we omitted that one. So adding of it to classpath solved the issue.
Thank you very much for your time and support.

Thanks,
Vahram.

From: Jinmei Liao [mailto:jiliao@pivotal.io]
Sent: Tuesday, March 7, 2017 1:59 AM
To: user@geode.apache.org
Subject: Re: NullPointerException during SystemManagementService.startManager

Hi, I don't think your ssl setting is the reason you are getting the NPE, but it would be a good idea to change to the new scheme for ssl configurations.

The line you are getting the NPE Is this line:
String levelName = jmxAdapter.getDistributedSystemMXBean().getAlertLevel();

I believe at this point the getDistributedSystemMXBean returns null probably the system mBean is not created yet. It might be that manually calling a startManager is not a supported usage.

Can you provide the configuration/process you are using Geode? And we start deciding whether we should fire a JIRA ticket for this or not. Thanks!

On Mon, Mar 6, 2017 at 8:39 AM, Vahram Aharonyan <va...@vmware.com>> wrote:
One more note here…
We are using old scheme for SSL configuration based on attributes like cluster-ssl-enabled, cluster-ssl-require-authentication, etc . Could it cause some problems on JMX manager?

And here are parameters we set for JXM itself in locator.properties:

jmx-manager=true
jmx-manager-start=true
jmx-manager-port=1099
jmx-manager-password-file=…
jmx-manager-access-file=…
jmx-manager-ssl-ciphers=TLS_RSA_WITH_AES_128_GCM_SHA256
jmx-manager-ssl-protocols=TLSv1.2
jmx-manager-ssl-require-authentication=true
jmx-manager-ssl-keystore-type=jks
jmx-manager-ssl-keystore=…
jmx-manager-ssl-keystore-password=…
jmx-manager-ssl-truststore=…
jmx-manager-ssl-truststore-password=...

We also tried to set jmx-manager-ssl-enabled=true but that does not help as well.

Thanks,
Vahram.

From: Vahram Aharonyan
Sent: Friday, March 3, 2017 10:27 AM
To: user@geode.apache.org<ma...@geode.apache.org>
Subject: RE: NullPointerException during SystemManagementService.startManager

Hi Jinmei,

Could it be you have had a chance to look at this ?

Thanks,
Vahram.

From: Vahram Aharonyan [mailto:vaharonyan@vmware.com]
Sent: Thursday, February 23, 2017 9:34 PM
To: user@geode.apache.org<ma...@geode.apache.org>
Subject: RE: NullPointerException during SystemManagementService.startManager

Yes, I don’t get NPE because I replaced startManager() calling with jmx-manager-true option setting.
If we go down startManager routine() following stacktrace below it does something like jmxAdapter.getDistributedSystemMXBean().getAlertLevel(). And as jmxAdapter.getDistributedSystemMXBean() returns null, we get that NPE.

Thank you, Jinmei. If you will be able to provide some details it would be very helpful.

Regards,
Vahram.

From: Jinmei Liao [mailto:jiliao@pivotal.io]
Sent: Thursday, February 23, 2017 9:05 PM
To: user@geode.apache.org<ma...@geode.apache.org>
Subject: Re: NullPointerException during SystemManagementService.startManager

Ok, so after you set jmx-manager-start=true, you don't get this this NPE anymore?

I am not very familiar with the code path you mentioned since it's been there for a long time and haven't been changed recently. Will investigate more if this is a blocking issue for you.

On Thu, Feb 23, 2017 at 8:48 AM, Vahram Aharonyan <va...@vmware.com>> wrote:
Hi Jinmei,

Actually we are trying to have some control over this and have opportunity to stopManager if needed.

Anyways, this is not so principal at the moment and I followed your hint, removed starManager calling and passed “jmx-manager-start=true” to both gemfire.locator.properties and Cache creation routine. Afterwards I observe that any call like managementService.getDistributedSystemMXBean() returns null, as MBeanJMXAdapter. localGemFireMBean is again empty.

So with in Geode MBeanJMXAdapter. localGemFireMBean somehow is not getting filled after cache creation… And actually this was the cause of NullPointerException in startManager as well. From Geode code I see that only items are put into this Map only from MBeanJMXAdapter.registerMBean() method. But I guess this flow should be executed after cache creation while Regions are created, nodes connected, etc., is not it?
Or should I take care of this separately?

Thanks,
Vahram

From: Jinmei Liao [mailto:jiliao@pivotal.io<ma...@pivotal.io>]
Sent: Wednesday, February 22, 2017 12:58 PM

To: user@geode.apache.org<ma...@geode.apache.org>
Subject: Re: NullPointerException during SystemManagementService.startManager

Can you let us know the use case where you need to configure the locator with .set("jmx-manager-start", "false") and then call ManagementService.startManager manually?

On Wed, Feb 22, 2017 at 9:51 AM, Vahram Aharonyan <va...@vmware.com>> wrote:
Hi Anthony,

Currently I’m using Geode 1.1.0 released last week, but actually saw this problem previously with geode-1.0.0-incubating.M3 as well.
BTW, I have not hit this issue with gemfire 8.2.0.6 used before that.

Thanks,
Vahram.

From: Anthony Baker [mailto:abaker@pivotal.io<ma...@pivotal.io>]
Sent: Wednesday, February 22, 2017 8:41 AM
To: user@geode.apache.org<ma...@geode.apache.org>
Subject: Re: NullPointerException during SystemManagementService.startManager

What version of Geode are you using?

On Feb 22, 2017, at 12:09 AM, Vahram Aharonyan <va...@vmware.com>> wrote:

Hi All,

We are getting java.lang.NullPointerException while trying to start JMX Manager Node by invoking ManagementService.startManager:

org.apache.geode.management.ManagementException: java.lang.NullPointerException
        at org.apache.geode.management.internal.FederatingManager.startManager(FederatingManager.java:139)
        at org.apache.geode.management.internal.SystemManagementService.startManager(SystemManagementService.java:467)
Caused by: java.lang.NullPointerException
        at org.apache.geode.management.internal.MemberMessenger.broadcastManagerInfo(MemberMessenger.java:64)
        at org.apache.geode.management.internal.FederatingManager.startManager(FederatingManager.java:132)
        ... 45 more

This seems to be due to MBeanJMXAdapter. localGemFireMBean being empty by that point.

Please note that before startManager call from Java code gemfire locator was successfully started, cache was created, necessary Regions were created using this configuration:

                        .set("jmx-manager", "true")
                        .set("jmx-manager-start", "false")

Could you please let us know whether we miss something in configuration or anything else need to be performed before starting JMX manager Node dynamically?

Thanks,
Vahram.




--
Cheers

Jinmei



--
Cheers

Jinmei



--
Cheers

Jinmei

Re: NullPointerException during SystemManagementService.startManager

Posted by Jinmei Liao <ji...@pivotal.io>.
Hi, I don't think your ssl setting is the reason you are getting the NPE,
but it would be a good idea to change to the new scheme for ssl
configurations.

The line you are getting the NPE Is this line:
String levelName = jmxAdapter.getDistributedSystemMXBean().getAlertLevel();

I believe at this point the getDistributedSystemMXBean returns null
probably the system mBean is not created yet. It might be that manually
calling a startManager is not a supported usage.

Can you provide the configuration/process you are using Geode? And we start
deciding whether we should fire a JIRA ticket for this or not. Thanks!

On Mon, Mar 6, 2017 at 8:39 AM, Vahram Aharonyan <va...@vmware.com>
wrote:

> One more note here…
>
> We are using old scheme for SSL configuration based on attributes like
> cluster-ssl-enabled, cluster-ssl-require-authentication, etc . Could it
> cause some problems on JMX manager?
>
>
>
> And here are parameters we set for JXM itself in locator.properties:
>
>
>
> jmx-manager=true
>
> jmx-manager-start=true
>
> jmx-manager-port=1099
>
> jmx-manager-password-file=…
>
> jmx-manager-access-file=…
>
> jmx-manager-ssl-ciphers=TLS_RSA_WITH_AES_128_GCM_SHA256
>
> jmx-manager-ssl-protocols=TLSv1.2
>
> jmx-manager-ssl-require-authentication=true
>
> jmx-manager-ssl-keystore-type=jks
>
> jmx-manager-ssl-keystore=…
>
> jmx-manager-ssl-keystore-password=…
>
> jmx-manager-ssl-truststore=…
>
> jmx-manager-ssl-truststore-password=...
>
>
>
> We also tried to set jmx-manager-ssl-enabled=true but that does not help
> as well.
>
>
>
> Thanks,
>
> Vahram.
>
>
>
> *From:* Vahram Aharonyan
> *Sent:* Friday, March 3, 2017 10:27 AM
> *To:* user@geode.apache.org
> *Subject:* RE: NullPointerException during SystemManagementService.
> startManager
>
>
>
> Hi Jinmei,
>
>
>
> Could it be you have had a chance to look at this ?
>
>
>
> Thanks,
>
> Vahram.
>
>
>
> *From:* Vahram Aharonyan [mailto:vaharonyan@vmware.com
> <va...@vmware.com>]
> *Sent:* Thursday, February 23, 2017 9:34 PM
> *To:* user@geode.apache.org
> *Subject:* RE: NullPointerException during SystemManagementService.
> startManager
>
>
>
> Yes, I don’t get NPE because I replaced startManager() calling with
> jmx-manager-true option setting.
>
> If we go down startManager routine() following stacktrace below it does
> something like *jmxAdapter*.getDistributedSystemMXBean().getAlertLevel().
> And as *jmxAdapter*.getDistributedSystemMXBean() returns null, we get
> that NPE.
>
>
>
> Thank you, Jinmei. If you will be able to provide some details it would be
> very helpful.
>
>
>
> Regards,
>
> Vahram.
>
>
>
> *From:* Jinmei Liao [mailto:jiliao@pivotal.io <ji...@pivotal.io>]
> *Sent:* Thursday, February 23, 2017 9:05 PM
> *To:* user@geode.apache.org
> *Subject:* Re: NullPointerException during SystemManagementService.
> startManager
>
>
>
> Ok, so after you set jmx-manager-start=true, you don't get this this NPE
> anymore?
>
>
>
> I am not very familiar with the code path you mentioned since it's been
> there for a long time and haven't been changed recently. Will investigate
> more if this is a blocking issue for you.
>
>
>
> On Thu, Feb 23, 2017 at 8:48 AM, Vahram Aharonyan <va...@vmware.com>
> wrote:
>
> Hi Jinmei,
>
>
>
> Actually we are trying to have some control over this and have opportunity
> to stopManager if needed.
>
>
>
> Anyways, this is not so principal at the moment and I followed your hint,
> removed starManager calling and passed “jmx-manager-start=true” to both
> gemfire.locator.properties and Cache creation routine. Afterwards I observe
> that any call like managementService.getDistributedSystemMXBean() returns
> null, as MBeanJMXAdapter. localGemFireMBean is again empty.
>
>
>
> So with in Geode MBeanJMXAdapter. localGemFireMBean somehow is not getting
> filled after cache creation… And actually this was the cause of
> NullPointerException in startManager as well. From Geode code I see that
> only items are put into this Map only from MBeanJMXAdapter.registerMBean()
> method. But I guess this flow should be executed after cache creation while
> Regions are created, nodes connected, etc., is not it?
>
> Or should I take care of this separately?
>
>
>
> Thanks,
>
> Vahram
>
>
>
> *From:* Jinmei Liao [mailto:jiliao@pivotal.io]
> *Sent:* Wednesday, February 22, 2017 12:58 PM
>
>
> *To:* user@geode.apache.org
> *Subject:* Re: NullPointerException during SystemManagementService.
> startManager
>
>
>
> Can you let us know the use case where you need to configure the locator
> with .set("jmx-manager-start", "false") and then call
> ManagementService.startManager manually?
>
>
>
> On Wed, Feb 22, 2017 at 9:51 AM, Vahram Aharonyan <va...@vmware.com>
> wrote:
>
> Hi Anthony,
>
>
>
> Currently I’m using Geode 1.1.0 released last week, but actually saw this
> problem previously with geode-1.0.0-incubating.M3 as well.
>
> BTW, I have not hit this issue with gemfire 8.2.0.6 used before that.
>
>
>
> Thanks,
>
> Vahram.
>
>
>
> *From:* Anthony Baker [mailto:abaker@pivotal.io]
> *Sent:* Wednesday, February 22, 2017 8:41 AM
> *To:* user@geode.apache.org
> *Subject:* Re: NullPointerException during SystemManagementService.
> startManager
>
>
>
> What version of Geode are you using?
>
>
>
> On Feb 22, 2017, at 12:09 AM, Vahram Aharonyan <va...@vmware.com>
> wrote:
>
>
>
> Hi All,
>
>
>
> We are getting java.lang.NullPointerException while trying to start JMX
> Manager Node by invoking ManagementService.startManager:
>
>
>
> org.apache.geode.management.ManagementException:
> java.lang.NullPointerException
>
>         at org.apache.geode.management.internal.FederatingManager.
> startManager(FederatingManager.java:139)
>
>         at org.apache.geode.management.internal.SystemManagementService.
> startManager(SystemManagementService.java:467)
>
> Caused by: java.lang.NullPointerException
>
>         at org.apache.geode.management.internal.MemberMessenger.
> broadcastManagerInfo(MemberMessenger.java:64)
>
>         at org.apache.geode.management.internal.FederatingManager.
> startManager(FederatingManager.java:132)
>
>         ... 45 more
>
>
>
> This seems to be due to MBeanJMXAdapter. localGemFireMBean being empty by
> that point.
>
>
>
> Please note that before startManager call from Java code gemfire locator
> was successfully started, cache was created, necessary Regions were created
> using this configuration:
>
>
>
>                         .set("jmx-manager", "true")
>
>                         .set("jmx-manager-start", "false")
>
>
>
> Could you please let us know whether we miss something in configuration or
> anything else need to be performed before starting JMX manager Node
> dynamically?
>
>
>
> Thanks,
>
> Vahram.
>
>
>
>
>
>
>
> --
>
> Cheers
>
>
>
> Jinmei
>
>
>
>
>
> --
>
> Cheers
>
>
>
> Jinmei
>



-- 
Cheers

Jinmei

RE: NullPointerException during SystemManagementService.startManager

Posted by Vahram Aharonyan <va...@vmware.com>.
One more note here…
We are using old scheme for SSL configuration based on attributes like cluster-ssl-enabled, cluster-ssl-require-authentication, etc . Could it cause some problems on JMX manager?

And here are parameters we set for JXM itself in locator.properties:

jmx-manager=true
jmx-manager-start=true
jmx-manager-port=1099
jmx-manager-password-file=…
jmx-manager-access-file=…
jmx-manager-ssl-ciphers=TLS_RSA_WITH_AES_128_GCM_SHA256
jmx-manager-ssl-protocols=TLSv1.2
jmx-manager-ssl-require-authentication=true
jmx-manager-ssl-keystore-type=jks
jmx-manager-ssl-keystore=…
jmx-manager-ssl-keystore-password=…
jmx-manager-ssl-truststore=…
jmx-manager-ssl-truststore-password=...

We also tried to set jmx-manager-ssl-enabled=true but that does not help as well.

Thanks,
Vahram.

From: Vahram Aharonyan
Sent: Friday, March 3, 2017 10:27 AM
To: user@geode.apache.org
Subject: RE: NullPointerException during SystemManagementService.startManager

Hi Jinmei,

Could it be you have had a chance to look at this ?

Thanks,
Vahram.

From: Vahram Aharonyan [mailto:vaharonyan@vmware.com]
Sent: Thursday, February 23, 2017 9:34 PM
To: user@geode.apache.org<ma...@geode.apache.org>
Subject: RE: NullPointerException during SystemManagementService.startManager

Yes, I don’t get NPE because I replaced startManager() calling with jmx-manager-true option setting.
If we go down startManager routine() following stacktrace below it does something like jmxAdapter.getDistributedSystemMXBean().getAlertLevel(). And as jmxAdapter.getDistributedSystemMXBean() returns null, we get that NPE.

Thank you, Jinmei. If you will be able to provide some details it would be very helpful.

Regards,
Vahram.

From: Jinmei Liao [mailto:jiliao@pivotal.io]
Sent: Thursday, February 23, 2017 9:05 PM
To: user@geode.apache.org<ma...@geode.apache.org>
Subject: Re: NullPointerException during SystemManagementService.startManager

Ok, so after you set jmx-manager-start=true, you don't get this this NPE anymore?

I am not very familiar with the code path you mentioned since it's been there for a long time and haven't been changed recently. Will investigate more if this is a blocking issue for you.

On Thu, Feb 23, 2017 at 8:48 AM, Vahram Aharonyan <va...@vmware.com>> wrote:
Hi Jinmei,

Actually we are trying to have some control over this and have opportunity to stopManager if needed.

Anyways, this is not so principal at the moment and I followed your hint, removed starManager calling and passed “jmx-manager-start=true” to both gemfire.locator.properties and Cache creation routine. Afterwards I observe that any call like managementService.getDistributedSystemMXBean() returns null, as MBeanJMXAdapter. localGemFireMBean is again empty.

So with in Geode MBeanJMXAdapter. localGemFireMBean somehow is not getting filled after cache creation… And actually this was the cause of NullPointerException in startManager as well. From Geode code I see that only items are put into this Map only from MBeanJMXAdapter.registerMBean() method. But I guess this flow should be executed after cache creation while Regions are created, nodes connected, etc., is not it?
Or should I take care of this separately?

Thanks,
Vahram

From: Jinmei Liao [mailto:jiliao@pivotal.io<ma...@pivotal.io>]
Sent: Wednesday, February 22, 2017 12:58 PM

To: user@geode.apache.org<ma...@geode.apache.org>
Subject: Re: NullPointerException during SystemManagementService.startManager

Can you let us know the use case where you need to configure the locator with .set("jmx-manager-start", "false") and then call ManagementService.startManager manually?

On Wed, Feb 22, 2017 at 9:51 AM, Vahram Aharonyan <va...@vmware.com>> wrote:
Hi Anthony,

Currently I’m using Geode 1.1.0 released last week, but actually saw this problem previously with geode-1.0.0-incubating.M3 as well.
BTW, I have not hit this issue with gemfire 8.2.0.6 used before that.

Thanks,
Vahram.

From: Anthony Baker [mailto:abaker@pivotal.io<ma...@pivotal.io>]
Sent: Wednesday, February 22, 2017 8:41 AM
To: user@geode.apache.org<ma...@geode.apache.org>
Subject: Re: NullPointerException during SystemManagementService.startManager

What version of Geode are you using?

On Feb 22, 2017, at 12:09 AM, Vahram Aharonyan <va...@vmware.com>> wrote:

Hi All,

We are getting java.lang.NullPointerException while trying to start JMX Manager Node by invoking ManagementService.startManager:

org.apache.geode.management.ManagementException: java.lang.NullPointerException
        at org.apache.geode.management.internal.FederatingManager.startManager(FederatingManager.java:139)
        at org.apache.geode.management.internal.SystemManagementService.startManager(SystemManagementService.java:467)
Caused by: java.lang.NullPointerException
        at org.apache.geode.management.internal.MemberMessenger.broadcastManagerInfo(MemberMessenger.java:64)
        at org.apache.geode.management.internal.FederatingManager.startManager(FederatingManager.java:132)
        ... 45 more

This seems to be due to MBeanJMXAdapter. localGemFireMBean being empty by that point.

Please note that before startManager call from Java code gemfire locator was successfully started, cache was created, necessary Regions were created using this configuration:

                        .set("jmx-manager", "true")
                        .set("jmx-manager-start", "false")

Could you please let us know whether we miss something in configuration or anything else need to be performed before starting JMX manager Node dynamically?

Thanks,
Vahram.




--
Cheers

Jinmei



--
Cheers

Jinmei

RE: NullPointerException during SystemManagementService.startManager

Posted by Vahram Aharonyan <va...@vmware.com>.
Hi Jinmei,

Could it be you have had a chance to look at this ?

Thanks,
Vahram.

From: Vahram Aharonyan [mailto:vaharonyan@vmware.com]
Sent: Thursday, February 23, 2017 9:34 PM
To: user@geode.apache.org
Subject: RE: NullPointerException during SystemManagementService.startManager

Yes, I don’t get NPE because I replaced startManager() calling with jmx-manager-true option setting.
If we go down startManager routine() following stacktrace below it does something like jmxAdapter.getDistributedSystemMXBean().getAlertLevel(). And as jmxAdapter.getDistributedSystemMXBean() returns null, we get that NPE.

Thank you, Jinmei. If you will be able to provide some details it would be very helpful.

Regards,
Vahram.

From: Jinmei Liao [mailto:jiliao@pivotal.io]
Sent: Thursday, February 23, 2017 9:05 PM
To: user@geode.apache.org<ma...@geode.apache.org>
Subject: Re: NullPointerException during SystemManagementService.startManager

Ok, so after you set jmx-manager-start=true, you don't get this this NPE anymore?

I am not very familiar with the code path you mentioned since it's been there for a long time and haven't been changed recently. Will investigate more if this is a blocking issue for you.

On Thu, Feb 23, 2017 at 8:48 AM, Vahram Aharonyan <va...@vmware.com>> wrote:
Hi Jinmei,

Actually we are trying to have some control over this and have opportunity to stopManager if needed.

Anyways, this is not so principal at the moment and I followed your hint, removed starManager calling and passed “jmx-manager-start=true” to both gemfire.locator.properties and Cache creation routine. Afterwards I observe that any call like managementService.getDistributedSystemMXBean() returns null, as MBeanJMXAdapter. localGemFireMBean is again empty.

So with in Geode MBeanJMXAdapter. localGemFireMBean somehow is not getting filled after cache creation… And actually this was the cause of NullPointerException in startManager as well. From Geode code I see that only items are put into this Map only from MBeanJMXAdapter.registerMBean() method. But I guess this flow should be executed after cache creation while Regions are created, nodes connected, etc., is not it?
Or should I take care of this separately?

Thanks,
Vahram

From: Jinmei Liao [mailto:jiliao@pivotal.io<ma...@pivotal.io>]
Sent: Wednesday, February 22, 2017 12:58 PM

To: user@geode.apache.org<ma...@geode.apache.org>
Subject: Re: NullPointerException during SystemManagementService.startManager

Can you let us know the use case where you need to configure the locator with .set("jmx-manager-start", "false") and then call ManagementService.startManager manually?

On Wed, Feb 22, 2017 at 9:51 AM, Vahram Aharonyan <va...@vmware.com>> wrote:
Hi Anthony,

Currently I’m using Geode 1.1.0 released last week, but actually saw this problem previously with geode-1.0.0-incubating.M3 as well.
BTW, I have not hit this issue with gemfire 8.2.0.6 used before that.

Thanks,
Vahram.

From: Anthony Baker [mailto:abaker@pivotal.io<ma...@pivotal.io>]
Sent: Wednesday, February 22, 2017 8:41 AM
To: user@geode.apache.org<ma...@geode.apache.org>
Subject: Re: NullPointerException during SystemManagementService.startManager

What version of Geode are you using?

On Feb 22, 2017, at 12:09 AM, Vahram Aharonyan <va...@vmware.com>> wrote:

Hi All,

We are getting java.lang.NullPointerException while trying to start JMX Manager Node by invoking ManagementService.startManager:

org.apache.geode.management.ManagementException: java.lang.NullPointerException
        at org.apache.geode.management.internal.FederatingManager.startManager(FederatingManager.java:139)
        at org.apache.geode.management.internal.SystemManagementService.startManager(SystemManagementService.java:467)
Caused by: java.lang.NullPointerException
        at org.apache.geode.management.internal.MemberMessenger.broadcastManagerInfo(MemberMessenger.java:64)
        at org.apache.geode.management.internal.FederatingManager.startManager(FederatingManager.java:132)
        ... 45 more

This seems to be due to MBeanJMXAdapter. localGemFireMBean being empty by that point.

Please note that before startManager call from Java code gemfire locator was successfully started, cache was created, necessary Regions were created using this configuration:

                        .set("jmx-manager", "true")
                        .set("jmx-manager-start", "false")

Could you please let us know whether we miss something in configuration or anything else need to be performed before starting JMX manager Node dynamically?

Thanks,
Vahram.




--
Cheers

Jinmei



--
Cheers

Jinmei

RE: NullPointerException during SystemManagementService.startManager

Posted by Vahram Aharonyan <va...@vmware.com>.
Yes, I don’t get NPE because I replaced startManager() calling with jmx-manager-true option setting.
If we go down startManager routine() following stacktrace below it does something like jmxAdapter.getDistributedSystemMXBean().getAlertLevel(). And as jmxAdapter.getDistributedSystemMXBean() returns null, we get that NPE.

Thank you, Jinmei. If you will be able to provide some details it would be very helpful.

Regards,
Vahram.

From: Jinmei Liao [mailto:jiliao@pivotal.io]
Sent: Thursday, February 23, 2017 9:05 PM
To: user@geode.apache.org
Subject: Re: NullPointerException during SystemManagementService.startManager

Ok, so after you set jmx-manager-start=true, you don't get this this NPE anymore?

I am not very familiar with the code path you mentioned since it's been there for a long time and haven't been changed recently. Will investigate more if this is a blocking issue for you.

On Thu, Feb 23, 2017 at 8:48 AM, Vahram Aharonyan <va...@vmware.com>> wrote:
Hi Jinmei,

Actually we are trying to have some control over this and have opportunity to stopManager if needed.

Anyways, this is not so principal at the moment and I followed your hint, removed starManager calling and passed “jmx-manager-start=true” to both gemfire.locator.properties and Cache creation routine. Afterwards I observe that any call like managementService.getDistributedSystemMXBean() returns null, as MBeanJMXAdapter. localGemFireMBean is again empty.

So with in Geode MBeanJMXAdapter. localGemFireMBean somehow is not getting filled after cache creation… And actually this was the cause of NullPointerException in startManager as well. From Geode code I see that only items are put into this Map only from MBeanJMXAdapter.registerMBean() method. But I guess this flow should be executed after cache creation while Regions are created, nodes connected, etc., is not it?
Or should I take care of this separately?

Thanks,
Vahram

From: Jinmei Liao [mailto:jiliao@pivotal.io<ma...@pivotal.io>]
Sent: Wednesday, February 22, 2017 12:58 PM

To: user@geode.apache.org<ma...@geode.apache.org>
Subject: Re: NullPointerException during SystemManagementService.startManager

Can you let us know the use case where you need to configure the locator with .set("jmx-manager-start", "false") and then call ManagementService.startManager manually?

On Wed, Feb 22, 2017 at 9:51 AM, Vahram Aharonyan <va...@vmware.com>> wrote:
Hi Anthony,

Currently I’m using Geode 1.1.0 released last week, but actually saw this problem previously with geode-1.0.0-incubating.M3 as well.
BTW, I have not hit this issue with gemfire 8.2.0.6 used before that.

Thanks,
Vahram.

From: Anthony Baker [mailto:abaker@pivotal.io<ma...@pivotal.io>]
Sent: Wednesday, February 22, 2017 8:41 AM
To: user@geode.apache.org<ma...@geode.apache.org>
Subject: Re: NullPointerException during SystemManagementService.startManager

What version of Geode are you using?

On Feb 22, 2017, at 12:09 AM, Vahram Aharonyan <va...@vmware.com>> wrote:

Hi All,

We are getting java.lang.NullPointerException while trying to start JMX Manager Node by invoking ManagementService.startManager:

org.apache.geode.management.ManagementException: java.lang.NullPointerException
        at org.apache.geode.management.internal.FederatingManager.startManager(FederatingManager.java:139)
        at org.apache.geode.management.internal.SystemManagementService.startManager(SystemManagementService.java:467)
Caused by: java.lang.NullPointerException
        at org.apache.geode.management.internal.MemberMessenger.broadcastManagerInfo(MemberMessenger.java:64)
        at org.apache.geode.management.internal.FederatingManager.startManager(FederatingManager.java:132)
        ... 45 more

This seems to be due to MBeanJMXAdapter. localGemFireMBean being empty by that point.

Please note that before startManager call from Java code gemfire locator was successfully started, cache was created, necessary Regions were created using this configuration:

                        .set("jmx-manager", "true")
                        .set("jmx-manager-start", "false")

Could you please let us know whether we miss something in configuration or anything else need to be performed before starting JMX manager Node dynamically?

Thanks,
Vahram.




--
Cheers

Jinmei



--
Cheers

Jinmei

Re: NullPointerException during SystemManagementService.startManager

Posted by Jinmei Liao <ji...@pivotal.io>.
Ok, so after you set jmx-manager-start=true, you don't get this this NPE
anymore?

I am not very familiar with the code path you mentioned since it's been
there for a long time and haven't been changed recently. Will investigate
more if this is a blocking issue for you.

On Thu, Feb 23, 2017 at 8:48 AM, Vahram Aharonyan <va...@vmware.com>
wrote:

> Hi Jinmei,
>
>
>
> Actually we are trying to have some control over this and have opportunity
> to stopManager if needed.
>
>
>
> Anyways, this is not so principal at the moment and I followed your hint,
> removed starManager calling and passed “jmx-manager-start=true” to both
> gemfire.locator.properties and Cache creation routine. Afterwards I observe
> that any call like managementService.getDistributedSystemMXBean() returns
> null, as MBeanJMXAdapter. localGemFireMBean is again empty.
>
>
>
> So with in Geode MBeanJMXAdapter. localGemFireMBean somehow is not getting
> filled after cache creation… And actually this was the cause of
> NullPointerException in startManager as well. From Geode code I see that
> only items are put into this Map only from MBeanJMXAdapter.registerMBean()
> method. But I guess this flow should be executed after cache creation while
> Regions are created, nodes connected, etc., is not it?
>
> Or should I take care of this separately?
>
>
>
> Thanks,
>
> Vahram
>
>
>
> *From:* Jinmei Liao [mailto:jiliao@pivotal.io]
> *Sent:* Wednesday, February 22, 2017 12:58 PM
>
> *To:* user@geode.apache.org
> *Subject:* Re: NullPointerException during SystemManagementService.
> startManager
>
>
>
> Can you let us know the use case where you need to configure the locator
> with .set("jmx-manager-start", "false") and then call
> ManagementService.startManager manually?
>
>
>
> On Wed, Feb 22, 2017 at 9:51 AM, Vahram Aharonyan <va...@vmware.com>
> wrote:
>
> Hi Anthony,
>
>
>
> Currently I’m using Geode 1.1.0 released last week, but actually saw this
> problem previously with geode-1.0.0-incubating.M3 as well.
>
> BTW, I have not hit this issue with gemfire 8.2.0.6 used before that.
>
>
>
> Thanks,
>
> Vahram.
>
>
>
> *From:* Anthony Baker [mailto:abaker@pivotal.io]
> *Sent:* Wednesday, February 22, 2017 8:41 AM
> *To:* user@geode.apache.org
> *Subject:* Re: NullPointerException during SystemManagementService.
> startManager
>
>
>
> What version of Geode are you using?
>
>
>
> On Feb 22, 2017, at 12:09 AM, Vahram Aharonyan <va...@vmware.com>
> wrote:
>
>
>
> Hi All,
>
>
>
> We are getting java.lang.NullPointerException while trying to start JMX
> Manager Node by invoking ManagementService.startManager:
>
>
>
> org.apache.geode.management.ManagementException:
> java.lang.NullPointerException
>
>         at org.apache.geode.management.internal.FederatingManager.
> startManager(FederatingManager.java:139)
>
>         at org.apache.geode.management.internal.SystemManagementService.
> startManager(SystemManagementService.java:467)
>
> Caused by: java.lang.NullPointerException
>
>         at org.apache.geode.management.internal.MemberMessenger.
> broadcastManagerInfo(MemberMessenger.java:64)
>
>         at org.apache.geode.management.internal.FederatingManager.
> startManager(FederatingManager.java:132)
>
>         ... 45 more
>
>
>
> This seems to be due to MBeanJMXAdapter. localGemFireMBean being empty by
> that point.
>
>
>
> Please note that before startManager call from Java code gemfire locator
> was successfully started, cache was created, necessary Regions were created
> using this configuration:
>
>
>
>                         .set("jmx-manager", "true")
>
>                         .set("jmx-manager-start", "false")
>
>
>
> Could you please let us know whether we miss something in configuration or
> anything else need to be performed before starting JMX manager Node
> dynamically?
>
>
>
> Thanks,
>
> Vahram.
>
>
>
>
>
>
>
> --
>
> Cheers
>
>
>
> Jinmei
>



-- 
Cheers

Jinmei

RE: NullPointerException during SystemManagementService.startManager

Posted by Vahram Aharonyan <va...@vmware.com>.
Hi Jinmei,

Actually we are trying to have some control over this and have opportunity to stopManager if needed.

Anyways, this is not so principal at the moment and I followed your hint, removed starManager calling and passed “jmx-manager-start=true” to both gemfire.locator.properties and Cache creation routine. Afterwards I observe that any call like managementService.getDistributedSystemMXBean() returns null, as MBeanJMXAdapter. localGemFireMBean is again empty.

So with in Geode MBeanJMXAdapter. localGemFireMBean somehow is not getting filled after cache creation… And actually this was the cause of NullPointerException in startManager as well. From Geode code I see that only items are put into this Map only from MBeanJMXAdapter.registerMBean() method. But I guess this flow should be executed after cache creation while Regions are created, nodes connected, etc., is not it?
Or should I take care of this separately?

Thanks,
Vahram

From: Jinmei Liao [mailto:jiliao@pivotal.io]
Sent: Wednesday, February 22, 2017 12:58 PM
To: user@geode.apache.org
Subject: Re: NullPointerException during SystemManagementService.startManager

Can you let us know the use case where you need to configure the locator with .set("jmx-manager-start", "false") and then call ManagementService.startManager manually?

On Wed, Feb 22, 2017 at 9:51 AM, Vahram Aharonyan <va...@vmware.com>> wrote:
Hi Anthony,

Currently I’m using Geode 1.1.0 released last week, but actually saw this problem previously with geode-1.0.0-incubating.M3 as well.
BTW, I have not hit this issue with gemfire 8.2.0.6 used before that.

Thanks,
Vahram.

From: Anthony Baker [mailto:abaker@pivotal.io<ma...@pivotal.io>]
Sent: Wednesday, February 22, 2017 8:41 AM
To: user@geode.apache.org<ma...@geode.apache.org>
Subject: Re: NullPointerException during SystemManagementService.startManager

What version of Geode are you using?

On Feb 22, 2017, at 12:09 AM, Vahram Aharonyan <va...@vmware.com>> wrote:

Hi All,

We are getting java.lang.NullPointerException while trying to start JMX Manager Node by invoking ManagementService.startManager:

org.apache.geode.management.ManagementException: java.lang.NullPointerException
        at org.apache.geode.management.internal.FederatingManager.startManager(FederatingManager.java:139)
        at org.apache.geode.management.internal.SystemManagementService.startManager(SystemManagementService.java:467)
Caused by: java.lang.NullPointerException
        at org.apache.geode.management.internal.MemberMessenger.broadcastManagerInfo(MemberMessenger.java:64)
        at org.apache.geode.management.internal.FederatingManager.startManager(FederatingManager.java:132)
        ... 45 more

This seems to be due to MBeanJMXAdapter. localGemFireMBean being empty by that point.

Please note that before startManager call from Java code gemfire locator was successfully started, cache was created, necessary Regions were created using this configuration:

                        .set("jmx-manager", "true")
                        .set("jmx-manager-start", "false")

Could you please let us know whether we miss something in configuration or anything else need to be performed before starting JMX manager Node dynamically?

Thanks,
Vahram.




--
Cheers

Jinmei

Re: NullPointerException during SystemManagementService.startManager

Posted by Jinmei Liao <ji...@pivotal.io>.
Can you let us know the use case where you need to configure the locator
with .set("jmx-manager-start", "false") and then call
ManagementService.startManager manually?

On Wed, Feb 22, 2017 at 9:51 AM, Vahram Aharonyan <va...@vmware.com>
wrote:

> Hi Anthony,
>
>
>
> Currently I’m using Geode 1.1.0 released last week, but actually saw this
> problem previously with geode-1.0.0-incubating.M3 as well.
>
> BTW, I have not hit this issue with gemfire 8.2.0.6 used before that.
>
>
>
> Thanks,
>
> Vahram.
>
>
>
> *From:* Anthony Baker [mailto:abaker@pivotal.io]
> *Sent:* Wednesday, February 22, 2017 8:41 AM
> *To:* user@geode.apache.org
> *Subject:* Re: NullPointerException during SystemManagementService.
> startManager
>
>
>
> What version of Geode are you using?
>
>
>
> On Feb 22, 2017, at 12:09 AM, Vahram Aharonyan <va...@vmware.com>
> wrote:
>
>
>
> Hi All,
>
>
>
> We are getting java.lang.NullPointerException while trying to start JMX
> Manager Node by invoking ManagementService.startManager:
>
>
>
> org.apache.geode.management.ManagementException:
> java.lang.NullPointerException
>
>         at org.apache.geode.management.internal.FederatingManager.
> startManager(FederatingManager.java:139)
>
>         at org.apache.geode.management.internal.SystemManagementService.
> startManager(SystemManagementService.java:467)
>
> Caused by: java.lang.NullPointerException
>
>         at org.apache.geode.management.internal.MemberMessenger.
> broadcastManagerInfo(MemberMessenger.java:64)
>
>         at org.apache.geode.management.internal.FederatingManager.
> startManager(FederatingManager.java:132)
>
>         ... 45 more
>
>
>
> This seems to be due to MBeanJMXAdapter. localGemFireMBean being empty by
> that point.
>
>
>
> Please note that before startManager call from Java code gemfire locator
> was successfully started, cache was created, necessary Regions were created
> using this configuration:
>
>
>
>                         .set("jmx-manager", "true")
>
>                         .set("jmx-manager-start", "false")
>
>
>
> Could you please let us know whether we miss something in configuration or
> anything else need to be performed before starting JMX manager Node
> dynamically?
>
>
>
> Thanks,
>
> Vahram.
>
>
>



-- 
Cheers

Jinmei

RE: NullPointerException during SystemManagementService.startManager

Posted by Vahram Aharonyan <va...@vmware.com>.
Hi Kirk,

Yes, Cache is created on that JVM by that time and all necessary Regions are created without problem.
Here the problem seem to be due to MBeanJMXAdapter.localGemFireMBean staying empty… because as I noted in my previous mail in this thread to Jinmei, even if I remove the startManager call and try to start locator with “jmx-manager-start=true”, any call like managementService.getDistributedSystemMXBean() returns null due to this map being empty even after cache and regions creation…

Thanks,
Vahram.

From: Kirk Lund [mailto:klund@apache.org]
Sent: Wednesday, February 22, 2017 10:12 PM
To: user@geode.apache.org
Subject: Re: NullPointerException during SystemManagementService.startManager

I'm not aware of any changes in this area between GF 8.2 and Geode 1.1.

How are you invoking ManagementService.startManager()? Does the JVM in which you're invoking this already have a Cache or is the Cache still being created when you invoke startManager?

On Wed, Feb 22, 2017 at 9:51 AM, Vahram Aharonyan <va...@vmware.com>> wrote:
Hi Anthony,

Currently I’m using Geode 1.1.0 released last week, but actually saw this problem previously with geode-1.0.0-incubating.M3 as well.
BTW, I have not hit this issue with gemfire 8.2.0.6 used before that.

Thanks,
Vahram.

From: Anthony Baker [mailto:abaker@pivotal.io<ma...@pivotal.io>]
Sent: Wednesday, February 22, 2017 8:41 AM
To: user@geode.apache.org<ma...@geode.apache.org>
Subject: Re: NullPointerException during SystemManagementService.startManager

What version of Geode are you using?

On Feb 22, 2017, at 12:09 AM, Vahram Aharonyan <va...@vmware.com>> wrote:

Hi All,

We are getting java.lang.NullPointerException while trying to start JMX Manager Node by invoking ManagementService.startManager:

org.apache.geode.management.ManagementException: java.lang.NullPointerException
        at org.apache.geode.management.internal.FederatingManager.startManager(FederatingManager.java:139)
        at org.apache.geode.management.internal.SystemManagementService.startManager(SystemManagementService.java:467)
Caused by: java.lang.NullPointerException
        at org.apache.geode.management.internal.MemberMessenger.broadcastManagerInfo(MemberMessenger.java:64)
        at org.apache.geode.management.internal.FederatingManager.startManager(FederatingManager.java:132)
        ... 45 more

This seems to be due to MBeanJMXAdapter. localGemFireMBean being empty by that point.

Please note that before startManager call from Java code gemfire locator was successfully started, cache was created, necessary Regions were created using this configuration:

                        .set("jmx-manager", "true")
                        .set("jmx-manager-start", "false")

Could you please let us know whether we miss something in configuration or anything else need to be performed before starting JMX manager Node dynamically?

Thanks,
Vahram.



Re: NullPointerException during SystemManagementService.startManager

Posted by Kirk Lund <kl...@apache.org>.
I'm not aware of any changes in this area between GF 8.2 and Geode 1.1.

How are you invoking ManagementService.startManager()? Does the JVM in
which you're invoking this already have a Cache or is the Cache still being
created when you invoke startManager?

On Wed, Feb 22, 2017 at 9:51 AM, Vahram Aharonyan <va...@vmware.com>
wrote:

> Hi Anthony,
>
>
>
> Currently I’m using Geode 1.1.0 released last week, but actually saw this
> problem previously with geode-1.0.0-incubating.M3 as well.
>
> BTW, I have not hit this issue with gemfire 8.2.0.6 used before that.
>
>
>
> Thanks,
>
> Vahram.
>
>
>
> *From:* Anthony Baker [mailto:abaker@pivotal.io]
> *Sent:* Wednesday, February 22, 2017 8:41 AM
> *To:* user@geode.apache.org
> *Subject:* Re: NullPointerException during SystemManagementService.
> startManager
>
>
>
> What version of Geode are you using?
>
>
>
> On Feb 22, 2017, at 12:09 AM, Vahram Aharonyan <va...@vmware.com>
> wrote:
>
>
>
> Hi All,
>
>
>
> We are getting java.lang.NullPointerException while trying to start JMX
> Manager Node by invoking ManagementService.startManager:
>
>
>
> org.apache.geode.management.ManagementException:
> java.lang.NullPointerException
>
>         at org.apache.geode.management.internal.FederatingManager.
> startManager(FederatingManager.java:139)
>
>         at org.apache.geode.management.internal.SystemManagementService.
> startManager(SystemManagementService.java:467)
>
> Caused by: java.lang.NullPointerException
>
>         at org.apache.geode.management.internal.MemberMessenger.
> broadcastManagerInfo(MemberMessenger.java:64)
>
>         at org.apache.geode.management.internal.FederatingManager.
> startManager(FederatingManager.java:132)
>
>         ... 45 more
>
>
>
> This seems to be due to MBeanJMXAdapter. localGemFireMBean being empty by
> that point.
>
>
>
> Please note that before startManager call from Java code gemfire locator
> was successfully started, cache was created, necessary Regions were created
> using this configuration:
>
>
>
>                         .set("jmx-manager", "true")
>
>                         .set("jmx-manager-start", "false")
>
>
>
> Could you please let us know whether we miss something in configuration or
> anything else need to be performed before starting JMX manager Node
> dynamically?
>
>
>
> Thanks,
>
> Vahram.
>
>
>

RE: NullPointerException during SystemManagementService.startManager

Posted by Vahram Aharonyan <va...@vmware.com>.
Hi Anthony,

Currently I'm using Geode 1.1.0 released last week, but actually saw this problem previously with geode-1.0.0-incubating.M3 as well.
BTW, I have not hit this issue with gemfire 8.2.0.6 used before that.

Thanks,
Vahram.

From: Anthony Baker [mailto:abaker@pivotal.io]
Sent: Wednesday, February 22, 2017 8:41 AM
To: user@geode.apache.org
Subject: Re: NullPointerException during SystemManagementService.startManager

What version of Geode are you using?

On Feb 22, 2017, at 12:09 AM, Vahram Aharonyan <va...@vmware.com>> wrote:

Hi All,

We are getting java.lang.NullPointerException while trying to start JMX Manager Node by invoking ManagementService.startManager:

org.apache.geode.management.ManagementException: java.lang.NullPointerException
        at org.apache.geode.management.internal.FederatingManager.startManager(FederatingManager.java:139)
        at org.apache.geode.management.internal.SystemManagementService.startManager(SystemManagementService.java:467)
Caused by: java.lang.NullPointerException
        at org.apache.geode.management.internal.MemberMessenger.broadcastManagerInfo(MemberMessenger.java:64)
        at org.apache.geode.management.internal.FederatingManager.startManager(FederatingManager.java:132)
        ... 45 more

This seems to be due to MBeanJMXAdapter. localGemFireMBean being empty by that point.

Please note that before startManager call from Java code gemfire locator was successfully started, cache was created, necessary Regions were created using this configuration:

                        .set("jmx-manager", "true")
                        .set("jmx-manager-start", "false")

Could you please let us know whether we miss something in configuration or anything else need to be performed before starting JMX manager Node dynamically?

Thanks,
Vahram.


Re: NullPointerException during SystemManagementService.startManager

Posted by Anthony Baker <ab...@pivotal.io>.
What version of Geode are you using?

> On Feb 22, 2017, at 12:09 AM, Vahram Aharonyan <va...@vmware.com> wrote:
> 
> Hi All,
>  
> We are getting java.lang.NullPointerException while trying to start JMX Manager Node by invoking ManagementService.startManager:
>  
> org.apache.geode.management.ManagementException: java.lang.NullPointerException
>         at org.apache.geode.management.internal.FederatingManager.startManager(FederatingManager.java:139)
>         at org.apache.geode.management.internal.SystemManagementService.startManager(SystemManagementService.java:467)
> Caused by: java.lang.NullPointerException
>         at org.apache.geode.management.internal.MemberMessenger.broadcastManagerInfo(MemberMessenger.java:64)
>         at org.apache.geode.management.internal.FederatingManager.startManager(FederatingManager.java:132)
>         ... 45 more
>  
> This seems to be due to MBeanJMXAdapter. localGemFireMBean being empty by that point.
>  
> Please note that before startManager call from Java code gemfire locator was successfully started, cache was created, necessary Regions were created using this configuration:
>  
>                         .set("jmx-manager", "true")
>                         .set("jmx-manager-start", "false")
>  
> Could you please let us know whether we miss something in configuration or anything else need to be performed before starting JMX manager Node dynamically?
>  
> Thanks,
> Vahram.