{"record":{"id":"6f09211508aae95e","repo":"prestodb/presto","slug":"required-configuration-flight-shim-server-and-f","errorCode":null,"errorMessage":"Required configuration 'flight-shim.server' and 'flight-shim.server.port' not set","messagePattern":"Required configuration 'flight-shim\\.server' and 'flight-shim\\.server\\.port' not set","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"critical","filePath":"presto-flight-shim/src/main/java/com/facebook/presto/flightshim/FlightShimServer.java","lineNumber":74,"sourceCode":"            // Required config was provided instead of vm option -Dconfig=<path-to-config>\n            app.setRequiredConfigurationProperties(config);\n        }\n\n        return app.initialize();\n    }\n\n    public static FlightServer start(Injector injector, FlightServer.Builder builder, Map<String, Map<String, String>> additionalCatalogs)\n            throws Exception\n    {\n        FlightShimPluginManager pluginManager = injector.getInstance(FlightShimPluginManager.class);\n        pluginManager.loadPlugins();\n        pluginManager.loadCatalogs(additionalCatalogs);\n\n        builder.allocator(injector.getInstance(BufferAllocator.class));\n        FlightShimConfig config = injector.getInstance(FlightShimConfig.class);\n\n        if (config.getServerName() == null || config.getServerPort() == null) {\n            throw new IllegalArgumentException(\"Required configuration 'flight-shim.server' and 'flight-shim.server.port' not set\");\n        }\n\n        if (config.getServerSslEnabled()) {\n            builder.location(Location.forGrpcTls(config.getServerName(), config.getServerPort()));\n            if (config.getServerSSLCertificateFile() == null || config.getServerSSLKeyFile() == null) {\n                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\");\n            }\n            File certChainFile = new File(config.getServerSSLCertificateFile());\n            File privateKeyFile = new File(config.getServerSSLKeyFile());\n            builder.useTls(certChainFile, privateKeyFile);\n\n            // Check if client cert is provided for mTLS\n            if (config.getClientSSLCertificateFile() != null) {\n                File clientCertFile = new File(config.getClientSSLCertificateFile());\n                builder.useMTlsClientVerification(clientCertFile);\n            }\n        }\n        else {","sourceCodeStart":56,"sourceCodeEnd":92,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-flight-shim/src/main/java/com/facebook/presto/flightshim/FlightShimServer.java#L56-L92","documentation":"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.","triggerScenarios":"Starting the flight shim server (main -> start) without flight-shim.server or flight-shim.server.port in the config file passed to the injector.","commonSituations":"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.","solutions":["Add flight-shim.server and flight-shim.server.port to the shim's config properties file","Verify the server is started with the correct --config path pointing at that file","Re-check property names for typos against FlightShimConfig's @Config annotations"],"exampleFix":"// before (flight-shim.properties)\n# missing server settings\n// after\nflight-shim.server=localhost\nflight-shim.server.port=32010","handlingStrategy":"validation","validationCode":"// Pre-start config check\nProperties props = loadConfig(args);\nif (props.getProperty(\"flight-shim.server\") == null || props.getProperty(\"flight-shim.server.port\") == null) {\n  throw new IllegalArgumentException(\"Set flight-shim.server and flight-shim.server.port\");\n}","typeGuard":null,"tryCatchPattern":"try { start(); }\ncatch (IllegalArgumentException e) {\n  if (e.getMessage().contains(\"flight-shim.server\")) {\n    log.fatal(\"Missing required flight shim config properties: \" + e.getMessage());\n  }\n  throw e;\n}","preventionTips":["Include flight-shim.server and flight-shim.server.port in the deployment config template","Add a startup smoke test that loads the config and asserts required keys","Use consistent environment config provisioning (all envs get the full key set)"],"tags":["config","startup","missing-property","flight"],"backgroundTag":"missing-env-var","analyzedSha":"55bb57d202de3b926896fa966c2c4a44c779634e","analyzedAt":"2026-09-04T12:50:26.162Z","contentChangedAt":"2026-09-04T12:50:26.162Z","schemaVersion":2},"datasetVersion":"2026-09-11T21:17:09.523Z"}