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

1.找到redis.conf 并修改 daemonize no 为 daemonize yes ,这样就可以默认启动就后台运行

[root@ trade01  conf.d]# vi /etc/redis.conf

2.开启客户端要确保服务端启动

[root@ trade01 src]# ./redis-server ../etc/redis.conf

现在就可以正常访问了

[root@ trade01 src]# ./redis-cli

redis 127.0.0.1:6379>set foo bar

OK
127.0.0.1:6379> get foo
"bar"
127.0.0.1:6379>

如果还是报错

查看配置文件,发现bind是写成:

bind 127.0.0.1

修改配置为

bind  192.168.0.129

192.168.0.129是redis所在的服务器的地址

再次启动

(如果把 bind 127.0.0.1 修改为了 192.168.0.129 启动若是不成功 就把 127.0.0.1加上去

两个地址之间要空格隔开)

在 Linux redis 验证交互连接过程中遇到 redis Could not connect to Redis at 127.0.0.1:6379: Connection refused 的解决方法的更多相关文章

  1. Putty连接虚拟机Centos出现:Network error:Connection refused的解决方法

    转自:http://www.bcoder.cn/17251.html 我和很多人一样都是linux菜鸟,但是呢又对此很是感兴趣,不折腾就是不爽: 我下载了centos 6.4安装好在VMware 虚拟 ...

  2. adb通过TCP/IP连接提示 unable to connect to *, Connection refused的解决方法

    通过串口连接板子进入命令行,然后执行: su setprop service.adb.tcp.port 5555 stop adbd start adbd

  3. 【Redis】启动redis提示Could not connect to Redis at 127.0.0.1:6379: Connection refused 已解决

    1.配置redis.conf文件,将daemonize no 为 daemonize yes即可(让redis作为守护进程运行)

  4. [Redis-CentOS7]Redis打开远程连接(十) Could not connect to Redis at 127.0.0.1:6379: Connection refused

    通过网络无法访问Redis redis-cli 172.16.1.111 Could not connect to Redis at 127.0.0.1:6379: Connection refuse ...

  5. Linux 出现telnet: 127.0.0.1: Connection refused错误解决办法

    Linux 出现telnet: connect to address 127.0.0.1: Connection refused错误解决办法 没有xinetd服务: 1./etc/init.d目录中放 ...

  6. 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. ...

  7. Redis配置主从时报错“Could not connect to Redis at 192.168.0.50:6379: Connection refused not connected>”

    配置Redis主从时,修改完从节点配置文件,然后报错 [root@Rich七哥-0-50 redis]# /opt/redis/redis-cli -h 192.168.0.50 Could not ...

  8. redis.exceptions.ConnectionError: Error 111 connecting to localhost:6379. Connection refused.

    $ pip install redis>>> import redis>>> conn = redis.Redis()>>> conn.keys( ...

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

    [root@centoszang 桌面]# redis-cli Could : Connection refused Could : Connection refused not connected& ...

随机推荐

  1. 前端学习笔记之JavaScript

    JavaScript概述 JavaScript的历史 1992年Nombas开发出C-minus-minus(C--)的嵌入式脚本语言(最初绑定在CEnvi软件中),后将其改名ScriptEase(客 ...

  2. BZOJ2209: [Jsoi2011]括号序列

    传送门 splay练习. 考虑把括号序列转化成类似于区间最大/最小值的情况. 显然我们可以知道括号序列消完的情况肯定是$a$个)和$b$个(,那么把这些括号全部合法化的代价显然就是$\frac{a+1 ...

  3. OpenVAS应用实例

    OpenVAS应用实例 首先打开Metasploitables Linux,输入ifconfig查看本机ip地址为192.168.200.125 使用kali linux ping一下Metasplo ...

  4. Migrating from Spring 3 to Spring 4 - org.springframework.scheduling.quartz.CronTriggerBean

    I'm trying to migrate from spring 3.0.5 to spring 4.1.X . Spring 3 has Class named as "org.spri ...

  5. git将多个commit合并成一个新的commit

    问题: 有以下commit: 323udd ede234 6e7s6e 要合并第一个和第二个commit 方法有二: 方法一 使用git rebase -i hash-id,-i表示以交互模式进行co ...

  6. Python学习札记(二十六) 函数式编程7 修饰器

    修饰器 NOTE 1.函数对象有一个__name__属性,可以拿到函数的名字: #!/usr/bin/env python3 def now(): print('2017/2/19') def mai ...

  7. Android 自定义注解(Annotation)

    现在市面上很多框架都有使用到注解,比如butterknife库.EventBus库.Retrofit库等等.也是一直好奇他们都是怎么做到的,注解的工作原理是啥.咱们能不能自己去实现一个简单的注解呢. ...

  8. Java Spring-AspectJ

    2017-11-10 21:25:02 Spring的AspectJ的AOPAspectJ 是一个面向切面的框架,它扩展了 Java 语言. AspectJ 定义了 AOP 语法所以它有一个专门的编译 ...

  9. Spring 及 SpringMVC的web.xml配置详解

    出处http://blog.csdn.net/u010796790 1.spring 框架解决字符串编码问题:过滤器 CharacterEncodingFilter(filter-name) 2.在w ...

  10. Spring 调度任务@scheduled学习总结

    官网Api:http://docs.spring.io/spring/docs/current/spring-framework-reference/html/scheduling.html#sche ...