当前位置:网站首页>Record a redis timeout
Record a redis timeout
2022-07-01 09:06:00 【The south wind knows what I mean】
Project scenario :
Spark Streaming Task consumption kafka, hold offsets Deposit in redis
Problem description
The main bug:
ERROR yarn.ApplicationMaster: User class threw exception: redis.clients.jedis.exceptions.JedisConnectionException: java.net.SocketTimeoutException: Read timed out
redis.clients.jedis.exceptions.JedisConnectionException: java.net.SocketTimeoutException: Read timed out
at redis.clients.jedis.util.RedisInputStream.ensureFill(RedisInputStream.java:204)
at redis.clients.jedis.util.RedisInputStream.readByte(RedisInputStream.java:42)
at redis.clients.jedis.Protocol.process(Protocol.java:126)
at redis.clients.jedis.Protocol.read(Protocol.java:192)
at redis.clients.jedis.Connection.readProtocolWithCheckingBroken(Connection.java:316)
at redis.clients.jedis.Connection.getOne(Connection.java:298)
at redis.clients.jedis.Connection.executeCommand(Connection.java:123)
at redis.clients.jedis.Jedis.set(Jedis.java:4725)
at cn.huorong.utils.RedisUtils$.$anonfun$writeOffset$3(RedisUtils.scala:45)
at scala.collection.immutable.Map$Map1.foreach(Map.scala:128)
at cn.huorong.utils.RedisUtils$.writeOffset(RedisUtils.scala:40)
at cn.huorong.run.SampleTaskSinkHbaseMapping.$anonfun$sink$1(SampleTaskSinkHbaseMapping.scala:51)
at cn.huorong.run.SampleTaskSinkHbaseMapping.$anonfun$sink$1$adapted(SampleTaskSinkHbaseMapping.scala:17)
at org.apache.spark.streaming.dstream.DStream.$anonfun$foreachRDD$2(DStream.scala:629)
at org.apache.spark.streaming.dstream.DStream.$anonfun$foreachRDD$2$adapted(DStream.scala:629)
at org.apache.spark.streaming.dstream.ForEachDStream.$anonfun$generateJob$2(ForEachDStream.scala:51)
at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:23)
at org.apache.spark.streaming.dstream.DStream.createRDDWithLocalProperties(DStream.scala:417)
at org.apache.spark.streaming.dstream.ForEachDStream.$anonfun$generateJob$1(ForEachDStream.scala:51)
at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:23)
at scala.util.Try$.apply(Try.scala:213)
at org.apache.spark.streaming.scheduler.Job.run(Job.scala:39)
at org.apache.spark.streaming.scheduler.JobScheduler$JobHandler.$anonfun$run$1(JobScheduler.scala:256)
at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:23)
at scala.util.DynamicVariable.withValue(DynamicVariable.scala:62)
at org.apache.spark.streaming.scheduler.JobScheduler$JobHandler.run(JobScheduler.scala:256)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.net.SocketTimeoutException: Read timed out
Cause analysis :
redis colony Caused by excessive load redis Connection timeout , The program is down
Solution :
increase redis Time is enough
//connectionTimeout Connection timeout ( Default 2000ms)
private val redis: Jedis = new Jedis(HOST, PORT,100000)
边栏推荐
- How to solve the problem of fixed assets management and inventory?
- Mysql 优化
- Jeecg restart alarm 40001
- Differences among tasks, threads and processes
- 【pytorch】transforms.Normalize((0.5, 0.5, 0.5), (0.5, 0.5, 0.5))
- Shell script -select in loop
- [MFC development (16)] tree control
- Redis -- lattice connects to redis cluster
- 【ESP 保姆级教程 预告】疯狂Node.js服务器篇 ——案例:ESP8266 + DHT11 +NodeJs本地服务+ MySQL数据库
- Shell脚本-特殊变量:Shell $#、$*、[email protected]、$?、$$
猜你喜欢
随机推荐
Shell script -if else statement
足球篮球体育比赛比分直播平台源码/app开发建设项目
Computer tips
Win7 pyinstaller reports an error DLL load failed while importing after packaging exe_ Socket: parameter error
Redis——Lettuce连接redis集群
Shell脚本-read命令:读取从键盘输入的数据
R language observation log (part24) -- initialization settings
Common interview questions for embedded engineers 2-mcu_ STM32
Shell script echo command escape character
Set the type of the input tag to number, and remove the up and down arrows
The jar package embedded with SQLite database is deployed by changing directories on the same machine, and the newly added database records are gone
Pain points and solutions of equipment management in large factories
Microcomputer principle - bus and its formation
【ESP 保姆级教程 预告】疯狂Node.js服务器篇 ——案例:ESP8266 + DHT11 +NodeJs本地服务+ MySQL数据库
Jeecg restart alarm 40001
Shell script -select in loop
Nacos - Configuration Management
It is designed with high bandwidth, which is almost processed into an open circuit?
R语言观察日志(part24)--初始化设置
Shell脚本-for循环和for int循环









