阿里云Ubuntu16.04 启动redis报错

今天早上启动redis的时候报错:

root@stu:~# /etc/init.d/redis-server start
[....] Starting redis-server (via systemctl): redis-server.serviceJob for redis-server.service failed because a configured resource limit was exceeded. See "systemctl status redis-server.service" and "journalctl -xe" for details.
 failed!
root@stu:~# systemctl status redis-server.service
● redis-server.service - Advanced key-value store
   Loaded: loaded (/lib/systemd/system/redis-server.service; enabled; vendor preset: enabled)
   Active: inactive (dead) (Result: resources) since Sun 2018-03-25 16:27:26 CST; 37s ago
     Docs: http://redis.io/documentation,
           man:redis-server(1)
  Process: 1699 ExecStopPost=/bin/run-parts --verbose /etc/redis/redis-server.post-down.d (code=exited, status=0/SUCCESS)
  Process: 1694 ExecStop=/bin/kill -s TERM $MAINPID (code=exited, status=0/SUCCESS)
  Process: 1688 ExecStop=/bin/run-parts --verbose /etc/redis/redis-server.pre-down.d (code=exited, status=0/SUCCESS)
  Process: 1682 ExecStartPost=/bin/run-parts --verbose /etc/redis/redis-server.post-up.d (code=exited, status=0/SUCCESS)
  Process: 1678 ExecStart=/usr/bin/redis-server /etc/redis/redis.conf (code=exited, status=0/SUCCESS)
  Process: 1672 ExecStartPre=/bin/run-parts --verbose /etc/redis/redis-server.pre-up.d (code=exited, status=0/SUCCESS)
 Main PID: 1400 (code=exited, status=0/SUCCESS)

Mar 25 16:27:26 stu systemd[1]: redis-server.service: Service hold-off time over, scheduling restart.
Mar 25 16:27:26 stu systemd[1]: Stopped Advanced key-value store.
Mar 25 16:27:26 stu systemd[1]: redis-server.service: Start request repeated too quickly.
Mar 25 16:27:26 stu systemd[1]: Failed to start Advanced key-value store.
Mar 25 16:27:30 stu systemd[1]: redis-server.service: Start request repeated too quickly.
Mar 25 16:27:30 stu systemd[1]: Failed to start Advanced key-value store.

早上启动前,首先启动了rinetd,打开了rinetd的配置文件,发现这里已经绑定了6379端口:

0.0.0.0 6379 127.0.0.1 6379
logfile /var/log/rinetd.log

由于已经绑定6379,所以一直报错,索性将redis的配置改了

vim /etc/redis/redis.conf
port 6379

改为

port 6380

登陆时只需要指定端口即可

redis-cli -a "password" -h xx.xx.xx.xx -p 6380

其实也可以修改rinetd的配置,不过我这里另有用途所以就改本机端口了。


你可能感兴趣的:(阿里云Ubuntu16.04 启动redis报错)