当前位置: 首页 > news >正文

厦门南希网站建设企业网站价格花

厦门南希网站建设,企业网站价格花,一键查询注册过的网站,施工企业资质序列目录 Unable to connect to Redis; nested exception is io.lettuce.core.RedisConnectionException:用客户端Redis Desktop Manager一样的密码端口#xff0c;是可以正常连接的#xff0c;但是运行java程序之后使用接口请求就会报错 Unable to connect to Redis; nested e…目录 Unable to connect to Redis; nested exception is io.lettuce.core.RedisConnectionException:用客户端Redis Desktop Manager一样的密码端口是可以正常连接的但是运行java程序之后使用接口请求就会报错 Unable to connect to Redis; nested exception is org.springframework.data.redis.connection.PoolException: Could not get a resource from the pool; nested exception is io.lettuce.core.RedisConnectionException: Unable to connect to localhost:6379 首先引入相关的依赖我使用的springBoot版本是 2.5.2 !-- 提供Redis连接池 -- dependencygroupIdorg.apache.commons/groupIdartifactIdcommons-pool2/artifactId /dependencydependencygroupIdorg.springframework.boot/groupIdartifactIdspring-boot-starter-data-redis/artifactId /dependency spring: # redis配置 redis:# Redis数据库索引默认为0database: 1# Redis服务器地址host: 127.0.0.1# Redis服务器连接端口port: 6379# Redis服务器连接密码默认为空password: root# 连接超时时间timeout: 10slettuce:pool:# 连接池最大连接数max-active: 200# 连接池最大阻塞等待时间使用负值表示没有限制max-wait: -1ms# 连接池中的最大空闲连接max-idle: 10# 连接池中的最小空闲连接min-idle: 0 Unable to connect to Redis; nested exception is io.lettuce.core.RedisConnectionException: 用客户端Redis Desktop Manager一样的密码端口是可以正常连接的但是运行java程序之后使用接口请求就会报错 运行遇到的几个问题 1、Unable to connect to Redis; nested exception is io.lettuce.core.RedisConnectionException: 用客户端Redis Desktop Manager一样的密码端口是可以正常连接的但是运行java程序之后使用接口请求就会报错所以对配置文件redis.conf进行如下修改 1. 修改protected-mode配置的值为no protected-mode 是 Redis 配置文件中的一个选项用于控制 Redis 是否启用保护模式。当 protected-mode 设置为 yes 时表示 Redis 处于保护模式只能通过本地回环地址127.0.0.1来访问 Redis 服务即只允许本地客户端进行连接而不允许外部网络访问。 2. 注释#bind 127.0.0.1 默认情况下bind 设置为空表示 Redis 监听所有可用的网络接口包括本地127.0.0.1和外部网络地址。这意味着 Redis 可以接受来自任何网络接口的连接。当将 bind 设置为具体的 IP 地址或主机名时Redis 将仅监听指定的网络接口而不再监听其他网络接口。例如如果将 bind 设置为 127.0.0.1则 Redis 只会监听本地回环地址即只允许本地客户端进行连接而拒绝来自外部网络的连接。 3. 增加redis连接密码 在redis.conf配置文件中搜索requirepass就可以添加密码了 然后重新启动redis就行。 上面都配置好后但是还是报错报错内容如下 Unable to connect to Redis; nested exception is org.springframework.data.redis.connection.PoolException: Could not get a resource from the pool; nested exception is io.lettuce.core.RedisConnectionException: Unable to connect to localhost:6379 Unable to connect to Redis; nested exception is org.springframework.data.redis.connection.PoolException: Could not get a resource from the pool; nested exception is io.lettuce.core.RedisConnectionException: Unable to connect to localhost:6379 原因是配置文件有问题刚刚我们的配置文件是 需要把password修改为 auth redis:database: 0host: localhostport: 6379auth: abc123456 这样就可以正常访问了
http://www.huolong8.cn/news/8604/

相关文章:

  • 江门网站建设报价军事网站模板
  • 青岛网站建设优化设备租赁网站建设
  • 个人做啥网站流量大爱站网使用体验
  • 企业网站建设立项书网站开发销售简历范文
  • 制作网站公司首 荐乐云seo专家网站开发就业外部威胁
  • 广州购物网站建设价格网站漏洞原理
  • 商务网站建设内容建设商城网站费用
  • 漯河北京网站建设百度24小时人工电话
  • 电脑公司网站设计互联网行业的开发网站
  • 商城网站中商品模块有哪些功能校园图书馆网站建设
  • 茌平做网站公司手风琴网站模板
  • 平面设计师看的网站贵阳花溪区
  • 临淄网站建设价格超级工程网站建设
  • wordpress 登陆不了网站的seo
  • 深圳龙岗做网站的公司哪家好优秀企业vi设计案例
  • 广州城市建设网站上海好的高端网站建设服务公司
  • 定制app网站wordpress notfound
  • 青岛市建设网站学网站建设的软件
  • 毕业设计网页制作咖啡网站图片网站开发需要准备什么软件
  • 获取网站物理路径网站关键词最多几个
  • 网站统计数据分析南京江北新区规划图
  • 百度热门排行榜怎么对一个网站做优化
  • wordpress还原站点山东禹城市建设局网站
  • 网站开发费用属于什么科目建立网站的步骤有哪些
  • 做招聘信息的网站有哪些wordpress 双会员系统
  • 毕业设计 网站建设选题网站设计英文翻译
  • 中国建设银行个人登录网站零食网站建设的策划书
  • 济南 网站优化网站推广问题
  • 做一个网站的费用构成郑州新闻最新消息今天
  • wordpress是什么写的兰州网站优化公司