Skip to main content

Cannot establish FTP connection

Comments

11 comments

  • CiboloJack
    This has been going for me for a couple of days. I have created new FTP accounts, which return the username and password are incorrect. The other ftp accounts, which worked a few days ago are returning the same error. I cannot ftp into ANY of 15 websites which I manage. When will this be addressed?
    0
  • cPanelLauren
    This sounds like the FTP data port isn't open. Can you confirm that you have both ports 20 and 21 open in your firewall?
    0
  • nixuser
    Do you have any firewall installed on server?
    0
  • whipworks
    This sounds like the FTP data port isn't open. Can you confirm that you have both ports 20 and 21 open in your firewall?

    Yes. Ports open.
    0
  • cPanelLauren
    Error: The data connection could not be established: ECONNREFUSED - Connection refused by server

    This error specifically, seems to indicate that the connection is being refused by the web server - this is typically a port not being open properly. Ultimately there's not enough information provided here to give you another cause - are you able to access any logs on the webserver, namely /var/log/messages
    ? If you are able to - the log entries when the connection attempt is occurring may be useful.
    0
  • CiboloJack
    This sounds like the FTP data port isn't open. Can you confirm that you have both ports 20 and 21 open in your firewall?

    The same settings work for me with Network Solutions, so it is not a port on the firewall, it's something with GoDaddy...my logic tells me
    0
  • whipworks
    This error specifically, seems to indicate that the connection is being refused by the web server - this is typically a port not being open properly. Ultimately there's not enough information provided here to give you another cause - are you able to access any logs on the webserver, namely /var/log/messages
    ? If you are able to - the log entries when the connection attempt is occurring may be useful.

    We get this.... Data connection timed out. Data connection timed out. Data connection timed out. Falling back to PORT instead of PASV mode.
    0
  • cPanelLauren
    Are you utilizing a NAT configuration? If so you may need to ensure that you have the passive ports open. We have some information on this here: How to Enable FTP Passive Mode - cPanel Knowledge Base - cPanel Documentation
    0
  • mathx
    whipworks tech here. some reason the server side is writing (from strace): [pid 23721] write(6, "227 Entering Passive Mode (SERVER.ROUTER.NET.1,209,120)\r\n", 50) = 50 where SERVER.ROUTER.NET.1 is the actual gw of the cpanel server. where would it get that idea? this isnt a natted setup yet it's doing that.... ....[time passes]... grep that ip -r in /etc and i get pure-ftpd.conf:ForcePassiveIP SERVER.ROUTER.NET.1 I nor any of the other techs would have ever set that. Where the heck did that come from!?!?
    0
  • cPanelLauren
    That's interesting, it should definitely look like this in its default state: [root@server ~]# grep ForcePassiveIP /etc/pure-ftpd.conf # ForcePassiveIP 192.168.0.1
    I'm not sure what would have not only changed that but changed it to the hostname rather than the IP address. If you comment that line out like it is in my test server are you able to FTP normally? If so - change it here as well: var/cpanel/conf/pureftpd/local
    0
  • mathx
    Yeah if you dont change it in /var/cpanel/conf/pureftpd/main (by removing it, nothing is commented out there), then it will eventually rewrite the config file and restart the daemon (5.5 weeks later?) and cause the same issue.
    0

Please sign in to leave a comment.