sqoop从postgresql拉数据,报错TCP/IP连接问题
·
问题:
sqoop从postgresql拉数据,在执行到mapreduce时报错Connection refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections
问题定位过程:
1、postgresql 5432端口已开放,执行任务的节点能telnet通,并且netcat测试通过
2、sqoop list-tables命令可正常执行,sqoop import报错Connection refused. Check that the hostname and port are correct and that the
3、从其它服务器集群跑同样脚本正常
解决:
集群中有node不能访问5432,sqoop import命令一定要集群中所有起nodemanager服务的节点有访问数据库端口的权限,所以保证所有节点访问5432后解决
备注:
sqoop list-tables能执行就说明肯定不是postgresql端的问题,sqoop list-tables执行命令的这台服务器能访问5432即可
更多推荐
所有评论(0)