I'm using Redis version 2.2.13
jack@ubuntu:~/redis$ src/redis-server [23900] 14 Sep 14:28:52 # Warning: no config file specified, using the default config. In order to specify a config file use 'redis-server /path/to/redis.conf' [23900] 14 Sep 14:28:52 # Opening port: bind: Address already in use
So I follow the above instructions and try
redis-server $HOME/redis/redis.conf
Which gives me the following error:
*** FATAL CONFIG FILE ERROR *** Reading the configuration file, at line 135 >>> 'slave-serve-stale-data yes' Bad directive or wrong number of arguments
The file has the following comments:
# When a slave lost the connection with the master, or when the replication # is still in progress, the slave can act in two different ways: # # 1) if slave-serve-stale-data is set to 'yes' (the default) the slave will # still reply to client requests, possibly with out of data data, or the # data set may just be empty if this is the first synchronization. # # 2) if slave-serve-stale data is set to 'no' the slave will reply with # an error "SYNC with master in progress" to all the kind of commands # but to INFO and SLAVEOF.
How can I resolve this issue?
Configure Server and Ports By default, the Redis server runs on TCP Port 6379.
You can edit the Redis server configuration file and specify the startup port to make the changes permanent. Locate the entry as shown below and change the value to your desired port. Once you set your desired port, save and close the file. Next, restart the Redis service to apply the changes.
I had this same problem, but I forgot that redis persists. If you get this error, try this command:
redis-cli ping
if you get PONG as a response, then Redis is running, and the port is in use, by Redis.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With