You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@geode.apache.org by "Dan Smith (Jira)" <ji...@apache.org> on 2020/09/17 21:17:00 UTC
[jira] [Created] (GEODE-8507) Calling gfsh connect while JMX
manager is starting up can result in error
Dan Smith created GEODE-8507:
--------------------------------
Summary: Calling gfsh connect while JMX manager is starting up can result in error
Key: GEODE-8507
URL: https://issues.apache.org/jira/browse/GEODE-8507
Project: Geode
Issue Type: Bug
Components: management
Affects Versions: 1.14.0
Reporter: Dan Smith
Running `gfsh -e connect` on a locator at the wrong time results in this error:
{noformat}
Exception caused JMX Manager startup to fail because: 'Manager is already running'
{noformat}
Looking at where this message is generated, I think this is coming from this code in JmxLocatorManager that tries to find a JMX manager and start one if it is not running
{code}
//*** Manager may not be started at this point
List<JmxManagerProfile> alreadyManaging =
this.cache.getJmxManagerAdvisor().adviseAlreadyManaging();
if (alreadyManaging.isEmpty()) {
List<JmxManagerProfile> willingToManage =
this.cache.getJmxManagerAdvisor().adviseWillingToManage();
if (!willingToManage.isEmpty()) {
synchronized (this) {
alreadyManaging = this.cache.getJmxManagerAdvisor().adviseAlreadyManaging();
if (alreadyManaging.isEmpty()) {
willingToManage = this.cache.getJmxManagerAdvisor().adviseWillingToManage();
if (!willingToManage.isEmpty()) {
JmxManagerProfile p = willingToManage.get(0);
if (p.getDistributedMember().equals(this.cache.getMyId())) {
if (logger.isDebugEnabled()) {
logger.debug("Locator starting jmx manager in its JVM");
}
try {
//*** This call can throw an AlreadyRunningException if the manager is already running
//*** failing this whole method.
ManagementService.getManagementService(this.cache).startManager();
} catch (CancelException ex) {
// ignore
} catch (VirtualMachineError err) {
SystemFailure.initiateFailure(err);
// If this ever returns, rethrow the error. We're poisoned
// now, so don't let this thread continue.
throw err;
} catch (Throwable t) {
SystemFailure.checkFailure();
return new JmxManagerLocatorResponse(null, 0, false, t);
}
{code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)