2011-09-14 14 views
30

używam wersji Redis 2.2.13port serwera Redis już w użyciu

[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 

Więc wykonaj powyższe instrukcje i spróbuj

redis-server $HOME/redis/redis.conf 

Który daje mi następujący błąd:

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

Plik ma następujące komentarze:

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

rozwiązać

+0

Co wersji używasz? – seppo0010

+0

wersja 2.2.13, myślę, że rozwiązał problem teraz! użyłem następujących, aby upewnić się, biegałam poprawny plik: $ HOME/Redis/src/Redis-serwer $ HOME/Redis/redis.conf – Jack

Odpowiedz

82

miałem ten sam problem, ale zapomniałem, że Redis ustąpi. Jeśli pojawi się ten błąd, spróbuj tego polecenia:

redis-cli ping 

jeśli masz PONG jako odpowiedź, następnie Redis pracuje, a port jest w użyciu, przez Redis.

9

Musi być inna wersja zainstalowanego na moim komputerze serwera Redis, wpadłem go za pomocą następującego polecenia:

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

Wszystko wydaje się działać.

+0

/root Redis/src/Redis-server /: Nie ma takiego pliku lub katalogów – vishal

47

A po uruchomieniu redis-cli ping i uzyskanie pozytywnej odpowiedzi, wystarczy uruchomić redis-cli shutdown

+0

Jego dając mi błąd - (błąd) ERR błędy próby wyłączenia. Sprawdzić logi. –

0

spróbuj użyć innego portu i ustawić go daemonize ./redis-server --port 6379 --daemonize yes

Powiązane problemy