private void startServer(Path path, int attempt) {
        if (attempt > 1)
            log.log(Level.INFO, "Starting ZooKeeper server with " + path.toFile().getAbsolutePath() +
                    ". Trying to establish ZooKeeper quorum (members: " +
                    zookeeperServerHostnames(zookeeperServerConfig) + ", attempt " + attempt + ")");

        // Note: Hack to make this work in ZooKeeper 3.6, where metrics provider class is
        // loaded by using Thread.currentThread().getContextClassLoader() which does not work
        // well in the container
        ClassLoader tccl = Thread.currentThread().getContextClassLoader();
        Thread.currentThread().setContextClassLoader(this.getClass().getClassLoader());
        try {
            server.start(path);
        } catch (Throwable e) {
            throw new RuntimeException("Starting " + serverDescription() + " failed", e);
        } finally {
            Thread.currentThread().setContextClassLoader(tccl);
        }
    }
Writes zookeeper config and starts zookeeper server.

@author Harald Musum
zookeeper-server/zookeeper-server-common/src/main/java/com/yahoo/vespa/zookeeper/ZooKeeperRunner.java