
Questions: 23,767 //
Answers: 52,373 //
Contributing Members: 18,029
We are trying to setup a very simple file poller that ftp's the file onwards. We can FTP from the mule server using IE/FileZilla/Etc, but whenever the flow tries to connect it fails with the below message:
Message : Connection refused: connect (java.net.ConnectException) Type : org.mule.transport.ConnectException Code : MULE_ERROR--2 JavaDoc : http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/transport/ConnectException.html *** Exception stack is: 1. Connection refused: connect (java.net.ConnectException) java.net.TwoStacksPlainSocketImpl:-2 (null) 2. Connection refused: connect (java.net.ConnectException) (org.mule.transport.ConnectException) org.mule.transport.ftp.FtpConnector:560 (http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/transport/ConnectException.html)*
If we enter invalid credentials, we get a login failed error, so that suggests the Mule server can communicate with the Windows FTP server........but we are at a bit of a loss as to why the connection is refused? Can anyone suggest what we can look at?
Thanks,
Jason
Dec 08, 2015 at 12:06 PM, ullgren answered with:
The error message indicates that Mule fails to
Are you sure that the Mule server has direct access to the FTP server ? Possibly the clients you've tested could be using proxy config taken from the operating system settings.
It could also be a local firewall issue where the FTP applications you've used has been whitelisted in the firewall.
Try using a more "barebone" FTP client such as plain commandline ftp or just telnet to the FTP server to see that you can establish a TCP connection.
Another reason might be that the FTP server is expecting SSL/TLS encrypted connection and that is handled by the ftp clients you've used.
Dec 08, 2015 at 02:48 PM, jasongoodwill answered with:
Thanks for the response. I can confirm that from the Mule server we can also telnet to the FTP server and use cmd FTP ok. Issue just seems to be when trying to connect from the JVM.
As a test, I tried using an alternative FTP server and that worked fine, so we've definitely got everything configured correctly in Mule.
The problem must be on the Windows/IIS side.......although at first glance I can't see any settings that are different between the two servers. Also, checked and firewall is disabled on both FTP servers.
Anyone got any ideas what setting might need changing on the Windows side? I will start having a deeper look on the windows side, I'd just presumed we were doing something wrong on the mule side.
Note that Windows also includes firewall that can block outbound connections possibly based on application. That means that a FTP client might be allowed to create a outbound connection while a mule (java) process running as a service might not.
So try disable the firewall on the Mule server side and see if that solves the problem.
Also are you using plain FTP (port 21) or encrypted FTP aka FTPS (normally port 990) ? If the later then you would need to configure Mule so that it uses TLS encryption to connect to the server.
Another source of problem might be if the FTP server is using IPv6. I believe Mule ESB is configured to use only IPv4 by default.
I have the same problem except I'm using OSX The configuration I'm using is FTP port 21 and I have disabled the firewall, my FTP server provider is not using IPv6 and does not support TLS I'm using FTP connector as and Outbound too
is there something else I should check?
Jan 07, 2016 at 03:58 AM, mariano.gonzalez answered with:
Check if the ports that FileZilla uses when trying the connection from your server are the same ones as Mule's. Maybe this is a binding issue on a port already taken by already connector/app/process
May 16, 2016 at 08:36 PM, eochoa answered with:
I had the same problem but I wasn't able to find the root cause.The connection using Filezilla was working, using port 21, IPv4 Server and deactivating a Firewall and the FTP server was a expecting a plain FTP connection. The only work around I found is to use another Server.
May 16, 2016 at 10:20 PM, mmj7_lpa answered with:
Checks the Filezillas versions to find the root cause and try again ok?
Jun 29, 2016 at 10:19 PM, ivocosta answered with:
If your password contains the '@' character, the connection string that gets created will cause the system to search for the wrong domain. This is easy to identify in the SFTP component, unfortunately the FTP component does not provide a good error message