Подтвердить что ты не робот

Порт сервера Redis уже используется

Я использую Redis версии 2.2.13

[email protected]:~/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

Итак, я следую приведенным выше инструкциям и попробую

redis-server $HOME/redis/redis.conf

Который дает мне следующую ошибку:

*** FATAL CONFIG FILE ERROR ***
Reading the configuration file, at line 135
>>> 'slave-serve-stale-data yes'
Bad directive or wrong number of arguments

В файле есть следующие комментарии:

# 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.

решаемые

4b9b3361

Ответ 1

У меня была такая же проблема, но я забыл, что redis сохраняется. Если вы получите эту ошибку, попробуйте выполнить следующую команду:

redis-cli ping

если вы получите PONG в качестве ответа, то Redis работает, а порт используется Redis.

Ответ 2

И после запуска redis-cli ping и получения положительного ответа просто запустите redis-cli shutdown

Ответ 3

На моей машине должна быть установлена ​​другая версия сервера redis, я запустил ее, выполнив следующую команду:

$HOME/redis/src/redis-server $HOME/redis/redis.conf

Кажется, что все работает.

Ответ 4

попробуйте использовать другой порт и установите его daemonize ./redis-server --port 6379 --daemonize yes