Details
-
Fix
-
Status: Released (View Workflow)
-
Major
-
Resolution: Fixed
-
1.12.10, 1.13
-
None
Description
Current Situation
- When setting the Parameter command_script_file to transfer a script file the SSH Job can´t establish a SFTP connection for the transfer.
- This problem affects SSH jobs running with a JobScheduler Master and with Agents.
- The job will raise an error message like this:
- [stdout] 20 17:10:29.702 [INFO ] (JobSchedulerJobAdapter.java:85) - 1.13.0 (2019-08-29 19:23, revision 82308e8d8f3b012872fd203d7f9b2fcd1d7a8b50) Copyright 2003-2019 SOS GmbH Berlin
[stdout] 20 17:10:29.819 [INFO ] (SOSMsg.java:108) - JSJ_I_0010: JobSchedulerJobAdapter::getNodeName: Current Job is 'chu_ste/factu/edi_pec.sh'.
[stdout] 20 17:10:29.893 [INFO ] (SOSVfsSFtpJCraft.java:956) - SOSVfs-D-0101: Try to connect to host 'myHostname' at Port '22'.
[stdout] 20 17:10:30.212 [INFO ] (SOSVfsSFtpJCraft.java:878) - SOSVfs_D_133: user 'myUsername' logged in.
[stdout] 20 17:10:30.212 [INFO ] (SOSSSHJobJSch.java:605) - *** Checking for remote Operating System and shell! ***
[stdout] 20 17:10:31.218 [INFO ] (SOSSSHJobJSch.java:628) - *** Command uname was executed successfully, remote OS and shell are Unix like! ***
[stdout] 20 17:10:33.220 [INFO ] (SOSVfsSFtpJCraft.java:520) - [echo %ComSpec%]
[stdout] 20 17:10:33.221 [INFO ] (SOSVfsSFtpJCraft.java:521) - [stdout]%ComSpec%
[stdout] 20 17:10:33.225 [ERROR] (SOSVfsTransferBaseClass.java:716) - (SOSVfsSFtpJCraft::getClient) SOSVfs_E_190: 'sshConnection Object' is not initialized (NULL)
[stdout] 20 17:10:33.225 [ERROR] (SOSVfsTransferBaseClass.java:680) - SOSVfs_E_196: ChannelSftp can't be created. (SOSVfs_E_190: 'sshConnection Object' is not initialized (NULL))
[stdout] 20 17:10:33.226 [ERROR] (SOSVfsSFtpJCraft.java:1096) - SOSVfs_E_196: ChannelSftp can't be created. (SOSVfs_E_190: 'sshConnection Object' is not initialized (NULL))
[stdout] com.sos.JSHelper.Exceptions.JobSchedulerException: SOSVfs_E_196: ChannelSftp can't be created. (SOSVfs_E_190: 'sshConnection Object' is not initialized (NULL))
[stdout] at com.sos.VirtualFileSystem.common.SOSVfsTransferBaseClass.raiseException(SOSVfsTransferBaseClass.java:681)
[stdout] at com.sos.VirtualFileSystem.SFTP.SOSVfsSFtpJCraft.getClient(SOSVfsSFtpJCraft.java:947)
[stdout] at com.sos.VirtualFileSystem.SFTP.SOSVfsSFtpJCraft.putFile(SOSVfsSFtpJCraft.java:1124)
[stdout] at com.sos.VirtualFileSystem.SFTP.SOSVfsSFtpJCraft.createScriptFile(SOSVfsSFtpJCraft.java:1088)
[stdout] at sos.net.ssh.SOSSSHJobJSch.execute(SOSSSHJobJSch.java:127)
[stdout] at sos.scheduler.job.SOSSSHJob2JSAdapter.doProcessing(SOSSSHJob2JSAdapter.java:108)
[stdout] at sos.scheduler.job.SOSSSHJob2JSAdapter.spooler_process(SOSSSHJob2JSAdapter.java:49)
[stdout] Caused by: com.sos.JSHelper.Exceptions.JobSchedulerException: SOSVfs_E_190: 'sshConnection Object' is not initialized (NULL)
[stdout] at com.sos.VirtualFileSystem.common.SOSVfsTransferBaseClass.raiseException(SOSVfsTransferBaseClass.java:686)
[stdout] at com.sos.VirtualFileSystem.SFTP.SOSVfsSFtpJCraft.getClient(SOSVfsSFtpJCraft.java:943)
[stdout] ... 5 more
[stdout] 20 17:10:33.228 [ERROR] (SOSSSHJobJSch.java:264) - SOSVfs_E_196: ChannelSftp can't be created. (SOSVfs_E_190: 'sshConnection Object' is not initialized (NULL))
[stdout] com.sos.VirtualFileSystem.common.SOSVfsTransferBaseClass.raiseException(SOSVfsTransferBaseClass.java:681)
[stdout] com.sos.VirtualFileSystem.SFTP.SOSVfsSFtpJCraft.getClient(SOSVfsSFtpJCraft.java:947)
[stdout] com.sos.VirtualFileSystem.SFTP.SOSVfsSFtpJCraft.putFile(SOSVfsSFtpJCraft.java:1124)
[stdout] com.sos.VirtualFileSystem.SFTP.SOSVfsSFtpJCraft.createScriptFile(SOSVfsSFtpJCraft.java:1088)
[stdout] sos.net.ssh.SOSSSHJobJSch.execute(SOSSSHJobJSch.java:127)
[stdout] sos.scheduler.job.SOSSSHJob2JSAdapter.doProcessing(SOSSSHJob2JSAdapter.java:108)
[stdout] sos.scheduler.job.SOSSSHJob2JSAdapter.spooler_process(SOSSSHJob2JSAdapter.java:49)
{{[stdout] }}
[stdout] 20 17:10:33.228 [ERROR] (SOSSSHJobJSch.java:265) - SOS-SSH-E-120: error occurred processing ssh command: ""SOSVfs_E_196: ChannelSftp can't be created. (SOSVfs_E_190: 'sshConnection Object' is not initialized (NULL)) com.sos.JSHelper.Exceptions.JobSchedulerException: SOSVfs_E_190: 'sshConnection Object' is not initialized (NULL)
[stdout] com.sos.JSHelper.Exceptions.JobSchedulerException: SOSVfs_E_196: ChannelSftp can't be created. (SOSVfs_E_190: 'sshConnection Object' is not initialized (NULL))
[stdout] at com.sos.VirtualFileSystem.common.SOSVfsTransferBaseClass.raiseException(SOSVfsTransferBaseClass.java:681)
[stdout] at com.sos.VirtualFileSystem.SFTP.SOSVfsSFtpJCraft.getClient(SOSVfsSFtpJCraft.java:947)
[stdout] at com.sos.VirtualFileSystem.SFTP.SOSVfsSFtpJCraft.putFile(SOSVfsSFtpJCraft.java:1124)
[stdout] at com.sos.VirtualFileSystem.SFTP.SOSVfsSFtpJCraft.createScriptFile(SOSVfsSFtpJCraft.java:1088)
[stdout] at sos.net.ssh.SOSSSHJobJSch.execute(SOSSSHJobJSch.java:127)
[stdout] at sos.scheduler.job.SOSSSHJob2JSAdapter.doProcessing(SOSSSHJob2JSAdapter.java:108)
[stdout] at sos.scheduler.job.SOSSSHJob2JSAdapter.spooler_process(SOSSSHJob2JSAdapter.java:49)
[stdout] Caused by: com.sos.JSHelper.Exceptions.JobSchedulerException: SOSVfs_E_190: 'sshConnection Object' is not initialized (NULL)
[stdout] at com.sos.VirtualFileSystem.common.SOSVfsTransferBaseClass.raiseException(SOSVfsTransferBaseClass.java:686)
[stdout] at com.sos.VirtualFileSystem.SFTP.SOSVfsSFtpJCraft.getClient(SOSVfsSFtpJCraft.java:943)
[stdout] ... 5 more
[stdout] 20 17:10:33.229 [FATAL] (SOSSSHJob2JSAdapter.java:51) - SOS-SSH-E-120: error occurred processing ssh command: ""SOSVfs_E_196: ChannelSftp can't be created. (SOSVfs_E_190: 'sshConnection Object' is not initialized (NULL)) com.sos.JSHelper.Exceptions.JobSchedulerException: SOSVfs_E_190: 'sshConnection Object' is not initialized (NULL) (SOSVfs_E_196: ChannelSftp can't be created. (SOSVfs_E_190: 'sshConnection Object' is not initialized (NULL)))
[stdout] sos.net.ssh.SOSSSHJobJSch.execute(SOSSSHJobJSch.java:266)
[stdout] sos.scheduler.job.SOSSSHJob2JSAdapter.doProcessing(SOSSSHJob2JSAdapter.java:108)
[stdout] sos.scheduler.job.SOSSSHJob2JSAdapter.spooler_process(SOSSSHJob2JSAdapter.java:49)
- [stdout] 20 17:10:29.702 [INFO ] (JobSchedulerJobAdapter.java:85) - 1.13.0 (2019-08-29 19:23, revision 82308e8d8f3b012872fd203d7f9b2fcd1d7a8b50) Copyright 2003-2019 SOS GmbH Berlin
Desired Behavior
**The SSH Job should try to open a SFTP channel to transfer the script file only in case if the parameter command_script_file is set.
Maintainer Note
The Issue was introduced due to JITL-558.
A patch is provided for JobScheduler 1.13.0 and 1.12.10 (LTS):
- For JobScheduler Master download the patch from the link below and copy the jar file to [SCHEDULER_HOME]/lib/patches directory.
- If the SSH Job runs on a JobScheduler Agent then copy the patch to the [SCHEDULER_HOME]/lib/patches folder of the Agent.
- The patch contains the changes for this issue as well as for
JITL-571.