{"record":{"id":"4316b45bdaaec75e","repo":"apache/pulsar","slug":"need-to-specify-metadatastoreurl-or-zookeeperse","errorCode":null,"errorMessage":"Need to specify `metadataStoreUrl` or `zookeeperServers` in configuration file\nor specify configuration file path from command line.\nnow configuration file path is=[%s]\n","messagePattern":"Need to specify `metadataStoreUrl` or `zookeeperServers` in configuration file\nor specify configuration file path from command line\\.\nnow configuration file path is=\\[(.+?)\\]\n","errorType":"console","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"pulsar-broker/src/main/java/org/apache/pulsar/compaction/CompactorTool.java","lineNumber":181,"sourceCode":"\n        // init broker config\n        if (isBlank(arguments.brokerConfigFile)) {\n            commander.usage(commander.getOut());\n            throw new IllegalArgumentException(\"Need to specify a configuration file for broker\");\n        }\n\n        final String filepath = Path.of(arguments.brokerConfigFile).toAbsolutePath().normalize().toString();\n        log.info(String.format(\"read configuration file %s\", filepath));\n        final ServiceConfiguration brokerConfig =\n                PulsarConfigurationLoader.create(filepath, ServiceConfiguration.class);\n\n        if (isBlank(brokerConfig.getMetadataStoreUrl())) {\n            final String message = String.format(\"\"\"\n                    Need to specify `metadataStoreUrl` or `zookeeperServers` in configuration file\n                    or specify configuration file path from command line.\n                    now configuration file path is=[%s]\n                    \"\"\", filepath);\n            throw new IllegalArgumentException(message);\n        }\n\n        @Cleanup(value = \"shutdownNow\")\n        ScheduledExecutorService scheduler = Executors.newSingleThreadScheduledExecutor(\n                new ThreadFactoryBuilder().setNameFormat(\"compaction-%d\").setDaemon(true).build());\n\n        @Cleanup\n        MetadataStoreExtended store = MetadataStoreExtended.create(brokerConfig.getMetadataStoreUrl(),\n                MetadataStoreConfig.builder()\n                        .sessionTimeoutMillis((int) brokerConfig.getMetadataStoreSessionTimeoutMillis())\n                        .metadataStoreName(MetadataStoreConfig.METADATA_STORE)\n                        .build());\n\n        @Cleanup\n        BookKeeperClientFactory bkClientFactory = new BookKeeperClientFactoryImpl();\n\n        @Cleanup(value = \"shutdownGracefully\")\n        EventLoopGroup eventLoopGroup = EventLoopUtil.newEventLoopGroup(1, false,","sourceCodeStart":163,"sourceCodeEnd":199,"githubUrl":"https://github.com/apache/pulsar/blob/820761864ed8e2a7d2e52dd9763ad2ae117c1395/pulsar-broker/src/main/java/org/apache/pulsar/compaction/CompactorTool.java#L163-L199","documentation":"Error \"Need to specify `metadataStoreUrl` or `zookeeperServers` in configuration file\nor specify configuration file path from command line.\nnow configuration file path is=[%s]\n\" thrown in apache/pulsar.","triggerScenarios":"Thrown at pulsar-broker/src/main/java/org/apache/pulsar/compaction/CompactorTool.java:181 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set metadataStoreUrl or zookeeperServers in the broker configuration file","Pass the correct config file path via the command line option"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"820761864ed8e2a7d2e52dd9763ad2ae117c1395","analyzedAt":"2026-09-06T00:14:20.138Z","contentChangedAt":"2026-09-06T00:14:20.138Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}