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

所属分类: 数据库 / Redis 阅读数: 77
收藏 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实现分布式锁以及任务队列,需要的朋友可以参考下
收藏 0 赞 0 分享

Redis上实现分布式锁以提高性能的方案研究

这篇文章主要介绍了Redis上实现分布式锁以提高性能的方案研究,其中重点需要理解异步算法与锁的自动释放,需要的朋友可以参考下
收藏 0 赞 0 分享

图文详解Windows下使用Redis缓存工具的方法

这篇文章以图文结合的方式详解Windows下使用Redis缓存工具的方法,感兴趣的小伙伴们可以参考一下
收藏 0 赞 0 分享

CentOS下Redis数据库的基本安装与配置教程

这篇文章主要介绍了CentOS下Redis数据库的基本安装与配置教程,Redis一般被用作基于内存的缓存式数据存储,要的朋友可以参考下
收藏 0 赞 0 分享

Redis整合Spring结合使用缓存实例

这篇文章主要介绍了Redis整合Spring结合使用缓存实例,介绍了如何在Spring中配置redis,并通过Spring中AOP的思想,将缓存的方法切入到有需要进入缓存的类或方法前面。需要的朋友可以参考下
收藏 0 赞 0 分享

Linux下安装Redis并设置相关服务

这篇文章主要为大家介绍了Linux下安装Redis并设置相关服务,感兴趣的小伙伴们可以参考一下
收藏 0 赞 0 分享

redis的hGetAll函数的性能问题(记Redis那坑人的HGETALL)

这篇文章主要介绍了redis的hGetAll函数的性能问题,需要的朋友可以参考下
收藏 0 赞 0 分享

浅谈Redis在分布式系统中的协调性运用

这篇文章主要介绍了Redis在分布式系统中的协调性运用,讲解了Redis在进程和线程的调度上以及消息队列中的作用,需要的朋友可以参考下
收藏 0 赞 0 分享

Redis实现信息已读未读状态提示

这篇文章主要介绍了Redis实现信息已读未读状态提示的相关资料,需要的朋友可以参考下
收藏 0 赞 0 分享

windows环境下Redis+Spring缓存实例讲解

这篇文章主要为大家详细介绍了windows环境下Redis+Spring缓存实例教程,感兴趣的小伙伴们可以参考一下
收藏 0 赞 0 分享
查看更多