Control-M Remote Host platforms on Linux had the /bin/bash shell updated to resolve the Shellshock exploit. Since then, jobs submitted to the Remote Hosts produces the following message in the job Log: Error: Could not determine the OS type on remote host!!!" |
Before submitting a job to a remote host, Control-M performs a test by submitting the command "cmd.exe /c ver". Depending on the reply received, the OS platform (Windows, UNIX or VMS) is determined and the appropriate formatting takes place for the job submission. Setting the Control-M Agent used to define these Remote hosts to debug level 4, then reproducing the failure, the Agent "AS*" proclogs will show the submit command: 1025 08:39:49:981 AS:RJX: - RJX_ssh_command_submit: Command - successfully submitted
1025 08:39:49:981 AS:RJX: - RJX_ssh_command_submit_sync: Command - cmd.exe /c ver
However, yo uwill notice it is stuck on waiting for a return from testing for the VMS OS, after which it cannot determine the OS:
1025 08:45:50:122 AS:>>> SshJob::checkOpenVMS enter, op = 3
1025 08:45:50:145 AS:OpenVMS platform not detected.
1025 08:45:50:145 AS:>>> SshJob::findNotFound enter
1025 08:45:50:146 AS:>>> SshJob::findNotFound exit
1025 08:45:50:146 AS:>>> SshJob::findNotFound enter
1025 08:45:50:146 AS:>>> SshJob::findNotFound exit
1025 08:45:50:146 AS:SshJob::checkPlatform: could not determine the OS type. Try #1
To confirm, the /bin/bash problem, logon to the Remote Host platform as the job owner and initiate a bash shell and run the command "cmd.exe /c ver". On a problematic system, you will receive the following output:
apacheta@ApachetaVM:~$ cmd.exe /c ver
apacheta@ApachetaVM:~$ echo $?
127
apacheta@ApachetaVM:~$ echo $?
0
On a working system, thestandard output should read "cmd.exe: command not found", which the Agent uses to identify the OS as UNIX:
raffi@badwrench:~$ cmd.exe /c ver
cmd.exe: command not found
raffi@badwrench:~$ echo $?
127
raffi@badwrench:~$ echo $?
0
As of Control-M Agent 7.0.00 Fixpack 3, fixes are available which may be used to bypass this OS check as these Remote Hosts were working at one point:
1. Since the Remote Host was previously defined and working, disable the automatic mechanism used to determine the remote host platform type, and specify the platform type manually. In the Control-M Configuration Manger GUI, set the Control-M/Agent system parameter "RJX_FORCE_OS_CHECKING" to "M".
2. When defining subsequent new Remote Hosts, define and run a job with autoedit variable %%RJX_REMOTE_PLATF set to Windows, UNIX, or OVMS (depending on the remote host OS type). A successful job run creates the remote host details file after which the autoedit variable can be removed from the job definition. You may also opt to copy
an existing remote host details file in the DATA/rhdetails directory and modify the information as required. |