{"record":{"id":"76b06d85e7434646","repo":"questdb/questdb","slug":"could-not-extract-log-configuration-file","errorCode":null,"errorMessage":"Could not extract log configuration file","messagePattern":"Could not extract log configuration file","errorType":"exception","errorClass":"BootstrapException","httpStatus":null,"severity":"critical","filePath":"core/src/main/java/io/questdb/Bootstrap.java","lineNumber":130,"sourceCode":"        rootDirectory = argsMap.get(\"-d\");\n        if (Chars.isBlank(rootDirectory)) {\n            throw new BootstrapException(\"Root directory name expected (-d <root-path>)\");\n        }\n        final File rootPath = new File(rootDirectory);\n        if (!rootPath.exists()) {\n            throw new BootstrapException(\"Root directory does not exist: \" + rootDirectory);\n        }\n\n        if (argsMap.get(\"-n\") == null && Os.type != Os.WINDOWS) {\n            Signal.handle(new Signal(\"HUP\"), _ -> { /* suppress HUP signal */ });\n        }\n\n        // before we set up the logger, we need to copy the conf file\n        byte[] buffer = new byte[1024 * 1024];\n        try {\n            copyLogConfResource(buffer);\n        } catch (IOException e) {\n            throw new BootstrapException(\"Could not extract log configuration file\");\n        }\n\n        // setup logger\n        // note: this call must be made before any Log init.\n        if (argsMap.get(SWITCH_USE_DEFAULT_LOG_FACTORY_CONFIGURATION) == null) {\n            LogFactory.configureRootDir(rootDirectory);\n        }\n        log = LogFactory.getLog(LOG_NAME);\n\n        try {\n            copyResource(rootDirectory, false, buffer, \"import/readme.txt\", log);\n            copyResource(rootDirectory, false, buffer, \"import/trades.parquet\", log);\n        } catch (IOException e) {\n            throw new BootstrapException(\"Could not create the default import directory\");\n        }\n\n        // report copyright and architecture\n        log.advisoryW()","sourceCodeStart":112,"sourceCodeEnd":148,"githubUrl":"https://github.com/questdb/questdb/blob/6610ab113b84528a73388b0722a38b97f9df78c2/core/src/main/java/io/questdb/Bootstrap.java#L112-L148","documentation":"Thrown when copyLogConfResource() raises an IOException while extracting the bundled log configuration resource into the root directory. Before the logger starts, Bootstrap copies the default log.conf into <root>/conf/log.conf; any I/O failure during that copy (unwritable dir, disk full, missing classpath resource) surfaces as this generic message.","triggerScenarios":"Root directory exists but the <root>/conf subdirectory cannot be created or written (read-only filesystem, no write permission, SELinux denial); disk full; or a repackaged/shaded jar where the log conf resource is missing from the classpath.","commonSituations":"Running QuestDB against a root dir owned by another user; Docker read-only volume mounts; minimal/shaded jars built without resources; disk exhaustion.","solutions":["Ensure the user running QuestDB has write permission on the root dir: chown -R questdb: /var/lib/questdb or chmod u+w","Check disk space (df -h <root>) and free space if full","If using a custom/shaded build, verify the log conf resource is packaged on the classpath, or pass the switch that skips copying and use LogFactory's default configuration"],"exampleFix":"# before: root owned by root, server runs as questdb\nls -ld /var/lib/questdb  # drwxr-xr-x root root\n\n# after\nchown -R questdb:questdb /var/lib/questdb","handlingStrategy":"validation","validationCode":"File confDir = new File(rootDir, \"conf\");\nif (!confDir.exists() && !confDir.mkdirs()) {\n    throw new IllegalStateException(\"Cannot create or write \" + confDir + \" - check permissions/disk\");\n}\nnew Bootstrap(Bootstrap.getServerMainArgs(rootDir));","typeGuard":null,"tryCatchPattern":"try {\n    bootstrap = new Bootstrap(args);\n} catch (Bootstrap.BootstrapException e) {\n    // I/O environment problem: fix filesystem (perms/space), restart the JVM\n}","preventionTips":["Pre-create <root>/conf with correct ownership in provisioning scripts","Monitor disk usage on the root volume so copies never fail from ENOSPC"],"tags":["bootstrap","io","permissions","logging","startup"],"backgroundTag":null,"analyzedSha":"6610ab113b84528a73388b0722a38b97f9df78c2","analyzedAt":"2026-08-14T15:30:21.451Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}