[
https://issues.apache.org/jira/browse/IGNITE-9792?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16638291#comment-16638291
]
ASF GitHub Bot commented on IGNITE-9792:
----------------------------------------
GitHub user akuznetsov-gridgain opened a pull request:
https://github.com/apache/ignite/pull/4915
IGNITE-9792 Fixed assert in case if IGNITE_MBEANS_DISABLED is true. F…
…ixed tests.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/apache/ignite ignite-9792
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/ignite/pull/4915.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 #4915
----
commit e66c9850ce1ba5e8c2c028f837aff646577beebe
Author: Alexey Kuznetsov <akuznetsov@...>
Date: 2018-10-04T11:19:02Z
IGNITE-9792 Fixed assert in case if IGNITE_MBEANS_DISABLED is true. Fixed
tests.
----
> Setting system property IGNITE_MBEANS_DISABLED to true lead to NPE.
> -------------------------------------------------------------------
>
> Key: IGNITE-9792
> URL: https://issues.apache.org/jira/browse/IGNITE-9792
> Project: Ignite
> Issue Type: Bug
> Reporter: Alexey Kuznetsov
> Assignee: Alexey Kuznetsov
> Priority: Critical
> Fix For: 2.7
>
>
> Javadocs for IGNITE_MBEANS_DISABLED: "This may be helpful if MBeans are not
> allowed e.g. for security reasons."
> So I set in code:
> {code}
> System.setProperty(IgniteSystemProperties.IGNITE_MBEANS_DISABLED, "true")
> {code}
>
> And on node start node failed with NPE:
> {code}
> Caused by: class org.apache.ignite.IgniteCheckedException: Unexpected
> exception when starting grid.
> at
> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start0(IgnitionEx.java:2079)
> at
> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start(IgnitionEx.java:1728)
> at org.apache.ignite.internal.IgnitionEx.start0(IgnitionEx.java:1156)
> at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:676)
> at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:601)
> at org.apache.ignite.Ignition.start(Ignition.java:323)
> ... 3 more
> Caused by: java.lang.NullPointerException: Ouch! Argument cannot be null:
> cfg.getMBeanServer()
> at
> org.apache.ignite.internal.util.GridArgumentCheck.notNull(GridArgumentCheck.java:48)
> at
> org.apache.ignite.internal.IgniteKernal.validateCommon(IgniteKernal.java:1355)
> at org.apache.ignite.internal.IgniteKernal.start(IgniteKernal.java:833)
> at
> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start0(IgnitionEx.java:2033)
> ... 8 more
> {code}
>
> The fix is trivial: in org.apache.ignite.internal.IgniteKernal#validateCommon
> {code}
> if (!U.IGNITE_MBEANS_DISABLED) // <<< The fix
> A.notNull(cfg.getMBeanServer(), "cfg.getMBeanServer()");
> {code}
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)