redis/redis · critical
Reading the configuration file, at line %d\n
Error message
Reading the configuration file, at line %d\n
What it means
Second line of Sentinel's fatal config report (sentinel.c:1853): prints the line number (`linenum`) of the offending directive. Use it to jump straight to the bad line in sentinel.conf; the next two lines give the line text and the specific error.
Source
Thrown at src/sentinel.c:1853
while((ln = listNext(&li))) {
struct sentinelLoadQueueEntry *entry = ln->value;
err = sentinelHandleConfiguration(entry->argv,entry->argc);
if (err) {
linenum = entry->linenum;
line = entry->line;
goto loaderr;
}
}
}
/* free sentinel_config when config loading is finished */
freeSentinelConfig();
return;
loaderr:
fprintf(stderr, "\n*** FATAL CONFIG FILE ERROR (Redis %s) ***\n",
REDIS_VERSION);
fprintf(stderr, "Reading the configuration file, at line %d\n", linenum);
fprintf(stderr, ">>> '%s'\n", line);
fprintf(stderr, "%s\n", err);
exit(1);
}
const char *sentinelHandleConfiguration(char **argv, int argc) {
sentinelRedisInstance *ri;
if (!strcasecmp(argv[0],"monitor") && argc == 5) {
/* monitor <name> <host> <port> <quorum> */
int quorum = atoi(argv[4]);
if (quorum <= 0) return "Quorum must be 1 or greater.";
if (createSentinelRedisInstance(argv[1],SRI_MASTER,argv[2],
atoi(argv[3]),quorum,NULL) == NULL)
{
return sentinelCheckCreateInstanceErrors(SRI_MASTER);View on GitHub (pinned to 4f20cb4893)
Solutions
- Open sentinel.conf at the printed line number.
- Cross-check the directive syntax against the Sentinel documentation.
- Fix and restart Sentinel to confirm the error clears.
Defensive patterns
Strategy: validation
Validate before calling
# Surface the offending line number before the fatal start
sed -n "${LINE_NUM}p" /etc/redis/sentinel.conf Prevention
- When this line prints, open sentinel.conf at the given line number immediately.
- Pair it with the message line that follows to understand the failure.
- Re-run Sentinel after each fix to confirm the error clears.
When it happens
Trigger: Always printed as part of the config-load fatal banner when `sentinelHandleConfiguration` returns an error.
Common situations: Hand-edited or version-mismatched sentinel.conf with a bad directive at the reported line.
Related errors
- \n*** FATAL CONFIG FILE ERROR (Redis %s) ***\n
- %s\n
- *** FATAL CONFIG FILE ERROR (Redis %s) ***
- Reading the configuration file, at line %d
- %s
AI-assisted analysis of redis/redis@4f20cb4893 (2026-08-10).
Data as JSON: /api/errors/ceb32e86dc351b64.
Report an issue: GitHub.