public static void main(final String[] args) throws Exception {
        // add to vm options: -Dlogback.configurationFile=file:conf/logback.xml
        printHeader();
        final String file;
        if (args.length > 0)
            file = args[0];
        else
            file = "conf/gremlin-server.yaml";

        final Settings settings;
        try {
            settings = Settings.read(file);
        } catch (Exception ex) {
            logger.error("Configuration file at {} could not be found or parsed properly. [{}]", file, ex.getMessage());
            return;
        }

        logger.info("Configuring Gremlin Server from {}", file);
        final GremlinServer server = new GremlinServer(settings);
        server.start().exceptionally(t -> {
            logger.error("Gremlin Server was unable to start and will now begin shutdown: {}", t.getMessage());
            server.stop().join();
            return null;
        }).join();
    }
Stop Gremlin Server and free the port binding. Note that multiple calls to this method will return the
same instance of the {@code CompletableFuture}.
gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/GremlinServer.java