{"record":{"id":"ceb32e86dc351b64","repo":"redis/redis","slug":"reading-the-configuration-file-at-line-d-n","errorCode":null,"errorMessage":"Reading the configuration file, at line %d\\n","messagePattern":"Reading the configuration file, at line (.+?)\\\\n","errorType":"console","errorClass":null,"httpStatus":null,"severity":"critical","filePath":"src/sentinel.c","lineNumber":1853,"sourceCode":"        while((ln = listNext(&li))) {\n            struct sentinelLoadQueueEntry *entry = ln->value;\n            err = sentinelHandleConfiguration(entry->argv,entry->argc);\n            if (err) {\n                linenum = entry->linenum;\n                line = entry->line;\n                goto loaderr;\n            }\n        }\n    }\n\n    /* free sentinel_config when config loading is finished */\n    freeSentinelConfig();\n    return;\n\nloaderr:\n    fprintf(stderr, \"\\n*** FATAL CONFIG FILE ERROR (Redis %s) ***\\n\",\n        REDIS_VERSION);\n    fprintf(stderr, \"Reading the configuration file, at line %d\\n\", linenum);\n    fprintf(stderr, \">>> '%s'\\n\", line);\n    fprintf(stderr, \"%s\\n\", err);\n    exit(1);\n}\n\nconst char *sentinelHandleConfiguration(char **argv, int argc) {\n\n    sentinelRedisInstance *ri;\n\n    if (!strcasecmp(argv[0],\"monitor\") && argc == 5) {\n        /* monitor <name> <host> <port> <quorum> */\n        int quorum = atoi(argv[4]);\n\n        if (quorum <= 0) return \"Quorum must be 1 or greater.\";\n        if (createSentinelRedisInstance(argv[1],SRI_MASTER,argv[2],\n                                        atoi(argv[3]),quorum,NULL) == NULL)\n        {\n            return sentinelCheckCreateInstanceErrors(SRI_MASTER);","sourceCodeStart":1835,"sourceCodeEnd":1871,"githubUrl":"https://github.com/redis/redis/blob/4f20cb48934463db5970bd476461b2d57af3f38d/src/sentinel.c#L1835-L1871","documentation":"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.","triggerScenarios":"Always printed as part of the config-load fatal banner when `sentinelHandleConfiguration` returns an error.","commonSituations":"Hand-edited or version-mismatched sentinel.conf with a bad directive at the reported line.","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."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"# Surface the offending line number before the fatal start\nsed -n \"${LINE_NUM}p\" /etc/redis/sentinel.conf","typeGuard":null,"tryCatchPattern":null,"preventionTips":["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."],"tags":["config","sentinel","startup"],"backgroundTag":null,"analyzedSha":"4f20cb48934463db5970bd476461b2d57af3f38d","analyzedAt":"2026-08-10T14:17:07.821Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}