当用beeline 执行sql,触发mapreduce时, 会报异常:
2018-05-23 11:07:28 Uploaded 1 File to: file:/var/hive/iotmp/hive/865f9e35-90af-44a7-b1a2-023978352632/hive_2018-05-23_11-07-22_422_5402767909633287790-1/-local-10004/HashTable-Stage-3/MapJoin-mapfile00--.hashtable (290 bytes)
2018-05-23 11:07:28 End of local task; Time Taken: 1.399 sec.
Error: org.apache.hive.service.cli.HiveSQLException: Error while processing statement: FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask. Call From node203.hmbank.com/10.30.16.203 to node202.hmbank.com:8032 failed on connection exception: java.net.ConnectException: Connection refused; For more details see: http://wiki.apache.org/hadoop/ConnectionRefused
at org.apache.hive.service.cli.operation.Operation.toSQLException(Operation.java:380)
at org.apache.hive.service.cli.operation.SQLOperation.runQuery(SQLOperation.java:257)
at org.apache.hive.service.cli.operation.SQLOperation.access$800(SQLOperation.java:91)
at org.apache.hive.service.cli.operation.SQLOperation$BackgroundWork$1.run(SQLOperation.java:348)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:422)
at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1920)
at org.apache.hive.service.cli.operation.SQLOperation$BackgroundWork.run(SQLOperation.java:362)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
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)
在ResourceManager的web中看到没有成功提交任务。
而当直接通过hive客户端执行时, 执行MapReduce任务成功 。
分析错误原因:
- node202上的8032端口拒绝连接, 在node202上执行netstat -an | grep 8032 , 发现8032端口没有开启。
- 8032端口是ResourceManager的端口, 通过jps命令,查看发现ResourceManager程序以启动。
- 通过 yarn rmadmin -getServiceState rm202 发现当前状态为standby 。 node202 与node204两个主机启动ResourceManager HA。 rm204的状态是active。
- 从分析来看, 应该是beeline发送的job没有发送给到活动的ResourceManager节点上。 现尝试将node204节点的ResourceManager kill掉。 重新执行beeline命令, 发现MR任务正常启动并成功执行完成。
- 问题关键在于:beeline发出的MR job 没有找到正确的ResourceManager,但是hive分发的任务可以正常被执行,可能是beeline server的配置有问题。
网友评论