apache/skywalking · critical · ModuleStartException

Failed to load static LAL rules.

Error message

Failed to load static LAL rules.

What it means

Wrapper thrown in LogAnalyzerModuleProvider.start() when factory.loadStaticRules() or logAnalyzerService.addListenerFactory(factory) fails. loadStaticRules is where every static LAL rule is actually compiled and registered — so all per-rule compile errors (duplicate names, unknown fields, bad inputType/outputType, DSL syntax) and wiring failures surface here, wrapped with this message. Startup of the log-analyzer module aborts.

Source

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

    public void start() throws ServiceNotProvidedException, ModuleStartException {
        MeterSystem meterSystem = getManager().find(CoreModule.NAME).provider().getService(MeterSystem.class);
        for (final var rule : moduleConfig.malConfigs()) {
            // Use the catalog:name key convention so a runtime-rule /addOrUpdate for the same
            // (catalog, name) replaces this static entry in place instead of running two
            // converters against the same sample stream.
            final MetricConvert convert = new MetricConvert(rule, meterSystem);
            addOrReplaceMetricConvert("log-mal-rules:" + rule.getName(), convert);
            // Static-loader debug-binding publish — no-op when dsl-debugging is disabled.
            MalStaticBindingHook.publish("log-mal-rules", rule.getName(), convert);
        }
        try {
            // Light up the Factory now that all peer modules are past prepare:
            // loadStaticRules calls compile() which constructs RecordSinkListener.Factory
            // which calls moduleManager.find() — only safe outside prepare.
            this.factory.loadStaticRules();
            logAnalyzerService.addListenerFactory(this.factory);
        } catch (final Exception e) {
            throw new ModuleStartException("Failed to load static LAL rules.", e);
        }
    }

    @Override
    public void notifyAfterCompleted() throws ServiceNotProvidedException {

    }

    /**
     * Live snapshot of active MAL converters for {@code log-mal-rules}. Consumed by
     * {@link org.apache.skywalking.oap.log.analyzer.v2.dsl.spec.extractor.MetricExtractor} at
     * ingest time. The returned collection is a read-only view; concurrent updates from
     * {@link #addOrReplaceMetricConvert} / {@link #removeMetricConvert} do not invalidate
     * in-flight iteration because writers publish a new map reference rather than mutating
     * the one this method returned.
     */
    public Collection<MetricConvert> getMetricConverts() {
        return metricConverts.values();

View on GitHub (pinned to 102af09b4a)

Solutions

  1. Walk the cause chain — the deepest cause names the exact rule and problem (duplicate name, unknown field, class not found, etc.)
  2. Fix the offending rule in the lal/ catalog identified by the cause
  3. Ensure rule names are unique per layer (and globally for layer: auto rules)
  4. Verify inputType/outputType values are valid FQCNs or registered builder names
  5. Re-run startup after removing the failing file to confirm isolation
Defensive patterns

Strategy: try-catch

Try / catch

try {
    factory.loadStaticRules();
} catch (Exception e) {
    // walk to deepest cause: it names the exact rule file + problem
    // startup cannot proceed with a broken rule catalog; quarantine the file and retry boot
}

Prevention

When it happens

Trigger: Any static LAL rule under lalPath/lalFiles failing compile (see the LALValueCodegen/DSL errors); duplicate rule names across files (auto-layer or per-layer); inputType/outputType resolution failures; listener-factory registration failures after successful compile.

Common situations: Deploying new or edited LAL rule files with errors; adding a rule whose name already exists in another file; upgrading SkyWalking with grammar changes that invalidate old rule files.

Related errors


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