Py script unable to connect to 3rd party FTP from Godaddy Subdomain

We are using Godaddy hosting. We have python script which works fine locally, but from godaddy cpanel, it stops when trying to connect to 3rd party FTP (for fetching CSV). It gives error:
[Errno 111] Connection refused

Py script:
def connect_to_ftp():
global ftp
ftp = FTP()
print(“FTP Started”)

It gives error on ftp.connect. We contacted Godaddy and they suggested that Cloudflare is blocking it. We have a catcher on FTP which catches every ping to server and it’s unable to find any hit either. We even added FTP’s IP, FTP’s hostname in Firewall Access rules, but still the same issue. This script is hosted on a subdomain which is added on both godaddy and cloudflare and other files work fine. So we even changed subdomain on cloudflare from proxy to DNS only but still the same issue. Please help us troubleshoot this issue.


If that’s the case, then Cloudflare is not the issue. This means its a direct connection to that server. Keep in mind that switching to DNS-Only takes five minutes to take effect. You may want to test again.

1 Like

Apparently, it was FTP server’s issue as it was refusing all connections. Thanks for all the help.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.