smartcontractkit / smartcontractkit/chainlink

[NODE] Node crashes on startup when AuditLogger is enabled

Open Beginner friendly
#23,571 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
8.2k
Forks
2k
Avg merge
1d 23h
Merged PRs (30d)
202

Description

Description
When I enable the AuditLogger feature in the config ([AuditLogger] Enabled = true), the node crashes immediately on startup with this error:

fatal error instantiating application: failed to register health check for service *audit.AuditLoggerService: misconfigured check "" for *audit.AuditLoggerService

It crashes right away, before the node even tries to connect to anything. It doesn't matter what ForwardToUrl is set to — I tested with both a working URL and a broken one, same crash either way. Turning off AuditLogger (or setting Enabled = false) lets the node start normally.

Basic Information

  • Network: N/A — the node never gets far enough to connect to a chain, it crashes during startup
  • Blockchain Client: N/A
  • Go Version: 1.26.5 (from the build logs)
  • Operating System: Ubuntu 24.04, running inside Docker
  • Commit: version=2.61.0@unset
  • Hosting Provider: self-hosted
  • Startup Command: chainlink -c config.toml -s secrets.toml node start, also reproduced via docker run smartcontract/chainlink:2.61.0 node -c config.toml -s secrets.toml start

Environment Variables
Not using environment variables to configure the node — using config.toml / secrets.toml files instead.

Steps to Reproduce

  1. Add this to config.toml:
    [AuditLogger]
    Enabled = true
    ForwardToUrl = 'http://any-endpoint:9898/audit'
    
  2. Start the node normally.
  3. It crashes immediately with the error above.

Additional Information
While digging into it, it looks like the code that sets up the AuditLogger service passes it a logger object that was never given a name. When the node tries to register this service for health checks, it requires every service to have a name, and rejects it because the name is empty — which crashes the whole startup.

So basically, just turning this feature on (regardless of any other config) makes the node unable to start at all.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the AuditLogger service setup and the health-check registration path described in the report, then trace how its logger name is assigned. Reproduce with AuditLogger enabled in config.toml and verify that the node starts successfully and registers the service without the empty-name error.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
backend, observability-sre
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.