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

启动redis:  redis-server ../redis.conf

redis启动成功后

执行命令行redis-cli报:Could not connect to Redis at 127.0.0.1:6379: Connection refused错误

那是因为redis安装路径下的redis.conf文件配置未修改:

redis.conf文件中:

将daemonize no 修改为 daemonize yes

再输入 redis-server /usr/local/src/redis-4.0.10/redis.conf

redis-cli

就OK啦!

原文地址:https://www.cnblogs.com/qixiaohua/p/9305726.html

时间: 2024-10-07 22:51:38

Could not connect to Redis at 127.0.0.1:6379: Connection refused的相关文章

Redis 服务端配置——Could not connect to Redis at 127.0.0.1:6379: Connection refused

[[email protected] 桌面]# redis-cli Could not connect to Redis at 127.0.0.1:6379: Connection refused Could not connect to Redis at 127.0.0.1:6379: Connection refused not connected> exit [[email protected] 桌面]# redis-server /etc/redis.conf [[email prote

Redis连接时报错:Could not connect to Redis at 127.0.0.1:6379: Connection refused

Could not connect to Redis at 127.0.0.1:6379: Connection refused [[email protected] bin]# redis-cli Could not connect to Redis at 127.0.0.1:6379: Connection refused [[email protected] /]# redis-server /etc/redis.conf [[email protected] /]# redis-cli

Could not connect to Redis at 192.168.0.129:6379: Connection refused

在虚拟机上(CentOS 6.7)本机连接自己的redis [[email protected] bin]# ./redis-cli -h 192.168.0.129 -p 6379 Could not connect to Redis at 192.168.0.129:6379: Connection refused Could not connect to Redis at 192.168.0.129:6379: Connection refused not connected> 查看配置文

我遇到的错误curl: (7) Failed to connect to 127.0.0.1 port 1086: Connection refused

今天我用curl命令,无论如何都是出现: curl: (7) Failed to connect to 127.0.0.1 port 1086: Connection refused 找了很久,不知道是什么问题,后来发现curl有一个配置文件: p.p1 { margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #000000; background-color: #ffffff } span.s1 { } ~/.curlrc 里

git时 Failed to connect to 127.0.0.1 port 1080: Connection refused

在公司换了一台电脑之后发现git clone 和 npm install都失败,报错为 fatal: unable to access 'https://github.com/netease-im/NIM_PC_UIKit/': Failed to connect to 127.0.0.1 port 1080: Connection refused 产生原因:本地使用了端口代理,导致连接失败 解决办法:在本机全局搜索 gitconfig 打开文件,删除有关proxy的所有行,只删除与 proxy

curl: (7) Failed to connect to 127.0.0.1 port 1086: Connection refused

今天我用curl命令,无论如何都是出现: 找了很久,不知道是什么问题,后来发现curl有一个配置文件: p.p1 { margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #000000; background-color: #ffffff } span.s1 { } ~/.curlrc 里面的内容是: socks5 = "127.0.0.1:1086" 注释掉就好了. p.p1 { margin: 0.0px 0.0p

Cobbler安装Linux系统时报错 curl:(7)Failed connect to 10.0.0.201:80;Connection refused

问题原因: 其他涉及到http服务的端口全部都改成了81端口.只有 /etc/cobbler/settings 这里没有改. [[email protected]01 ~/]#grep -E "port: 81|server: 10" /etc/cobbler/settings http_port: 80 next_server: 10.0.0.201 server: 10.0.0.201 把 http_port: 80 改成81 再重启cobbler. cobbler sync就可以

redis连接错误:Could not connect to Redis at 127.0.0.1:6379: Connection refused

在启动redis之后,想要停止服务的时候,发现了这个错误: 原因: 在之前将redis前台启动的时候,是没有pid文件的,之后我将redis改成后台启动,但是没有将redis进程杀掉. 解决方法: 将redis进程杀掉就可以了. 原文地址:https://www.cnblogs.com/allenyip/p/10927105.html

bind 0.0.0.0的作用是什么呢?

背景描述: 今天在看redis的内容,看到同事在配置文件中将bind配置为0.0.0.0进行监听,不明白什么意思就查询了下,在此记录下. 解释: 0.0.0.0在服务器的环境中,指的就是服务器上所有的ipv4地址,如果机器上有2个ip 192.168.30.10 和 10.0.2.15,redis在配置中,如果配置监听在0.0.0.0这个地址上,那么,通过这2个ip地址都是能够到达这个redis服务的.同时呢,访问本地的127.0.0.1也是能够访问到redis服务的. 测试验证: 1.绑定到0