apache geode 9.0.3 Locator could not find a JMX Ma

2019-08-22 02:30发布

问题:

Starting server location for Distribution Locator on /10.212.40.106[11001]

gfsh can not connect

gfsh>connect --locator=10.212.40.106[11001]
Connecting to Locator at [host=10.212.40.106, port=11001] ..
Locator could not find a JMX Manager

my locators log

locator11001views.log

[info 2017/05/02 18:49:19.029 EEST <main> tid=0x1] Log opened with new distributed system connection.  View[10.212.40.106(GeoMember1GEO:14280)<ec><v0>:1024|0] members: [10.212.40.106(GeoMember1GEO:14280)<ec><v0>:1024{lead}]

[info 2017/05/02 18:49:19.341 EEST <DM-MemberEventInvoker> tid=0x27] A new member joined: 10.212.40.109(GeoMember3GEO:54733)<ec><v1>:1024.  View[10.212.40.106(GeoMember1GEO:14280)<ec><v0>:1024|1] members: [10.212.40.106(GeoMember1GEO:14280)<ec><v0>:1024{lead}, 10.212.40.109(GeoMember3GEO:54733)<ec><v1>:1024, 10.212.40.108(GeoMember2GEO:34890)<ec><v1>:1024]

[info 2017/05/02 18:49:19.342 EEST <DM-MemberEventInvoker> tid=0x27] A new member joined: 10.212.40.108(GeoMember2GEO:34890)<ec><v1>:1024.  View[10.212.40.106(GeoMember1GEO:14280)<ec><v0>:1024|1] members: [10.212.40.106(GeoMember1GEO:14280)<ec><v0>:1024{lead}, 10.212.40.109(GeoMember3GEO:54733)<ec><v1>:1024, 10.212.40.108(GeoMember2GEO:34890)<ec><v1>:1024]

[info 2017/05/02 18:49:24.562 EEST <BridgeServer-LoadPollingThread> tid=0x51] server count: 3 connected client count: 0 client subscription queue count: 0
current servers : 10.212.40.106(GeoMember1GEO:14280)<ec><v0>:1024 10.212.40.108(GeoMember2GEO:34890)<ec><v1>:1024 10.212.40.109(GeoMember3GEO:54733)<ec><v1>:1024

when adding the config options

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

I find this exception

org.apache.geode.management.ManagementException: java.lang.NullPointerException
at org.apache.geode.management.internal.FederatingManager.startManager(FederatingManager.java:137)
at org.apache.geode.management.internal.SystemManagementService.startManager(SystemManagementService.java:466)
at org.apache.geode.management.internal.beans.ManagementAdapter.handleCacheCreation(ManagementAdapter.java:191)
at org.apache.geode.management.internal.beans.ManagementListener.handleEvent(ManagementListener.java:113)
at org.apache.geode.distributed.internal.InternalDistributedSystem.notifyResourceEventListeners(InternalDistributedSystem.java:2161)
at org.apache.geode.distributed.internal.InternalDistributedSystem.handleResourceEvent(InternalDistributedSystem.java:534)
at org.apache.geode.internal.cache.GemFireCacheImpl.initialize(GemFireCacheImpl.java:1234)
at org.apache.geode.internal.cache.GemFireCacheImpl.basicCreate(GemFireCacheImpl.java:794)
at org.apache.geode.internal.cache.GemFireCacheImpl.create(GemFireCacheImpl.java:781)
at org.apache.geode.cache.CacheFactory.create(CacheFactory.java:179)
at org.apache.geode.cache.CacheFactory.create(CacheFactory.java:219)
at org.apache.geode.distributed.internal.DefaultServerLauncherCacheProvider.createCache(DefaultServerLauncherCacheProvider.java:52)
at org.apache.geode.distributed.ServerLauncher.createCache(ServerLauncher.java:857)
at org.apache.geode.distributed.ServerLauncher.start(ServerLauncher.java:769)

http://gemfire.docs.pivotal.io/geode/managing/management/jmx_manager_operations.html

回答1:

Instead of starting the locator with ServerLauncher, you should use LocatorLauncher instead. Having said that, it is recommended that you use gfsh to launch your members.