Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
We have a Talend application that is being deployed from an AWS Windows server : the application runs fine up to the point it tries to connect to a FTP server:
Exception in component tFTPDelete_4 (CopiaArquivosFTPOn) com.enterprisedt.net.ftp.FTPException: 501 Server cannot accept argument. at com.enterprisedt.net.ftp.FTPControlSocket.validateReply(FTPControlSocket.java:1308) at com.enterprisedt.net.ftp.FTPControlSocket.setDataPort(FTPControlSocket.java:861) at com.enterprisedt.net.ftp.FTPControlSocket.sendPORTCommand(FTPControlSocket.java:715) at com.enterprisedt.net.ftp.FTPControlSocket.createDataSocketActive(FTPControlSocket.java:662) at com.enterprisedt.net.ftp.FTPControlSocket.createDataSocket(FTPControlSocket.java:629) at com.enterprisedt.net.ftp.FTPClient.createDataSocket(FTPClient.java:2756) at com.enterprisedt.net.ftp.FTPClient.dir(FTPClient.java:3918) at com.enterprisedt.net.ftp.FTPClient.dir(FTPClient.java:4023) at com.enterprisedt.net.ftp.FTPClient.dirDetails(FTPClient.java:3837)
The application runs fine on any machine other than the windows server in question.
We have tried the following measures, not being able to revert the error:
1) Opening all inbound and outbound ports in the Windows firewall
2) Changing the FTP connection from Active to Passive mode
Not much information about this anywhere - any help is appreciated
The solution to run Talend on a windows server was to set not only the FTP connection to passive mode but also define it as passive for each of the put, delete, list calls (there is an option at the bottom of these components).
Could not figure the reason as to why active mode fails even with all ports open (both on windows and AWS) : ftp calls are able to connect to the remote FTP server but any other command (list, put, delete) causes a 501 error and freezes the connection.
We were able to connect to the FTP server through 'This PC' -> 'Add Network Location' . The problem however persists
Hi,
Could you please check the security Group port details for the Windows EC2 instance?
Warm Regards,
Nikhil Thampi
Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved
Connecting to the FTP server from the command prompt works as expected:
ftp xx.xx.xx.xx
220 Microsoft FTP Service
200 OPTS UTF8 command successful - UTF8 encoding now ON.
After inserting user & password:
230 User logged in.
Hi,
Could you please use tFTPConnection and see whether connection is working properly from Talend. The issue could be because of some problem in tFTPDelete component. So lets first make sure that connection to FTP server is working fine in Talend, from the same machine in which connection was established through command line mode.
Warm Regards,
Nikhil Thampi
Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved
Sure - I am forwarding the opened ports in my EC2 instance in the attachment. The windows server itself has all ports (inbound and outbound) opened, as shown in the second attachment.
I am able to connect with the ftp command - but the java code throws the error both for active/passive modes (even though it runs fine from my notebook).
No FTP servers are being run on the Windows Server - the error also persists after machine restart.
Hi,
Thanks for the security group details. We can rule out that possibility (But please do not keep all the ports open for long time).
Could you please create a new Talend job with only tFTPConnection and try to connect to the server after providing the credentials? Please run the job from the same machine where you were able to connect through FTP command.
If the error persists, could you please share the screen shot of the job along with error details?
Warm Regards,
Nikhil Thampi
Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved
I have tried with a simpler job (attached) : the error remains the same
Sorry - the error message was not detailed as I had not checked 'die on error' . the complete message is in the attachment below
Hi,
The issue seems to happen even without Talend when the connection is not in Passive mode (please refer below forums). But in your case, I could see that you are already selecting Passive mode.
https://forums.iis.net/t/1157854.aspx?FTP+501+server+cannot+accept+argument
Since there is some limitation to check the issue real time, I would recommend to create support ticket for the issue so that Talend support team can connect with you through remote session.
If you are using a free version of Talend, could you please ask your network admins to check the details?
Warm Regards,
Nikhil Thampi
Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved