[ 
https://issues.apache.org/jira/browse/HAWQ-932?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15388163#comment-15388163
 ] 

ASF GitHub Bot commented on HAWQ-932:
-------------------------------------

Github user shivzone commented on a diff in the pull request:

    https://github.com/apache/incubator-hawq/pull/803#discussion_r71760169
  
    --- Diff: src/backend/access/external/libchurl.c ---
    @@ -312,6 +312,14 @@ CHURL_HANDLE churl_init_upload(const char* url, 
CHURL_HEADERS headers)
        context->upload = true;
        clear_error_buffer(context);
     
    +   /* needed to resolve pxf service address */
    +   struct curl_slist *resolve_hosts = NULL;
    +   char *pxf_host_entry = (char *) palloc0(strlen(pxf_service_address) + 
strlen(LocalhostIpV4Entry) + 1);
    +   strcat(pxf_host_entry, pxf_service_address);
    --- End diff --
    
    This step might be unnecssary if the pxf_service_address itself is based on 
the IP address


> 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
>             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)

Reply via email to