7 Replies Latest reply on Jun 9, 2014 6:08 AM by Monoj Padhy

    NSH script hungs on Server listServersInGroup command

    Monoj Padhy



      I found little weird while executing NSH job. Sometimes the job executes successfully and sometimes it hungs for the same set of target servers. It doesn't time out or fail and most time I end up having to cancel it.


      In the script we have passed a server group name and if server group contains any servers then remove the existing server list and then add new servers from a csv file.

      Below is the part script.


      echo "executing listServersInGroup"

      echo "----------------------"

      echo "blcli_execute Server listServersInGroup "${SERVER_GROUP_LOCATION}"/"${SERVER_GROUP_NAME}""


      # script hangs here.

      SERVER_LIST=`blcli_execute Server listServersInGroup "${SERVER_GROUP_LOCATION}"/"${SERVER_GROUP_NAME}"`


      echo "----------------------------"

      echo "Server remove process begins"

      echo "----------------------------"

      for ServerName in $SERVER_LIST



      echo "-----------------------------"

      echo "Server $ServerName is removed"

      echo "-----------------------------"


      blcli_execute StaticServerGroup removeServerFromServerGroupByName "${SERVER_GROUP_LOCATION}"/"${SERVER_GROUP_NAME}" $ServerName > /dev/null




      The same set of code works fine sometimes and removes the servers from the server group name passed to the script. However, sometime the script hangs while executing listServersInGroup command.

      Attached screen shot of both scenario for your reference.

      Any idea what could be causing issue here and hangs the NSH job (BSA 8.2).