Redis 中spark参数executor-cores引起的异常解决办法

所属分类: 数据库 / Redis 阅读数: 118
收藏 0 赞 0 分享

Redis 中spark参数executor-cores引起的异常解决办法

报错信息

Unexpected end of stream

16/10/11 16:35:50 WARN TaskSetManager: Lost task 63.0 in stage 3.0 (TID 212, gzns-arch-spark04.gzns.iwm.name): redis.clients.jedis.exceptions.JedisConnectionException: Unexpected end of stream.
 at redis.clients.util.RedisInputStream.ensureFill(RedisInputStream.java:199)
 at redis.clients.util.RedisInputStream.readByte(RedisInputStream.java:40)
 at redis.clients.jedis.Protocol.process(Protocol.java:151)
 at redis.clients.jedis.Protocol.read(Protocol.java:215)
 at redis.clients.jedis.Connection.readProtocolWithCheckingBroken(Connection.java:340)
 at redis.clients.jedis.Connection.getBinaryMultiBulkReply(Connection.java:276)
 at redis.clients.jedis.Connection.getMultiBulkReply(Connection.java:269)
 at redis.clients.jedis.Jedis.hmget(Jedis.java:723)

DENIED Redis is running in protected mode because protected mode is enabled

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:127)
 at redis.clients.jedis.Protocol.process(Protocol.java:161)
 at redis.clients.jedis.Protocol.read(Protocol.java:215)

解决过程

我尝试重启redis,更换redis新jar包,关闭redis保护模式都于事无补,后来找了下错误的原因,无意中看到了Unexpected end of stream是说有一个进程占用了redis的链接,头脑一炸,才发现自己把executor-cores设置为了2,然后把该值设置为1后,正常了。

看来只有等接入redis集群后,我才能修改该值了。

感谢阅读,希望能帮助到大家,谢谢大家对本站的支持!

更多精彩内容其他人还在看

查看Redis内存信息的命令

Redis 是一个开源、高性能的Key-Value数据库,被广泛应用在服务器各种场景中。本文介绍几个查看Redis内存信息的命令,包括常用的info memory、info keyspace、bigkeys等。
收藏 0 赞 0 分享

redis批量删除key的步骤

本文分享最新版Redis批量删除key的方法,希望能帮到遇到同样问题的网友。
收藏 0 赞 0 分享

redis实现排行榜的简单方法

这篇文章主要给大家介绍了关于redis实现排行榜的简单方法,文中通过示例代码介绍的非常详细,对大家学习或者使用redis具有一定的参考学习价值,需要的朋友们下面来一起学习学习吧
收藏 0 赞 0 分享

谈谈Redis分布式锁的正确实现方法

这篇文章主要给大家介绍了关于Redis分布式锁的正确实现方法,文中通过示例代码介绍的非常详细,对大家学习或者使用Redis具有一定的参考学习价值,需要的朋友们下面来一起学习学习吧
收藏 0 赞 0 分享

基于redis实现token验证用户是否登陆

这篇文章主要为大家详细介绍了基于redis实现token验证用户是否登陆,文中示例代码介绍的非常详细,具有一定的参考价值,感兴趣的小伙伴们可以参考一下
收藏 0 赞 0 分享

使用Redis实现延时任务的解决方案

这篇文章主要介绍了使用Redis实现延时任务的解决方案,本文给大家介绍的非常详细,具有一定的参考借鉴价值,需要的朋友可以参考下
收藏 0 赞 0 分享

Redis全量复制与部分复制示例详解

这篇文章主要给大家介绍了关于Redis全量复制与部分复制的相关资料,文中通过示例代码介绍的非常详细,对大家学习或者使用Redis爬虫具有一定的参考学习价值,需要的朋友们下面来一起学习学习吧
收藏 0 赞 0 分享

基于redis实现定时任务的方法详解

这篇文章主要给大家介绍了基于redis实现定时任务的相关资料,文中通过示例代码介绍的非常详细,对大家学习或者使用redis具有一定的参考学习价值,需要的朋友们下面来一起学习学习吧
收藏 0 赞 0 分享

详解redis desktop manager安装及连接方式

这篇文章主要介绍了redis desktop manager安装及连接方式,本文图文并茂给大家介绍的非常详细,具有一定的参考借鉴价值,需要的朋友可以参考下
收藏 0 赞 0 分享

Redis集群下过期key监听的实现代码

这篇文章主要介绍了Redis集群下过期key监听的实现代码,非常不错,具有一定的参考借鉴价值,需要的朋友可以参考下
收藏 0 赞 0 分享
查看更多