Pivotal Knowledge Base

Follow

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

Environment

Product Version
Pivotal Greenplum (GPDB) 4.3.x
OS RHEL 6.x

Symptom

Queries on an external table fail with connection refused error as 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) 

Cause

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

To verify the connectivity, you can use wget to download the file from the location it failed previously. You can cancel the command (CTRL+c) after some time if the download gets started and in progress.

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 

There could be other issues/error messages that can be observed and can be interpreted easily :

ERROR Reason
File not found File does not exist at gpfdist location at the time of fetch
Temporary failure in name resolution Hostname not resolving to IP. May need to add in /etc/hosts on all servers
Network is unreachable IP address used for gpfdist is not reachable from the server

Resolution

  • Check and start gpfdist on the server using the same port as in CREATE EXTERNAL TABLE statement. 
  • Make sure the server is reachable from all segment hosts.

Additional Information 

For further information, please refer to the following resource:

 

 

 

Comments

  • Avatar
    Gurupreet Singh Bhatia

    111 occurs when gpfdist process is not running,
    404 occurs when matching file not found,
    408 related to timeout set -t option according to requirement or 0(zero) for unlimited

    There are others errors associated like line too long which can removed by setting -m option

Powered by Zendesk