SFTP RA FTP agent error com.jcraft.jsch.JSchException: Auth fail

Document ID : KB000096524
Last Modified Date : 27/07/2018
Show Technical Document Details
A ZDU upgrade from v11.2.2 to v12.1.0 is causing RA FTP jobs to fail with:
    at sun.reflect.GeneratedMethodAccessor40.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at com.uc4.be.util.InvokeUtil.invoke(InvokeUtil.java:107)
    at com.uc4.be.util.InvokeUtil.invoke(InvokeUtil.java:54)
    at com.uc4.ex.cit.CITJob.executeFormsRequest(CITJob.java:341)
    at com.uc4.ex.cit.CITJob.execute(CITJob.java:180)
    at com.uc4.ex.GUIJob.run(GUIJob.java:110)
    at com.uc4.ex.ThreadPool$RunnableDecorator.run(ThreadPool.java:53)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
Caused by: com.uc4.ftpjob.DataTransferException: Connection exception.
    at com.uc4.transfer.CITSFTPImpl.<init>(CITSFTPImpl.java:222)
    at com.uc4.ftpjob.connections.ConnectionFactory$1.run(ConnectionFactory.java:70)
    ... 1 more
Caused by: com.jcraft.jsch.JSchException: Auth fail
    at com.jcraft.jsch.Session.connect(Session.java:519)
    at com.jcraft.jsch.Session.connect(Session.java:183)
    at com.uc4.transfer.CITSFTPImpl.<init>(CITSFTPImpl.java:202)
    ... 2 more

1. From putty command line: sftp <host>
2. Create a new conn object with the sftp, port 22, credentials 
3. Create a new ra ftp job 
a. Delete the content of the /opt/automic/RAFTP/bin/cache folder 
b. Dtop ra ftp agent 
c. Restart ra ftp agent with disable_cache in the start parameter: 
java -jar /opt/automic/RAFTP/bin/ucsjcitx.jar disable_cache
5. Stop the ra ftp agent 
6. Reload to database the RA FTP most recent version of the solution
7. Enable trace on RA FTP agent, RA=99 in the .ini
8. Start ra ftp agent 
9. Go to RA FTP bin/lib folder 
Expected: nothing should be in there for latest version of solution 
10. Go to RA FTP bin/shared folder 
Expected content:
11. Ask the System Admin for the system logs on the server that shows what it returns when the RA FTP logs into the server. 
12. Compare a working RA FTP job's report with a non-working RA FTP job's report.
Job report shows:
2018-05-30 15:42:39 Remote version string: SSH-2.0-1.00 FlowSsh: WinSSHD 5.03 

The remote server is running a software that has been released on WinSSHD 5.03: [ 28 November 2008 ] 

Due to security reasons the JSCH library used in RA FTP 4.0.5 did already drop the support of old, outdated and already breached encryptions, whereas the library used in the old 3.1.4 still supported them. 

Another cause is that there were changes made on the FTP server that the current jsch*.jar file does not account for.

Reach out to the System administrator or FTP server vendor to upgrade the WinSSHD software on the SFTP server. 

Alternatively, another possible solution is to upgrade the jsch*.jar to the latest version:

1) Download the latest file from the following link: http://www.jcraft.com/jsch/
2) Stop the Agent.
3) Backup and move the jsch*.jar in the Agent's bin/lib folder. 
4) Place the downloaded jsch*.jar in the Agent's bin/lib folder.
5) Restart the Agent.