@Test
  public void gfshConnectsIfJmxManagerStartIsTrue() throws Exception {
    int jmxPort = getRandomAvailableTCPPort();

    Properties configProperties = new Properties();
    configProperties.setProperty(ENABLE_CLUSTER_CONFIGURATION, "false");
    configProperties.setProperty(HTTP_SERVICE_PORT, "0");
    configProperties.setProperty(JMX_MANAGER_PORT, String.valueOf(jmxPort));
    configProperties.setProperty(JMX_MANAGER_START, "true");
    configProperties.setProperty(LOG_FILE, "");
    configProperties.setProperty(MCAST_PORT, "0");

    locator = Locator.startLocatorAndDS(port, null, configProperties);
    InternalLocator internalLocator = (InternalLocator) locator;
    InternalCache cache = internalLocator.getCache();
    List<JmxManagerProfile> alreadyManaging = cache.getJmxManagerAdvisor().adviseAlreadyManaging();

    assertThat(alreadyManaging).hasSize(1);
    assertThat(alreadyManaging.get(0).getDistributedMember()).isEqualTo(cache.getMyId());
  }
Fix: if jmx-manager-start is true in a locator then gfsh connect will fail
geode-core/src/integrationTest/java/org/apache/geode/distributed/LocatorIntegrationTest.java