Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

redis.conf include: "Bad directive or wrong number of arguments"

I've created this config for redis [/etc/redis/map.conf]:

include /etc/redis/ideal.conf
port 11235
pidfile /var/run/redis-map.pid
logfile /var/log/redis/map.log
dbfilename map.rdb

As you can see, it includes /etc/redis/ideal.conf; this file actually exists and we have read permissions. Also there is another file, slightly different; consider [/etc/redis/storage.conf]:

include /etc/redis/ideal.conf

pidfile /var/run/redis-storage.pid
port 8000
bind 192.168.0.3
logfile /var/log/redis/storage.log
dbfilename dump_storage.rdb

My problem is: I can launch redis-server with storage.conf (and everything works fine), but map.conf leads to the following error:

Reading the configuration file, at line 1
>>> 'include /etc/redis/ideal.conf'
Bad directive or wrong number of arguments
failed

Version of redis is 2.2.

Where did I go wrong?

like image 358
Pavel Kirienko Avatar asked Feb 20 '23 02:02

Pavel Kirienko


1 Answers

Sorry guys.

I was using different instances of Redis.

Instance for storage.conf was launched by /usr/local/bin/redis-server, but map.conf launched by /usr/bin/redis-server; second one is broken.

Thank you anyway.

like image 197
Pavel Kirienko Avatar answered Mar 15 '23 22:03

Pavel Kirienko