private void connect() throws ConnectionFailedException, IOException {
    try {
      JMXServiceURL jmxUrl = getJMXServiceURL();
      jmxc = JMXConnectorFactory.connect(jmxUrl);
      server = jmxc.getMBeanServerConnection();
    } catch (AttachNotSupportedException e) {
      throw new ConnectionFailedException("Failed to connect to process '" + pid + "'", e);
    }
  }
Connects to the JMX agent in the local process.

@throws ConnectionFailedException if there was a failure to connect to the local JMX connector
        in the process
@throws IOException if the JDK management agent cannot be found and loaded
geode-core/src/main/java/org/apache/geode/internal/process/MBeanProcessController.java