3 Replies Latest reply on Dec 15, 2010 8:36 PM by Edwin Lindeman

    Script Hangs on blcli_connect

    Edwin Lindeman

      I have a script that runs succesfully when i run it from the NSH shell. However if I drop that script into nsh script job and run it from the console it hangs and the job never fails. I looked the the rscd logs, appserver logs and not much information there on why it hangs. Below is a snipped from the script. ########## blcli_disconnect blcred cred -acquire -profile $profileName -username $userName -password $userPassword blcli_setoption serviceProfileName $profileName blcli_setoption roleName $userRole blcli_connect echo "made it" ############# Any help on this would be appreciated. Thank you

        • 1. Script Hangs on blcli_connect

          Hmm not sure which part is failing but you could try this to help identify where its hanging/failing.


          #!<path to nsh e.g. /usr/nsh/bin/nsh>


          # Set the NULL device

          if [ -c /dev/null ]







          # Create ErrorHandler

          echo "Setting errorHandler"

          function errorHandler




            if [ ${RETURN_CODE} -ne 0 ]


              echo "ERROR: ${MSG}"

              exit ${RETURN_CODE}


              echo "SUCCESS: ${MSG}"






          errorHandler ${?} "Connect to BLCLI"


          echo "blcred cred -acquire -profile $profileName -username $userName -password $userPassword"

          blcred cred -acquire -profile $profileName -username $userName -password $userPassword

          errorHandler ${?} "Set Credentials"


          echo "blcli_setoption serviceProfileName $profileName"

          blcli_setoption serviceProfileName $profileName

          errorHandler ${?} "Set Profile"


          echo "blcli_setoption roleName $userRole"

          blcli_setoption roleName $userRole

          errorHandler ${?} "Set Role"



          errorHandler ${?} "Connect to BLCLI"


          echo "made it"



          This way if it hangs and you cancel the NSHScript Job you should get some feedback in the Job log.

          Unless its the first step failing of course.


          You could also use blcli_storeenv to catch the output of each command.


          The only other thing I could suggest is ensure that the Profile you are setting exists on your BladeLogic server, it will probably differ from Profile name in your NSH client.



          1 of 1 people found this helpful
          • 2. Script Hangs on blcli_connect
            Edwin Lindeman

            Thanks for the reply. Where its haning is when i call 'blcli_connect'. The job just sits there and eventually i abort the job.  I can't even make far enough to call blcli_storeenv. I will try the above. Thank you

            • 3. Script Hangs on blcli_connect
              Edwin Lindeman

              Tried again on a different server and it works with no issues.  Looks like there was a firewall issue on the other end. Thanks for the help.