{"record":{"id":"9c834c3fdcd95a0d","repo":"nathanmarz/storm","slug":"configuration-file-loginconfigurationfile-could-not-be-found","errorCode":null,"errorMessage":"configuration file ${loginConfigurationFile} could not be found","messagePattern":"configuration file (.+?) could not be found","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"storm-core/src/jvm/backtype/storm/security/auth/AuthUtils.java","lineNumber":55,"sourceCode":"    public static final String SERVICE = \"storm_thrift_server\";\n\n    /**\n     * Construct a JAAS configuration object per storm configuration file \n     * @param storm_conf Storm configuration \n     * @return JAAS configuration object\n     */\n    public static Configuration GetConfiguration(Map storm_conf) {\n        Configuration login_conf = null;\n\n        //find login file configuration from Storm configuration  \n        String loginConfigurationFile = (String)storm_conf.get(\"java.security.auth.login.config\");\n        if ((loginConfigurationFile != null) && (loginConfigurationFile.length()>0)) { \n            try {\n                URI config_uri = new File(loginConfigurationFile).toURI();\n                login_conf = Configuration.getInstance(\"JavaLoginConfig\", new URIParameter(config_uri));\n            } catch (NoSuchAlgorithmException ex1) {\n                if (ex1.getCause() instanceof FileNotFoundException)\n                    throw new RuntimeException(\"configuration file \"+loginConfigurationFile+\" could not be found\");\n                else throw new RuntimeException(ex1);\n            } catch (Exception ex2) {\n                throw new RuntimeException(ex2);\n            }\n        }\n        \n        return login_conf;\n    }\n\n    /**\n     * Construct a transport plugin per storm configuration\n     * @param conf storm configuration\n     * @return\n     */\n    public static ITransportPlugin GetTransportPlugin(Map storm_conf, Configuration login_conf) {\n        ITransportPlugin  transportPlugin = null;\n        try {\n            String transport_plugin_klassName = (String) storm_conf.get(Config.STORM_THRIFT_TRANSPORT_PLUGIN);","sourceCodeStart":37,"sourceCodeEnd":73,"githubUrl":"https://github.com/nathanmarz/storm/blob/cdb116e942666973bc4eaa0df098d5bab82739e7/storm-core/src/jvm/backtype/storm/security/auth/AuthUtils.java#L37-L73","documentation":"AuthUtils.GetConfiguration() loads a JAAS login configuration file (e.g. for SASL/kerberos authentication) via javax.security.auth.login.Configuration.getInstance(\"JavaLoginConfig\"). When the file path stored in storm_conf under the login configuration key does not exist, the underlying provider fails with a FileNotFoundException wrapped in NoSuchAlgorithmException, which Storm rethrows as this RuntimeException.","triggerScenarios":"Calling AuthUtils.GetConfiguration(Map conf) when conf's login configuration file setting (e.g. storm ThriftCamera/login config key such as java.security.auth.login.config-derived value) points to a path that is null-checked but whose file is absent or unreadable as a File, so Configuration.getInstance fails with cause FileNotFoundException.","commonSituations":"Missing JAAS file on worker machines even though it exists on the nimbus node; relative path that doesn't resolve in the worker's working directory; typo in the storm.conf login file property; security not provisioned on all nodes in a distributed cluster.","solutions":["Create the JAAS login configuration file at the configured path, or fix the storm config value to point at the existing file.","Verify the file exists and is readable on every node (nimbus, supervisors, UI) where the error appears: ls -l <loginConfigurationFile>.","Use an absolute path instead of a relative one in the config.","If security is not needed, disable the SASL/kerberos transport plugin in storm.yaml so no login file is required."],"exampleFix":"// before (storm.yaml pointing to missing file)\nstorm.principal.tolocal: null\n# jaas file: /etc/storm/storm-jaas.conf (does not exist)\n// after\ncp jaas.conf /etc/storm/storm-jaas.conf   # or update conf:\n# storm thrift login file -> /etc/storm/storm-jaas.conf (verified existing)","handlingStrategy":"validation","validationCode":"// Java\nString file = (String) conf.get(loginFileKey);\njava.io.File f = new java.io.File(file);\nif (file == null || file.isEmpty()) throw new IllegalStateException(loginFileKey + \" not set\");\nif (!f.isFile() || !f.canRead()) throw new IllegalStateException(\"JAAS login file missing/unreadable: \" + file);","typeGuard":"boolean jaasFileUsable(String path) {\n    return path != null && !path.isEmpty() && new java.io.File(path).isFile();\n}","tryCatchPattern":"try {\n    loginConf = AuthUtils.GetConfiguration(conf);\n} catch (RuntimeException e) {\n    if (e.getMessage() != null && e.getMessage().contains(\"could not be found\")) {\n        LOG.error(\"JAAS login file missing; check \" + loginFileKey + \" in storm.yaml\", e);\n    }\n    throw e;\n}","preventionTips":["Ship the JAAS file to every node and reference it with an absolute path.","Check file existence/readability at startup before enabling SASL.","Keep login file path in one config key and validate it in your launch scripts."],"tags":["security","configuration","jaas","file-not-found"],"backgroundTag":"config-file-not-found","analyzedSha":"cdb116e942666973bc4eaa0df098d5bab82739e7","analyzedAt":"2026-09-12T14:30:00.714Z","contentChangedAt":"2026-09-12T14:30:00.714Z","schemaVersion":2},"datasetVersion":"2026-09-16T09:17:16.951Z"}