2011-09-14 20 views
30

Sto utilizzando la versione Redis 2.2.13porta del server Redis già in uso

[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 

Così ho seguire le istruzioni di cui sopra e cercare

redis-server $HOME/redis/redis.conf 

che mi dà il seguente errore:

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

Il file ha i seguenti commenti:

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

Risolto

+0

Quale versione stai usando? – seppo0010

+0

versione 2.2.13, penso di aver risolto il problema ora! Ho usato quanto segue per assicurarmi che stavo correndo il file corretto: $ HOME/redis/src/redis-server $ HOME/redis/redis.conf – Jack

risposta

82

Ho avuto lo stesso problema, ma ho dimenticato che persiste redis. Se si ottiene questo errore, provate questo comando:

redis-cli ping 

se si ottiene PONG come una risposta, poi Redis è in esecuzione, e la porta è in uso, per Redis.

9

Ci deve essere un'altra versione del server Redis installato sulla mia macchina, ho fatto funzionare con il seguente comando:

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

Tutto sembra funzionare.

+0

/root/redis/src/redis-server: Nessun file simile o directory – vishal

47

E dopo l'esecuzione redis-cli ping e ottenere una risposta positiva, è sufficiente eseguire redis-cli shutdown

+0

Mi dà errore - Errori ERR (errore) che tentano di ARRESTARE. Controlla i registri. –

0

Prova Usa un'altra porta e impostarlo eseguito come demone ./redis-server --port 6379 --daemonize yes

Problemi correlati