- Pivotal Greenplum Database (GPDB) 4.3.x
- Operating System- Red Hat Enterprise Linux 6.x
Queries on an external table fail with connection refused error as shown below:
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)
The error clearly explains that the connection cannot be made to gpfdist. This can happen if gpfdist is not responding to 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 :
|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|
- 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.
For further information, please refer to the following resource: