1、在centos7下搭建redis5,在启动redis节点时,一直启动不起来,查看log文件,报错信息如下:
4208:C 03 Mar 16:13:03.321 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
4208:C 03 Mar 16:13:03.322 # Redis version=4.0.6, bits=64, commit=00000000, modified=0, pid=4208, just started
4208:C 03 Mar 16:13:03.322 # Configuration loaded
4209:M 03 Mar 16:13:03.323 * Increased maximum number of open files to 10032 (it was originally set to 1024).
4209:M 03 Mar 16:13:03.323 # Creating Server TCP listening socket 114.67.72.240:7001: bind: Cannot assign requested address
2、执行命令
# 设置“open files”数量
ulimit -n 10032
3、如现设置"open files"数量后,节点还起不起来,修改节点目录下的redis.conf文件内容如下:
bind 192.168.1.21
改为
bind 127.0.0.1