2015-10-05 22 views
5

我通過在終端輸入這個開始在Ubuntu上的Redis服務器綁定地址:$ redis的服務器Redis的服務器在ubuntu14.04:已在使用

這將導致以下>http://paste.ubuntu.com/12688632/

aruns ~ $ redis-server 
27851:C 05 Oct 15:16:17.955 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf 
27851:M 05 Oct 15:16:17.957 # You requested maxclients of 10000 requiring at least 10032 max file descriptors. 
27851:M 05 Oct 15:16:17.957 # Server can't set maximum open files to 10032 because of OS error: Operation not permitted. 
27851:M 05 Oct 15:16:17.958 # Current maximum open files is 4096. maxclients has been reduced to 4064 to compensate for low ulimit. If you need higher maxclients increase 'ulimit -n'. 
27851:M 05 Oct 15:16:17.958 # Creating Server TCP listening socket *:6379: bind: Address already in use 

如何我可以解決這個問題嗎,它有任何手動或自動化的過程來解決這個綁定。

回答

7

對我來說,很多問題後,這解決了我的問題:

[email protected]:/home/ ps -aux | grep redis 
    redis  3044 0.0 0.0 37000 8780 ?  Ssl 14:59 0:00 /usr/bin/redis-server *:6379 

發現的Redis後,殺了它!

[email protected]:/home# sudo kill -9 3044 
[email protected]:/homek# sudo service redis-server restart 
Stopping redis-server: redis-server. 
Starting redis-server: redis-server. 
[email protected]:/home# sudo service redis-server status 
redis-server is running 
19
$ ps aux | grep redis 

查找其上運行的。在我的情況下,端口..

MyUser 8821 0.0 0.0 2459704 596 ?? S 4:54PM 0:03.40 redis-server *:6379 

然後關閉端口手動

$ kill -9 8821 

重新運行Redis的

$ redis-server 
相關問題