[
https://issues.apache.org/jira/browse/HAWQ-932?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Goden Yao updated HAWQ-932:
---------------------------
Description:
Originally reported by [~jpatel] when he's making a docker image based on HAWQ
2.0.0.0-incubating dev build. Investigated by [~odiachenko]
There is workaround to define it with 127.0.0.1, but there is not a workaround
for querying tables using HCatalog integration.
It used to work before.
{code}
template1=# CREATE EXTERNAL TABLE ext_table1 (t1 text, t2 text,
num1 integer, dub1 double precision) LOCATION
(E'pxf://localhost:51200/hive_small_data?PROFILE=Hive') FORMAT 'CUSTOM'
(formatter='pxfwritable_import');*
CREATE EXTERNAL TABLE
template1=# select * from ext_table1;
ERROR: remote component error (0): (libchurl.c:898)*
{code}
When I turned on debug mode in curl, I found this error in logs - "*
Closing connection 0".
I found a workaround, to set CURLOPT_RESOLVE option in curl:
{code}
struct curl_slist *host = NULL;
host = curl_slist_append(NULL, "localhost:51200:127.0.0.1");*
set_curl_option(context, CURLOPT_RESOLVE, host);
{code}
It seems like an issue with DNS cache,
was:
Originally reported by [~jpatel] when he's making a docker image based on HAWQ
2.0.0.0-incubating dev build. Investigated by [~odiachenko]
There is workaround to define it with 127.0.0.1, but there is not a workaround
for querying tables using HCatalog integration.
It used to work before.
{code}
template1=# CREATE EXTERNAL TABLE ext_table1 (t1 text, t2 text,
num1 integer, dub1 double precision) LOCATION
(E'pxf://localhost:51200/hive_small_data?PROFILE=Hive') FORMAT 'CUSTOM'
(formatter='pxfwritable_import');*
CREATE EXTERNAL TABLE
template1=# select * from ext_table1;
ERROR: remote component error (0): (libchurl.c:898)*
When I turned on debug mode in curl, I found this error in logs - "*
Closing connection 0".
I found a workaround, to set CURLOPT_RESOLVE option in curl:
{code}
struct curl_slist *host = NULL;
host = curl_slist_append(NULL, "localhost:51200:127.0.0.1");*
set_curl_option(context, CURLOPT_RESOLVE, host);
{code}
It seems like an issue with DNS cache,
> HAWQ fails to query external table defined with "localhost" in URL
> ------------------------------------------------------------------
>
> Key: HAWQ-932
> URL: https://issues.apache.org/jira/browse/HAWQ-932
> Project: Apache HAWQ
> Issue Type: Bug
> Components: External Tables, PXF
> Reporter: Goden Yao
> Assignee: Oleksandr Diachenko
> Priority: Minor
> Fix For: 2.0.1.0-incubating
>
>
> Originally reported by [~jpatel] when he's making a docker image based on
> HAWQ 2.0.0.0-incubating dev build. Investigated by [~odiachenko]
> There is workaround to define it with 127.0.0.1, but there is not a
> workaround for querying tables using HCatalog integration.
> It used to work before.
> {code}
> template1=# CREATE EXTERNAL TABLE ext_table1 (t1 text, t2 text,
> num1 integer, dub1 double precision) LOCATION
> (E'pxf://localhost:51200/hive_small_data?PROFILE=Hive') FORMAT 'CUSTOM'
> (formatter='pxfwritable_import');*
> CREATE EXTERNAL TABLE
> template1=# select * from ext_table1;
> ERROR: remote component error (0): (libchurl.c:898)*
> {code}
> When I turned on debug mode in curl, I found this error in logs - "*
> Closing connection 0".
> I found a workaround, to set CURLOPT_RESOLVE option in curl:
> {code}
> struct curl_slist *host = NULL;
> host = curl_slist_append(NULL, "localhost:51200:127.0.0.1");*
> set_curl_option(context, CURLOPT_RESOLVE, host);
> {code}
> It seems like an issue with DNS cache,
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)