redis 3.2 报错 Redis protected-mode 配置文件没有真正启动
(error) DENIED Redis is running in protected mode because protected mode is enabled
- Redis protected-mode 是3.2 之后加入的新特性,在Redis.conf的注释中,我们可以了解到,他的具体作用和启用条件
(error) DENIED Redis is running in protected mode because protected mode is enabled, no bind address was specified, no authentication password is requested to clients. In this mode connections are only accepted from the lookback interface. If you want to connect from external computers to Redis you may adopt one of the following solutions: 1) Just disable protected mode sending the command 'CONFIG SET protected-mode no' from the loopback interface by connecting to Redis from the same host the server is running, however MAKE SURE Redis is not publicly accessible from internet if you do so. Use CONFIG REWRITE to make this change permanent. 2) Alternatively you can just disable the protected mode by editing the Redis configuration file, and setting the protected mode option to 'no', and then restarting the server. 3) If you started the server manually just for testing, restart it with the --portected-mode no option. 4) Setup a bind address or an authentication password. NOTE: You only need to do one of the above things in order for the server to start accepting connections from the outside.
是说处于保护模式,只能本地链接,我们需要修改配置文件../redis.conf
1)打开配置文件把下面对应的注释掉
# bind 127.0.0.1
2)Redis默认不是以守护进程的方式运行,可以通过该配置项修改,使用yes启用守护进程,设置为no
daemonize no
3)保护模式
protected-mode no
4)最后关键的是:
没反应应该是你启动服务端的时候没有带上配置文件。你可以./redis-server redis.conf
你配置好了,但要重新启动redis,如果还是报一样的错误,很可能是没有启动到配置文件,所以需要真正的和配置文件启动需要:
在redis.conf文件的当前目录下:
$ redis-server redis.conf
如果还是所某个端口已在使用,那么可能是有 后台程序在占用该端口,需要kill 掉该程序,重新带上配置文件。./redis-server redis.conf启动。
将含有”redis”关键词的进程杀死:
$ ps -ef | grep redis | awk ‘{print $2}’ | xargs kill -9
原文地址:http://blog.csdn.net/Agly_Clarlie/article/details/52251746
后记
第一安装redis,直接上了最新的3.2.8 java代码测试jedis连接的时候,遇到了最初的报错,没有配置远程连接,没有配置protected-mode,没有启动配置文件。甚至还有在不同路径启动redis-server。
新同学注意,每次启动要在同一个路径启动redis-server,你在哪个路径启动的,存储的文件会在该目录下生成。
redis 3.2 报错 Redis protected-mode 配置文件没有真正启动的更多相关文章
- redis集群报错
写入redis集群报错:(error) MOVED 6918 解决方法:redis-cli -c -p 7001 -h 10.0.0.104
- laravel5.7的redis配置,一直报错Class 'Predis\Client' not found
laravel5.7的redis配置,一直报错Class 'Predis\Client' not found 首先我检查了配置,和composer 都没有错,用原生的redis也可以正常连接和读写. ...
- php操作redis出现不报错就退出
金乐园项目 php操作redis出现不报错就退出 死活找不出原因是因为下面这句话导致: 原因igbinary扩展没有装上 $options[\Redis::OPT_SERIALIZER] = ...
- Oracle报错ORA-16433非归档丢失redo无法启动的恢复过程
[案例]Oracle报错ORA-16433非归档丢失redo无法启动的恢复过程 转惜纷飞 今天ML的群中女神和travel在纠结一个恢复的问题,11.2.0.3版本,非归档,大概是rm掉current ...
- 【Redis】【报错】redis.exceptions.ResponseError: DENIED Redis is running in protected mode
(一)报错前提 写flask 项目的时候,因为连接了私有云中的redis地址指定了IP host,启动项目的时候报错 (二)解决方法 首先要切换到root用户 root@:/etc/redis# pw ...
- redis集群报错:(error) CLUSTERDOWN Hash slot not served
百度上坑太多,如果你遇到搭建redis集群的时候出现这个错误在百度上找到解决办法基本上都是坑. 首先集群搭建完成后,你肯定去登陆redis进行测试 1.redis01/redis-cli -h &qu ...
- max number of clients reached Redis测试环境报错
现象:测试服务是去redis循环取数据,早上发现服务挂了,手动登陆redis 无法输入命令,报错:max number of clients reached Redis
- windows下Redis主从复制配置(报错:Invalid argument during startup: unknown conf file parameter : slaveof)
主从复制配置中的遇到的异常: Invalid argument during startup: unknown conf file parameter : slaveof 把Redis文件夹复制两份 ...
- 【redis数据库学习】用JAVA连接redis数据库各种报错
最近项目中,需要用到redis数据库,然后使用Jedis让JAVA连接redis. 首先,安装redis数据库,参考的是:http://www.runoob.com/redis/redis-insta ...
随机推荐
- 记录UITextField删除状态
self.testTextField.leftView = [[UIView alloc] initWithFrame:CGRectMake(, , , )]; self.testTextField. ...
- Linux的CentOS7系统下配置LNMP
友情提示:在执行以下操作之前,请确保您已经安装了centos7,因为以下所有操作均是在centos7下操作完成的. 1.首先要停掉本机自带的防火墙,再配置iptables,开放21/22/80/808 ...
- 这是一款可以查阅Github上的热门趋势的APP
随时查阅当前Github上的热门趋势.使用Material Design设计风格,和流行的MVP+Retrofit+RxJava框架.数据抓取自https://github.com/trending ...
- RadAsm使用
RadASM 命令行语法 DelCheck,Out,Command,F1[,F2[,Fx]] DelCheck 执行命令前要清除的文件,不使用时设为0 Out 一般指定为O,所有信 ...
- 利用Flume采集IIS日志到HDFS
1.下载flume 1.7 到官网上下载 flume 1.7版本 2.配置flume配置文件 刚开始的想法是从IIS--->Flume-->Hdfs 但在采集的时候一直报错,无法直接连接到 ...
- JS 基础学习随想
2012年就已经接触过了js,给我的印象:这是一门谈不上复杂的语言.大概这就是所谓的学的越浅,用的越少,觉得自己会的东西好像得更多吧!开始做基础练习题的时候觉得好像都十分简单.可是后来在做到对象数组的 ...
- Finding distance between two curves
http://answers.opencv.org/question/129819/finding-distance-between-two-curves/ 问题: Hello, Im trying ...
- iOS开发——设计模式那点事
单例模式(Singleton) 概念:整个应用或系统只能有该类的一个实例 在iOS开发我们经常碰到只需要某类一个实例的情况,最常见的莫过于对硬件参数的访问类,比如UIAccelerometer.这个类 ...
- jwplayer 禁止视频的快进,但是可以后退(已实现)
一直在研究.net 的视频播放,最近做起了jwplayer,然后项目要求是视频不能快进,但是可以重复观看已经看过的视频资源. 很简单 在标签<script> 中定义两个变量 var max ...
- PHP 端口号 是否 被占用 以及 解决方法
开始---->运行---->cmd,或者是window+R组合键,调出命令窗口{PHP详尽配置环境:http://www.cnblogs.com/ordinaryk/p/6496398.h ...