9 Replies Latest reply on Mar 20, 2014 9:55 AM by Bill Robinson

    NSH Script Job Error

    Vinnie Lima

      Hi Folks,


      Trying to run a simple nsh script job against a host, and I get:


      java.io.IOException: JNI file copy from '/E/Program Files/BMC Software/BladeLogic/8.1/Operations Manager/NSH/tmp/job_deployment_asalsitcwvbsa01acnatlas/277f3c1b-1c2d-4012-b1dd-b0b44974a4ec' to '/E/Program Files/BMC Software/BladeLogic/8.1/Operations Manager/NSH/tmp/job_deployment_asalsitcwvbsa01acnatlas/scripts/job__b141b6bb-2079-4942-ac9f-c52cae7a0bab/script_DBKey-SJobKeyImpl-7118-1__48e9f345-c8bf-42eb-8d19-1fef3c29d02d.44886.1_auto_rhn_patch_download-x86_64.nsh' failed: : No such file or directory


      I checked that the <...>/NSH/tmp/job_deployment... folder exists.  I even shut down BSA services, renamed the tmp folder, and restarted BSA services (it created a new tmp folder) - but I get the same error when running the NSH script job.


      Any suggestions?  BSA 8.1.2 on Windows 2008 R2




        • 1. Re: NSH Script Job Error
          Lazar NameToUpdate

          How about the actual file that we cannot seem to copy - does it exist in the source folder:

          /E/Program Files/BMC Software/BladeLogic/8.1/Operations Manager/NSH/tmp/job_deployment_asalsitcwvbsa01acnatlas/277f3c1b-1c2d-4012-b1dd-b0b44974a4ec ?


          If you have multiple appservers (or instances, perhaps), there is a possibility that the file was first copied to the tmp folder of the deployment that started the job, but the WorkItemThread to execute that actual task is delegated to another instance, and the other instance is looking for this file in its tmp folder and therefore cannot find it. To check this look for the file in the other deployment, or leave just one appserver running and test (this should work).

          If this is a root cause, then I believe we may have fix this issue in a later service pack (needs to be validated).


          Also, (off-topic, just curious) I haven't seen the "Operations Manager" folder being used before? Is this stand-alone BSA, or part of CLM maybe?

          • 2. Re: NSH Script Job Error
            Vinnie Lima

            So the folder content is empty, but by the time I get to look at it, its too late (job already failed).


            This is a single app server/job server instance.  Deployed as part of CLM 2.1 SP1.

            • 3. Re: NSH Script Job Error
              Lazar NameToUpdate

              OK Vinnie, taking a lunch break from the training, and I see what the problem is. The path for the file that it's trying to create is 260+ chars, which is more that allowable Windows OS limit of 254/5.


              /E/Program Files/BMC Software/BladeLogic/8.1/Operations Manager/NSH/tmp/job_deployment_asalsitcwvbsa01acnatlas/scripts/job__b141b6bb-2079-4942-ac9f-c52cae7a0bab/script_DBKey-SJobKeyImpl-7118-1__48e9f345-c8bf-42eb-8d19-1fef3c29d02d.44886.1_auto_rhn_patch_download-x86_64.nsh


              So, cutting the NSH Script file path will fix the issue, though I'm not sure why did we design in a way to allow such long paths.

              • 4. Re: NSH Script Job Error
                Vinnie Lima

                So I recreated the NSH script with a much shorter name, and re-ran the NSH Job and it worked. Lazar's suggestion above fixed it.

                • 5. Re: NSH Script Job Error
                  Bill Robinson

                  The CLM installer adds some ‘extra’ directories - ‘Operations Manager’ – and also uses some very long instance names.  That exceeds the windows path limit of 256 characters when coupled w/ the temp file name for the job.  I believe there is a defect submitted for the clm installer to not used the extra/long paths.

                  • 6. Re: NSH Script Job Error
                    Kate Fell

                    Hi Bill, we are seeing the same issue when trying to do a job export in CLM 3.0. Is there any workaround for this?

                    • 7. Re: NSH Script Job Error
                      Bill Robinson

                      On windows?  is the path to the script more than 256 characters ?

                      • 8. Re: NSH Script Job Error
                        Kate Fell

                        Yes it is on windows and the path is more than 256... If it is possible to move the temp export location from D:/Program Files/BMC Software/BladeLogic/8.1/Operations Manager/NSH/tmp/ to something like D:/BSA/ it may be enough.. It this set somewhere in a config file that can be edited? It is a job that is being exported which includes custom software.

                        • 9. Re: NSH Script Job Error
                          Bill Robinson

                          i think the only option is to re-install w/ a shorter path.  taking 'operations manager' out of the path usually does it.