suchen

Heim  >  Fragen und Antworten  >  Hauptteil

服务器重启后Redis就连接不上了

redis-server /usr/redis/redis.conf

                _._                                                  
           _.-``__ ''-._                                             
      _.-``    `.  `_.  ''-._           Redis 2.8.3 (00000000/0) 64 bit
  .-`` .-".  "\/    _.,_ ''-._                                   
 (    '      ,       .-`  | `,    )     Running in stand alone mode
 |`-._`-...-` __...-.``-._|'` _.-'|     Port: 6379
 |    `-._   `._    /     _.-'    |     PID: 2658
  `-._    `-._  `-./  _.-'    _.-'                                   
 |`-._`-._    `-.__.-'    _.-'_.-'|                                  
 |    `-._`-._        _.-'_.-'    |           http://redis.io        
  `-._    `-._`-.__.-'_.-'    _.-'                                   
 |`-._`-._    `-.__.-'    _.-'_.-'|                                  
 |    `-._`-._        _.-'_.-'    |                                  
  `-._    `-._`-.__.-'_.-'    _.-'                                   
      `-._    `-.__.-'    _.-'                                       
          `-._        _.-'                                           
              `-.__.-'                                               

[2658] 24 Mar 19:55:30.836 # Server started, Redis version 2.8.3
[2658] 24 Mar 19:55:30.836 * The server is now ready to accept connections on port 6379

redis-cli

Could not connect to Redis at 127.0.0.1:6379: Connection refused
not connected> 

今天下午重启了一下服务器,然后就这样了,求教怎么解决?

某草草某草草2792 Tage vor1026

Antworte allen(1)Ich werde antworten

  • 给我你的怀抱

    给我你的怀抱2017-04-28 09:06:03

    你是执行 redis-server /usr/redis/redis.conf 后结束命令再执行 redis-cli 吗 这样

    得让redis-server 在后台运行

    Antwort
    0
  • StornierenAntwort