smartcontractkit / smartcontractkit/chainlink
[NODE] Node crashes on startup when AuditLogger is enabled
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 viadocker 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
- Add this to
config.toml:[AuditLogger] Enabled = true ForwardToUrl = 'http://any-endpoint:9898/audit' - Start the node normally.
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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