public void deregisterAll() {
    // we stop JMXServer at last
    Collections.reverse(iServices);
    for (IService service : iServices) {
      try {
        service.waitAndStop(deregisterTimeOut);
        logger.debug("{} deregistered", service.getID());
      } catch (Exception e) {
        logger.error("Failed to stop {} because:", service.getID().getName(), e);
      }
    }
    iServices.clear();
    logger.info("deregister all service.");
  }
stop all service and clear iService list.
iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/service/RegisterManager.java