prestodb/presto · critical · IllegalArgumentException

Required configuration 'flight-shim.server' and 'flight-shim

Error message

Required configuration 'flight-shim.server' and 'flight-shim.server.port' not set

What it means

FlightShimServer.start reads FlightShimConfig from the injected configuration and requires both 'flight-shim.server' (host/name) and 'flight-shim.server.port' to be set. If either is missing, it throws IllegalArgumentException naming the required properties, stopping server startup since the Arrow Flight bind location cannot be constructed.

Source

Thrown at presto-flight-shim/src/main/java/com/facebook/presto/flightshim/FlightShimServer.java:74

            // Required config was provided instead of vm option -Dconfig=<path-to-config>
            app.setRequiredConfigurationProperties(config);
        }

        return app.initialize();
    }

    public static FlightServer start(Injector injector, FlightServer.Builder builder, Map<String, Map<String, String>> additionalCatalogs)
            throws Exception
    {
        FlightShimPluginManager pluginManager = injector.getInstance(FlightShimPluginManager.class);
        pluginManager.loadPlugins();
        pluginManager.loadCatalogs(additionalCatalogs);

        builder.allocator(injector.getInstance(BufferAllocator.class));
        FlightShimConfig config = injector.getInstance(FlightShimConfig.class);

        if (config.getServerName() == null || config.getServerPort() == null) {
            throw new IllegalArgumentException("Required configuration 'flight-shim.server' and 'flight-shim.server.port' not set");
        }

        if (config.getServerSslEnabled()) {
            builder.location(Location.forGrpcTls(config.getServerName(), config.getServerPort()));
            if (config.getServerSSLCertificateFile() == null || config.getServerSSLKeyFile() == null) {
                throw new IllegalArgumentException("'flight-shim.server-ssl-enabled' is enabled but 'flight-shim.server-ssl-certificate-file' or 'flight-shim.server-ssl-key-file' not set");
            }
            File certChainFile = new File(config.getServerSSLCertificateFile());
            File privateKeyFile = new File(config.getServerSSLKeyFile());
            builder.useTls(certChainFile, privateKeyFile);

            // Check if client cert is provided for mTLS
            if (config.getClientSSLCertificateFile() != null) {
                File clientCertFile = new File(config.getClientSSLCertificateFile());
                builder.useMTlsClientVerification(clientCertFile);
            }
        }
        else {

View on GitHub (pinned to 55bb57d202)

Solutions

  1. Add flight-shim.server and flight-shim.server.port to the shim's config properties file
  2. Verify the server is started with the correct --config path pointing at that file
  3. Re-check property names for typos against FlightShimConfig's @Config annotations

Example fix

// before (flight-shim.properties)
# missing server settings
// after
flight-shim.server=localhost
flight-shim.server.port=32010
Defensive patterns

Strategy: validation

Validate before calling

// Pre-start config check
Properties props = loadConfig(args);
if (props.getProperty("flight-shim.server") == null || props.getProperty("flight-shim.server.port") == null) {
  throw new IllegalArgumentException("Set flight-shim.server and flight-shim.server.port");
}

Try / catch

try { start(); }
catch (IllegalArgumentException e) {
  if (e.getMessage().contains("flight-shim.server")) {
    log.fatal("Missing required flight shim config properties: " + e.getMessage());
  }
  throw e;
}

Prevention

When it happens

Trigger: Starting the flight shim server (main -> start) without flight-shim.server or flight-shim.server.port in the config file passed to the injector.

Common situations: Forgotten config keys when first deploying the shim; wrong config file path passed on the command line; renamed properties after an upgrade; environment-specific config not provisioned.

Understand the failure class

Background: "environment variable is not set" and "Missing keys in environment" errors: what missing required env var messages mean and how to fix them — this error's family across 28 libraries.

Related errors


AI-assisted analysis of prestodb/presto@55bb57d202 (2026-09-04). Data as JSON: /api/errors/6f09211508aae95e. Report an issue: GitHub.