Failed read data from hdfs with PXF | "Servlet execution threw an exception"

74 views
Skip to first unread message

Chris

unread,
Jan 22, 2018, 4:44:58 AM1/22/18
to Greenplum Developers
Hi Gp-dev,

Im trying read data from hdfs with PXF, but got following error.


select * from pxf_hdfs_textsimple2;

ERROR:  remote component error (500) from '127.0.0.1:51200':  type  Exception report   message   Servlet execution threw an exception    description   The server encountered an internal error that prevented it from fulfilling this request.    exception   javax.servlet.ServletException: Servlet execution threw an exception (libchurl.c:944)  (seg0 slice1 192.168.56.101:40000 pid=5403)
DETAIL:  External table pxf_hdfs_textsimple2, file pxf://user/gpadmin/test.txt?PROFILE=HdfsTextSimple


Check log on pxf-service log.
INFO tomcat-http--6 org.apache.hadoop.mapred.FileInputFormat - Total input paths to process : 1


PXF Create table syntax.
CREATE EXTERNAL TABLE pxf_hdfs_textsimple2(location text)                                                                                                       LOCATION ('pxf://user/gpadmin/test.txt?PROFILE=HdfsTextSimple')                                                                                              FORMAT 'TEXT' (delimiter=E',');


Cat hdfs file from gp segment.
[gpadmin@sdw2 ~]$ hdfs dfs -cat /user/gpadmin/test.txt
HelloWorld
[gpadmin@sdw2 ~]$

koc...@pivotal.io

unread,
Jan 23, 2018, 5:59:23 PM1/23/18
to Greenplum Developers
Hi,

I tried the sample example and it works with my setup.  Maybe something is not configured correctly.  Please check for errors in the detailed logs under /usr/local/greenplum-db/pxf/logs/


postgres=# CREATE EXTERNAL TABLE pxf_hdfs_textsimple2(location text)                                                                                                       LOCATION ('pxf://user/gpadmin/test.txt?PROFILE=HdfsTextSimple')                                                                                              FORMAT 'TEXT' (delimiter=E',');
CREATE EXTERNAL TABLE


postgres=# select * from pxf_hdfs_textsimple2;
  location
------------
 Helloworld
(1 row)

Thanks,
Kong

Alexander Denissov

unread,
Jan 24, 2018, 5:25:23 PM1/24/18
to Kong Yew Chan, Greenplum Developers
Also, please take a look at catalina.out log file (inside pxf log directory) to see if Tomcat encountered an error.

--
Thanks,
Alex.

Chrisna Dwi Putera

unread,
Jan 25, 2018, 4:08:41 AM1/25/18
to Alexander Denissov, Kong Yew Chan, Greenplum Developers
Hi, 

Thank you all for the response. Seems there is an issue while init the pxf services.
I'm moving the pxf_service folder, and re-initialize pxf, 
Now the pxf has running well


Thanks,
Chris



--
You received this message because you are subscribed to the Google Groups "Greenplum Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gpdb-dev+unsubscribe@greenplum.org.

Reply all
Reply to author
Forward
0 new messages