ITPub博客

首页 > 大数据 > 数据挖掘 > GP查询外部表报错

GP查询外部表报错

原创 数据挖掘 作者:paynefu 时间:2014-06-25 17:50:24 0 删除 编辑
GP查询外部表报错: 
2014-06-19 09:00:59 ERROR ERROR MSG:[unixODBC]Error while executing the query (non-fatal);
ERROR:  connection with gpfdist failed for gpfdist://etl:8082/gp_data/VIP_LOCK_CT_LIST_0833.txt. effective url:http://139.36.107.140:8082/gp_data/VIP_LOCK_CT_LIST_0833.txt. error code = 115 (Operation now in progress) (url.c:258)  (seg4 slice1 sdw3-1:50001 pid=2651);

GOOGLE用不了,百度经过翻查找在:
http://blog.sina.com.cn/s/blog_79d599dc0100qfgz.html上找到一篇相似的错误。
但因对GP不熟,看得不明不白,不知道讲什么。

重新在操作系统中,一行行
看帮助文档:
[gpadmin@etl gp_data]$ gpfdist --help | more 

解决方法 :
 查看gpfdist状态:
[gpadmin@etl gp_data]$ gpfdist -v
[2014-06-19 14:32:44] [INTERNAL ERROR gpfdist.c:1555] cannot create socket on port 8080
          ... exiting
端口使用不正常 !!

查看端口使用情况:
 
[gpadmin@etl gp_data]$ netstat -anp|grep 8080
(Not all processes could be identified, non-owned process info
 will not be shown, you would have to be root to see it all.)
tcp        0      0 0.0.0.0:8080                0.0.0.0:*                   LISTEN      24145/gpfdist       
就是gpfdist在用 ,为什么不行?

试着用8082端口打开试试:
 
[gpadmin@etl gp_data]$ gpfdist -d /home/gpadmin -p 8082 &
创建测试外部表:
CREATE EXTERNAL TABLE mi_boss.fb_test_ext(
id1 NUMERIC,id2 NUMERIC,id3 NUMERIC
) LOCATION ('gpfdist://etl:8082/gp_data/fb_test.txt')
FORMAT 'TEXT' (DELIMITER ','  NULL '' FILL MISSING FIELDS ESCAPE 'OFF' ) 

再次查询外部表,可以正常查询数据了!

如何停止不正常的gpfdist服务呢?帮助文档讲得很详细: 

 
To stop gpfdist when it is running in the background:
--First find its process id:
ps ax | grep gpfdist 
  OR on Solaris
ps -ef | grep gpfdist
--Then kill the process, for example:
kill 3456

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/27135177/viewspace-1193680/ ,如需转载,请注明出处,否则将追究法律责任。

下一篇: gpfdist故障诊断
请登录后发表评论 登录
全部评论

注册时间:2012-08-01

  • 博文量
    26
  • 访问量
    87476