Queries fail on an external table showing the message "error code = 111 (Connection refused)" in Pivotal Greenplum
search cancel

Queries fail on an external table showing the message "error code = 111 (Connection refused)" in Pivotal Greenplum

book

Article ID: 296140

calendar_today

Updated On:

Products

VMware Tanzu Greenplum

Issue/Introduction

Symptoms:

Queries on an external table fail with the connection refused error shown below:
 

Error Message:

ERROR: connection with gpfdist failed for gpfdist://172.28.8.250:8081/public/staging/ExAC_cider_full.txt. effective url:http://172.28.8.250:8081/public/staging/ExAC_cider_full.txt. error code = 111 (Connection refused) (seg25 slice1 sdw4.gphd.local:1026 pid=130225) 

Environment


Cause

The error explains that the connection cannot be made to gpfdist. This error occurs if gpfdist is not responding to the ETL server OR the gpfdist was not started on the port specified in the CREATE EXTERNAL TABLE statement.
 

To verify the connectivity, use wget to download the file from the location it failed previously. Cancel the command (CTRL+c) after some time if the download starts.
 

Note: This needs to be executed from the same server it failed, which is the host "sdw4.gphd.local" in the error message shown above:

wget http://172.28.8.250:8081/public/staging/ExAC_cider_full.txt << Accessing same file from the error message above 

Other issues/error messages that can observed are interpreted below: 
 

ERRORReason
File not foundFile does not exist at gpfdist location at the time of fetch
Temporary failure in name resolutionHostname not resolving to IP. May need to add in /etc/hosts on all servers
Network is unreachableIP address used for gpfdist is not reachable from the server

Resolution

1. Check and start gpfdist on the server using the same port as in CREATE EXTERNAL TABLE statement. 
2. Confirm that the server is reachable from all segment hosts.