Tag Archives: FATAL CONFIG FILE ERROR Bad directive or wrong number of arguments

[Solved] redis Start Error: FATAL CONFIG FILE ERROR: Bad directive or wrong number of arguments

Redis version, above 6.0

Error record: the failed redis uses port 6380 as the slave node.

Error reason:

The reason is that it is not allowed to add comments after the same valid code line in some configuration files (such as. Conf files, which are widely seen here). The following comments will be compiled and executed as the parameters passed in by the current command line; however, the command configuration has no parameters or the format of the parameters passed in is wrong. Naturally, an error will be reported.
as shown in the figure:

Change the comment to a separate line to solve the problem.

Incidentally, there is a receipt. If redis fails to start, you might as well look at the configured log file