apache/skywalking · critical · ModuleStartException

Failed to create LAL listener factory.

Error message

Failed to create LAL listener factory.

What it means

Wrapper thrown in LogAnalyzerModuleProvider.prepare() when constructing LogFilterListener.Factory fails. The Factory itself is config-only at construction (heavy rule compilation is deferred to loadStaticRules in start()), so a failure here indicates constructor-level problems: config object issues or unexpected exceptions during initial wiring. It aborts module preparation, so the OAP does not start.

Source

Thrown at oap-server/analyzer/log-analyzer/src/main/java/org/apache/skywalking/oap/log/analyzer/v2/provider/LogAnalyzerModuleProvider.java:134

    @Override
    public void prepare() throws ServiceNotProvidedException, ModuleStartException {
        logAnalyzerService = new LogAnalyzerServiceImpl(getManager(), moduleConfig);
        this.registerServiceImplementation(ILogAnalyzerService.class, logAnalyzerService);

        // Register both module-declared services in prepare(): {@link BootstrapFlow#start}
        // runs {@code requiredCheck} against {@code services()} BEFORE this provider's
        // {@code start()}, and the count-equals check ({@code requiredServices.length ==
        // services.size()}) requires every declared service to be registered already.
        // Both objects are config-only at construction — the Factory's heavy
        // rule-compile pass is deferred to {@link LogFilterListener.Factory#loadStaticRules}
        // (called from {@link #start()} where moduleManager.find is allowed); the
        // MalConverterRegistry is a pure delegate to this provider's own volatile map and
        // never reaches across modules.
        try {
            this.factory = new LogFilterListener.Factory(getManager(), moduleConfig);
            this.registerServiceImplementation(LogFilterListener.Factory.class, this.factory);
        } catch (final Exception e) {
            throw new ModuleStartException("Failed to create LAL listener factory.", e);
        }
        // MalConverterRegistry for the log-mal-rules catalog. The runtime-rule plugin looks
        // this up by module name + service class, so it does not need a compile-time dep on
        // log-analyzer's concrete provider. Delegates directly to this provider's volatile
        // map so ingest code (MetricExtractor) and runtime mutations share exactly one state.
        this.registerServiceImplementation(MalConverterRegistry.class, new MalConverterRegistry() {
            @Override
            public void addOrReplaceConverter(final String key, final MetricConvert convert) {
                addOrReplaceMetricConvert(key, convert);
            }

            @Override
            public void removeConverter(final String key) {
                removeMetricConvert(key);
            }
        });
    }

View on GitHub (pinned to 102af09b4a)

Solutions

  1. Inspect the nested cause — it carries the actual construction failure
  2. Validate the full log-analyzer section of application.yml (lalPath, lalFiles, malPath, malFiles)
  3. Check for NoClassDefFoundError / static-init causes indicating classpath or packaging problems
  4. Rebuild/redeploy the distribution if a jar was partially updated
Defensive patterns

Strategy: try-catch

Try / catch

try {
    this.factory = new LogFilterListener.Factory(getManager(), moduleConfig);
} catch (Exception e) {
    throw new ModuleStartException("Failed to create LAL listener factory.", e);
    // operator action: inspect cause; constructor failures are config/classpath level
}

Prevention

When it happens

Trigger: Any exception thrown from new LogFilterListener.Factory(getManager(), moduleConfig) — null config fields, class-level initialization failures in referenced classes; in practice rare, since the heavy path is deferred.

Common situations: A corrupted/incomplete log-analyzer configuration object; classpath conflicts where factory-related classes fail static init; a custom build missing a dependency of the v2 analyzer.

Related errors


AI-assisted analysis of apache/skywalking@102af09b4a (2026-08-14). Data as JSON: /api/errors/d7ecd3413b1ecde0. Report an issue: GitHub.