Background:

The RMM needs to be able to execute files that are in the /var/tmp/rackware directory of a Linux origin server by default.    If the origin server has "noexec" on the  /var or /var/tmp lines in the /etc/fstab file, a Stage 1 Sync or a Host Sync will fail.


Symptoms:


If running RMM version 7.4 the error will be:


    RSP_SYNC_ERROR SYNC_ERROR_EXAMINE STATUS_ERROR

    Details: Cannot execute sync/host-examine -d. Please check execute permissions of /var/tmp/rackware on rackware@<ip         address>


while a sync with RMM version 7.6 will fail with the error:

    RSP_SYNC_ERROR  SYNC_ERROR_DEPLOY_RWSH  STATUS_ERROR

    Details: Cannot execute repository/x86_64/linux/portable/rwsh sync/host-deploy-rwsh   -d /var/tmp/rackware/bin             repository/x86_64/linux/portable/rwsh. Please check execute permissions of /var/tmp/rackware o


Workaround 1:

If the /etc/fstab file on the source server contains "noexec" on either a line for /var or a line for /var/tmp, then remove the "noexec" option from that line and then remount the partitions using the commands:


    sudo mount -o remount, exec /var
or

    sudo mount -o remount, exec /var/tmp


If a security policy prevents removal of “noexec” from /var/tmp, the directory the RMM uses can be changed from /var/tmp to some other directory, which does not have a noexec option in the /etc/fstab file with Workaround 2.


Workaround 2:


If a security policy prevents removal of “noexec” from /var/tmp, the directory the RMM uses can be changed from /var/tmp to some other directory, which does not have a noexec option in the /etc/fstab file.


In this case the RMM will need to use a directory other than /var/tmp to store the files it needs to execute.  


On the source server, create a directory to be used for this purpose, for example,  /temp.   If you are using a user other than root to ssh to the source server, then, while root,  make that user the owner of the directory with the 'chown' command.    For example, if using rackware to ssh to the source server:

cd /
chown rackware /temp



On the RMM, open the /opt/rackware/data/options file with an editor, and find the line that says

       #policy_remoteTempDir=/var/tmp/rackware


Remove the # from the line, and change the  "/var/tmp/rackware" to the name of the directory appended by 'rackware' you wish to use.   For example, if you are using /temp we change it to
      

       policy_remoteTempDir=/temp/rackware


Then save the changes in the /opt/rackware/data/options file.


For the changes to be effective, the RMM must be restarted.    Please note that when the RMM comes up with this change in effect, it will affect all syncs being done by the RMM.    When there are no syncs in progress, restart the RMM with the command "rwadm restart".


Once the RMM comes back up, restart the sync.


**Note - if the RMM is being used only for the Assessment functionality (not for migrations or DR) the rest of this article does not apply **


If the sync was performing an autoprovision of the target server, the target server will get created but then the sync will fail with an error similar to

    SYNC_ERROR_DETERMINE_BOOTED_OS/0x15

    Failed to unpack remote files for remote command execution. Please check for available space and write permissions on         /temp on opc@<target ip>, and verify that the tar command is installed on opc@<target IP>.


If the sync was performing the initial sync of a preprovisioned target, the same error will be seen.



To get past this error, do the following:



1) ssh to the target server as the user that is used as the default user for the OS of the source server in the target cloud.   Please contact support@rackwareinc.com and let them know the Linux distribution of the  source server, and the target cloud.    The RackWare support team will let you know the correct user to use for your situation.   Once you know the correct user, ssh to the target server and issue the following commands:

 

2)   sudo mkdir -p /temp

3)   sudo chmod 777 /temp


Then exit from the ssh session and execute the sync again.    On the RMM GUI, the TargetType will already be set to Existing System, and the Target IP Address and Target Friendly Name will already be filled in.  Press the Play/Start button. to perform the sync.


Once the initial sync is successful, no further changes will be needed for the delta syncs.