Remote command function in RA FTP Job not working

Document ID : KB000089419
Last Modified Date : 14/04/2018
Show Technical Document Details
Issue:
Remote command function in RA FTP Job not working
Resolution:

Symptoms

  • Remote command function in RA FTP throws Java exception in Job Report


Investigation

Data needed for analysis:

  • All Reports written by the Job that caused the error.

The following error message can be found in the Job report:  

Executing command: ls
on CONNECTION
Error getting RemoteCommand interface reference.
com.uc4.ftpjob.DataTransferException: Error getting RemoteCommand interface reference.
    at com.uc4.ftpjob.commands.impl.RemoteCommand.execute(RemoteCommand.java:50)
    at com.uc4.ftpjob.commands.CommandProcessor.execCommand(CommandProcessor.java:245)
    at com.uc4.ftpjob.commands.CommandProcessor.processCommands(CommandProcessor.java:161)
    at com.uc4.ftpjob.commands.CommandProcessor$processCommands.call(Unknown Source)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:40)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:120)
    at FtpJob.runJob(FtpAgent.groovy:437)
    at com.uc4.extensibility.types.CITAgent.dispatchJob(CITAgent.java:253)
    at com.uc4.ex.cit.CITJob.execute(CITJob.java:176)
    at com.uc4.ex.Job.run(Job.java:464)
    at com.uc4.ex.ThreadPool$RunnableDecorator.run(ThreadPool.java:53)
    at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
    at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
    Caused by: com.uc4.ftpjob.DataTransferException: Error getting RemoteCommand interface reference.
    at com.uc4.ftpjob.commands.FtpFacadeCommandImpl.throwDataException(FtpFacadeCommandImpl.java:57)
    at com.uc4.ftpjob.commands.FtpFacadeCommandImpl.getRemoteCommand(FtpFacadeCommandImpl.java:470)
    at com.uc4.ftpjob.commands.impl.RemoteCommand.execute(RemoteCommand.java:33)
    ... 17 more
    Caused by: java.net.ConnectException: Verbindungsaufbau abgelehnt
    at java.net.PlainSocketImpl.socketConnect(Native Method)
    at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
    at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
    at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
    at java.net.SocksSocketImpl.connect(Unknown Source)
    at java.net.Socket.connect(Unknown Source)
    at org.apache.commons.net.SocketClient.connect(SocketClient.java:171)
    at org.apache.commons.net.SocketClient.connect(SocketClient.java:192)
    at com.uc4.ftpjob.commands.TelnetClient.initSession(TelnetClient.java:83)
    at com.uc4.ftpjob.commands.TelnetClient.<init>(TelnetClient.java:59)
    at com.uc4.ftpjob.commands.FtpCommandImpl.getRemoteCommand(FtpCommandImpl.java:118)
    at com.uc4.ftpjob.commands.FtpFacadeCommandImpl.getRemoteCommand(FtpFacadeCommandImpl.java:467)
    ... 18 more

Cause

The issue occurred because the customer was using an FTP connection object with an ssh connection.


Resolution

Remote commands in an RA FTP Job only work with:

  • Telnet for FTP Connection objects.
  • SSH for SFTP Connection objects.