Pig and Hadoop connection error

淺唱寂寞╮ 提交于 2019-12-03 19:39:59
Nishit

To start it,go to hadoop's sbin dir and then type the command

mr-jobhistory-server.sh start historyserver --config $HADOOP_CONF_DIR

$HADOOP_CONF_DIR is the directory where hadoop's config files like hdfs-site.xml etc. reside.

Found the solution.
The line:

Caused by: java.net.ConnectException: Call From localhost.localdomain/127.0.0.1 to 0.0.0.0:10020 failed on connection exception: java.net.ConnectException: Connection refused; For more details see:  http://wiki.apache.org/hadoop/ConnectionRefused

comes when JobHistoryServer is not up.
So starting the JobHistoryServer would eliminate this issue.
To start it, go to hadoop's sbin dir and then the command:

mr-jobhistory-server.sh start

Do a jps to check if JobHistoryServer is up, and then re-execute your Pig commands.

Updated command(as of 2017):

./mr-jobhistory-daemon.sh --config $HADOOP_CONF_DIR start historyserver

check

jps
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!