SFTP Jobs fail with FileNotFoundException after applying software security patch on Windows and updating AE and RA FTP Agent

book

Article ID: 87489

calendar_today

Updated On:

Products

CA Automic Workload Automation - Automation Engine AUTOMIC WORKLOAD AUTOMATION

Issue/Introduction

Error Message :
java.io.FileNotFoundException: C:\Windows\System32\config\systemprofile\.ssh\known_hosts (The system cannot find the path specified)

After applying a security patch to a Windows server, upgrading the Automation Engine (AE) to 10.0.8, and upgrading the RA FTP Agent, SFTP jobs fails to start and the above error message is displayed indicating that the path 

C:\Windows\System32\config\systemprofile\.ssh

cannot be found.

Full Error:

2016-12-06 09:18:00 Using hosts file = C:\Windows\System32\config\systemprofile/.ssh/known_hosts java.io.FileNotFoundException: C:\Windows\System32\config\systemprofile\.ssh\known_hosts (The system cannot find the path specified) com.uc4.ftpjob.DataTransferException: Connection exception. at com.uc4.transfer.CITSFTPImpl.<init>(CITSFTPImpl.java:214) at com.uc4.ftpjob.connections.ConnectionFactory$1.run(ConnectionFactory.java:61) at java.lang.Thread.run(Unknown Source) Caused by: com.jcraft.jsch.JSchException: java.io.FileNotFoundException: C:\Windows\System32\config\systemprofile\.ssh\known_hosts (The system cannot find the path specified) at com.jcraft.jsch.KnownHosts.setKnownHosts(KnownHosts.java:57) at com.jcraft.jsch.JSch.setKnownHosts(JSch.java:317) at com.uc4.transfer.CITSFTPImpl.<init>(CITSFTPImpl.java:190) ... 2 more Caused by: java.io.FileNotFoundException: C:\Windows\System32\config\systemprofile\.ssh\known_hosts (The system cannot find the path specified) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.<init>(Unknown Source) at java.io.FileInputStream.<init>(Unknown Source) at com.jcraft.jsch.KnownHosts.setKnownHosts(KnownHosts.java:53) ... 4 more

The Job aborts and exception errors can be found in the log:

+++++++++++++++++++++++++++++++++++++ Start of Runtime Exception ++++++++++++++++++++++++++++++++++++ com.uc4.ftpjob.commands.AbortJobException: Job aborted. at com.uc4.ftpjob.commands.CommandProcessor.execCommand(CommandProcessor.java:293) at com.uc4.ftpjob.commands.CommandProcessor.processCommands(CommandProcessor.java:162) 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:304) at com.uc4.extensibility.types.CITAgent.dispatchJob(CITAgent.java:258) at com.uc4.ex.cit.CITJob.execute(CITJob.java:179) at com.uc4.ex.Job.run(Job.java:469) 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: Connection exception. at com.uc4.transfer.CITSFTPImpl.<init>(CITSFTPImpl.java:214) at com.uc4.ftpjob.connections.ConnectionFactory$1.run(ConnectionFactory.java:61) ... 1 more Caused by: com.jcraft.jsch.JSchException: java.io.FileNotFoundException: C:\Windows\System32\config\systemprofile\.ssh\known_hosts (The system cannot find the path specified) at com.jcraft.jsch.KnownHosts.setKnownHosts(KnownHosts.java:57) at com.jcraft.jsch.JSch.setKnownHosts(JSch.java:317) at com.uc4.transfer.CITSFTPImpl.<init>(CITSFTPImpl.java:190) ... 2 more Caused by: java.io.FileNotFoundException: C:\Windows\System32\config\systemprofile\.ssh\known_hosts (The system cannot find the path specified) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.<init>(Unknown Source) at java.io.FileInputStream.<init>(Unknown Source) at com.jcraft.jsch.KnownHosts.setKnownHosts(KnownHosts.java:53) ... 4 more ++++++++++++++++++++++++++++++++++++++ End of Runtime Exception ++++++++++++++++++++++++++++++++++++++

Investigation

The permissions are set so that the Agent is able to read, write, delete files from the directory specified in the error.

The file mentioned in the error is accessible, both the path and the file is correct and available.

The problem was that the 32-bit Java was searcing the the 64-bit folder and path instead of the 32-bit path.  However, the path in the error message that was being displayed shows the 32-bit Java path and not the invalid 64-bit path.  Had the error shown the actual path the Agent was trying to reach, the error could have quickly been resolved.

Why did the Agent search in the wrong folder?

Cause

Cause type:
Configuration
Root Cause: Most likely earlier the Agent was once started with a 64bit JVM therefore the wrong path was taken.

Environment

OS: Windows
OS Version: N/A

Resolution

The path is set and located from the JVM and not from Automic. 

Please refer to https://docs.oracle.com/javase/tutorial/essential/environment/sysprop.html) (user.home). 

Most likely the Agent had been started with a 64bit JVM at some point, causing the issue.
 

Fix Status: No Fix

Fix Version(s):
N/A

Additional Information

Workaround :
N/A