Exception in thread "main" 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. 
 
以上是报错信息,说是保护模式不允许连接。找到服务器,找到 redis-cli文件,这是服务器上redis的命令行执行文件
$ find / -name redis-cli  
执行命令 config set protected-mode "no" 
ok 后重试问题解决

redis无法连接的更多相关文章

  1. redis运用连接池报错解决

    redis使用连接池报错解决redis使用十几小时就一直报异常 redis.clients.jedis.exceptions.JedisConnectionException: Could not g ...

  2. Redis高级实践之————Redis短连接性能优化

    摘要: 对于Redis服务,通常我们推荐用户使用长连接来访问Redis,但是由于某些用户在连接池失效的时候还是会建立大量的短连接或者用户由于客户端限制还是只能使用短连接来访问Redis,而原生的Red ...

  3. PHP中使用Redis长连接笔记

    pconnect函数声明 其中time_out表示客户端闲置多少秒后,就断开连接.函数连接成功返回true,失败返回false: pconnect(host, port, time_out, pers ...

  4. 阿里云Redis公网连接的解决办法

    https://help.aliyun.com/document_detail/43850.html ECS Windows 篇 目前云数据库 Redis 需要通过 ECS 的内网进行连接访问,如果您 ...

  5. Redis偶发连接失败案例分析

    [作者] 张延俊:携程技术保障中心资深DBA,对数据库架构和疑难问题分析排查有浓厚的兴趣. 寿向晨:携程技术保障中心高级DBA,主要负责携程Redis及DB的运维工作,在自动化运维,流程化及监控排障等 ...

  6. 解决redis远程连接不上的问题

    解决redis远程连接不上的问题 redis现在的版本开启redis-server后,redis-cli只能访问到127.0.0.1,因为在配置文件中固定了ip,因此需要修改redis.conf(有的 ...

  7. redis的连接方法|连接池|操作

    1.先看下redis的连接 import redis # 连接服务端 r = redis.Redis(host="127.0.0.1",port=6379) #获取所有的key值 ...

  8. 双十一问题:在洪峰数据来临的瞬间,redis出现连接超时异常

    如图所示,在大数据量来袭时,部署服务的机器中存在一台机器突然出现该报错,并且一直持续下去,直到洪峰数据结束也未恢复,重启机器后该问题解决 原因分析: 在请求redis过多时,因为未及时的释放掉redi ...

  9. nodejs + redis/mysql 连接池问题

    nodejs + redis/mysql 连接池问题 需不需要连接池 连接池的作用主要是较少每次临时建立连接所带来的开销.初步一看,nodejs运行单线程上,它不能同时使用多个连接,乍一看是不需要连接 ...

  10. Springboot监控之一:SpringBoot四大神器之Actuator之2--spring boot健康检查对Redis的连接检查的调整

    因为项目里面用到了redis集群,但并不是用spring boot的配置方式,启动后项目健康检查老是检查redis的时候状态为down,导致注册到eureka后项目状态也是down.问下能不能设置sp ...

随机推荐

  1. mysql版本:'for the right syntax to use near 'identified by 'password' with grant option'

    查询mysql具体版本 SELECT @@VERSION 问题分析:mysql版本8.0.13,在给新用户授权时,发生了变化: 1064 - You have an error in your SQL ...

  2. 10.SpringMVC之格式化、校验

    数据格式化 数据格式化的注解: 数据校验JSR303 Hibernate Validator扩展注解 启动 springMVC数据校验 转换.格式化.校验出错处理:

  3. vim conf文件配色

    VIM conf文件配色 一.配置文件 1.下载Nginx配置文件的语法文件:nginx.vim wget http://www.vim.org/scripts/download_script.php ...

  4. css - 样式 - 可见性

    visibility 可见性 取值:visible(可见) |  hidden(隐藏.保留占位) 设置给:块.行内块.行内元素 作用:设置元素在文档上的可见性 此属性只是隐藏元素,但会为元素保留占位. ...

  5. 剑指offer面试题4

    1 #include<iostream> 2 using namespace std; 3 4 void replace(char ch[]) { 5 int count = 0; 6 i ...

  6. flink双流join

    package com.streamingjoin import org.apache.flink.api.common.state.{ValueState, ValueStateDescriptor ...

  7. Linkerd 2.10(Step by Step)—3. 自动轮换控制平面 TLS &Webhook TLS 凭证

    Linkerd 2.10 系列 快速上手 Linkerd v2 Service Mesh(服务网格) 腾讯云 K8S 集群实战 Service Mesh-Linkerd2 & Traefik2 ...

  8. 第一章 Net 5.0 快速开发框架 YC.Boilerplate--框架介绍

    YC.Boilerplate 框架介绍 YC.Boilerplate 是一套快速开发框架,采用当下流行的前后端分离开发模式,前端 采用VUE.后端采用Net 5.0:框架实现了 多租户.动态webAp ...

  9. Ubuntu在桌面壁纸上显示计算机名

    时间:2018-07-16 记录:byzqy 介绍: 在管理多台计算机时,将每台计算机的ID或者计算机名醒目的显示在电脑桌面,往往是一个不错的选择.下面记录一下在Ubuntu 16.04上使用Pyth ...

  10. ES6中函数调用自身需要注意的问题

    在传统的递归调用中,可以采用如下方式 function sum(n) { return sum(n - 1) + n;} 但如今es6盛行,为了保持代码一致性,可以采用两种解决方式. 第一种,将thi ...