DENIED Redis is running in protected mode报错解决办法

2023-05-16

如下所示,程序连接redis报错,根据错误信息,redis运行在受保护模式,需要redis命令行下作设置:config set protected-mode no。


redis.clients.jedis.exceptions.JedisDataException: 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 loopback 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 '--protected-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.
	at redis.clients.jedis.Protocol.processError(Protocol.java:123)
	at redis.clients.jedis.Protocol.process(Protocol.java:157)
	at redis.clients.jedis.Protocol.read(Protocol.java:211)
	at redis.clients.jedis.Connection.readProtocolWithCheckingBroken(Connection.java:297)
	at redis.clients.jedis.Connection.getIntegerReply(Connection.java:222)
	at redis.clients.jedis.Jedis.incrBy(Jedis.java:503)  

复现问题,通过telnet命令检测redis端口6379

设置protected-mode no

再次通过telnet命令检测redis端口6379,没有出现访问异常。

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

DENIED Redis is running in protected mode报错解决办法 的相关文章

随机推荐

  • TiDB在Centos7上通过源码编译安装

    这里难以编译安装的是tikv tidb的三大部分tidb pd tikv中tidb pd均是采用go语言编写 xff0c 安装go语言包即可编译 xff0c 唯独tikv是采用rust语言写的 xff0c 他的编译是最复杂的 而且编译环境非
  • Cloudera Manager 5.12.0图文详解安装过程

    这里介绍的是cdh5的离线安装方式 xff0c 需要的文件提前准备好 xff0c 安装过程会快一些 安装前提 xff1a 机器配置内存一定要高 xff0c 我这里安装的虚拟机均是redhat7 xff1a 内存分别是6G 4G 4G 准备的
  • Failed to get D-Bus connection: Operation not permitted

    docker容器centos7中 xff0c 通过systemctl start service出现下错误 Failed to get D Bus connection Operation not permitted docker中的容器启
  • C++中如何求数组长度

    C 43 43 中没有直接提供求数组长度的方法 xff0c 提供了sizeof begin end 等方法 xff0c 可以供求数组长度使用 可以通过两种方式来求数组长度 xff0c 这里使用模版类 一个是使用sizeof 做除法 xff0
  • IDEA+scala插件开发spark程序

    spark由scala语言编写 xff0c 开发spark程序 xff0c 自然也少不了scala环境 xff0c 这里介绍如何利用Intellij IDEA开发spark 1 环境准备 jdk scala idea这些对于本文来说都已经默
  • hadoop-3.0.1源码编译需要注意的事项

    这次尝试了一下源码编译最新的hadoop3 0 1 xff0c 发现了几个和原来不太一样的地方 记录下来 xff1a 1 需要的jdk不再是原来的1 7 xff0c 直接jdk1 8就编译通过了 xff1b 2 以前安装需要安装编译依赖cm
  • hadoop-3.0.1单节点安装部署

    hadoop 3 0 1编译上和原来有不同的地方 xff0c 部署时 xff0c 也有一些需要注意的地方 安装部署过程一笔带过 xff1a a 设置免秘钥登录 b 设置jdk环境变量 c 配置编译好的hadoop环境变量 xff0c HAD
  • Dll动态链接库创建与隐式链接方式使用

    C 43 43 动态链接库的背景 xff1a windows操作系统诞生以来 xff0c dll就作为win操作系统的基础 xff0c 通常情况下dll不能直接运行 xff0c 也无法接收消息 xff0c 只能供其他可执行程序或者dll来调
  • def模块定义方式创建动态链接库与动态加载使用dll

    前面介绍了通过宏定义 declspec dllexport 的方式创建动态链接库 xff0c 需要定义头文件和宏 xff0c 定义函数时需要使用宏定义 xff0c 这种方式过于繁琐 xff0c 这里介绍使用模块定义文件的方式创建动态链接库
  • Echarts-图表根据值的不同展示成不同的颜色

    series name 39 直接访问 39 type 39 bar 39 barWidth 39 60 39 data 10 52 200 334 390 330 220 itemStyle normal color function p
  • error: no default toolchain configured

    当我们在windows上通过msi方式安装过rust之后 xff0c 运行rustc或者cargo命令行命令时 xff0c 出现如题所示的错误 stackoverflow上有一个issue 说过这个问题 最后的解决办法是通过rustup命令
  • hive启动报错汇总以及解决办法

    1 Relative path in absolute URI system java io tmpdir 7D 7Bsystem user name 7D p span style font size 12px 需要将hive site
  • Hive使用JsonSerDe格式化json数据

    hive默认使用分隔符如空格 xff0c 分号 xff0c 34 34 xff0c 制表符 t来格式化数据记录 xff0c 对于复杂数据类型如json nginx日志等 xff0c 就没有办法拆分了 xff0c 这时候需要更加强大的SerD
  • ClassNotFoundException: org.apache.spark.sql.hive.thriftserver.SparkSQLCLIDriver解决办法

    我们通过源码编译的spark 2 3 0来启动spark sql进行sql操作 xff0c 结果出现如下错误 xff1a Spark assembly has been built with Hive including Datanucle
  • centos7源码编译安装lua:lua5.1升级lua5.3

    我们通过yum安装的lua默认是5 1版本 xff0c 如果不符合我们有的程序需要 xff0c 可以通过源码编译安装最新版lua 过程记录如下 下载 gt 解压 gt 编译三步曲 wget http www lua org ftp lua
  • linux下通过md5sum和sha1sum来校验下载文件的正确性

    在linux下 xff0c 我们经常通过wget curl等命令在某官方网站下载一个zip或者tar gz格式文件 xff0c 有时候 xff0c 我们不会去关注这个下载文件后面的md5值和sha1值 xff0c 这两个值其实有很大的用处
  • centos7源码安装git-2.3.0踩坑记录

    下载源码 gt 解压 gt 编译三步曲 我这里下载的是xz格式的文件 xff0c 第一步需要xz解压为tar格式文件 xff0c 然后通过tar xf命令解压 wget https mirrors edge kernel org pub s
  • adb与aapt获取安卓手机app的versionCode

    adb命令通常可以查看app包名以及app包的位置 xff0c 但是无法获取详细信息 xff0c 如版本号 这里结合aapt可执行程序来获取app的versionCode 这里以新浪微博app为例 xff0c 另外 xff0c 这里介绍的过
  • 我的第一个Android WebView实例

    以前做前端开发的时候 xff0c 经常遇到需要把H5页面直接在app里面打开的情况 xff0c 比如论坛 抽奖活动 秒杀活动等 xff0c 将H5嵌入WebView的做法 xff0c 可以减少客户端开发 xff0c 升级等 xff0c 小功
  • DENIED Redis is running in protected mode报错解决办法

    如下所示 xff0c 程序连接redis报错 xff0c 根据错误信息 xff0c redis运行在受保护模式 xff0c 需要redis命令行下作设置 config set protected mode no redis clients