9 Replies Latest reply on Jul 22, 2015 8:26 AM by Martín Ponce

    list servers in smart group

      Hi,

       

      Once again something is not working :/

       

      Desc:

      ALL - Smart Group - [/BladeLogic/Servers/ALL]

       

      Command:

      blcli_execute Server listServersInGroup '/ALL'

       

      Error:

      Command execution failed. com.bladelogic.om.infra.app.remote.BlRemoteException: com.bladelogic.om.infra.mfw.util.BlClientException: Failed to deserialize reply.: com.bladelogic.om.infra.mfw.util.BlException: Failed to deserialize reply.: java.lang.IllegalStateException: unread block data

       

      Are there any other commands to list servers from SG?

        • 1. Re: list servers in smart group
          Bill Robinson

          does the blcli version match the appserver version exactly ?

          • 2. Re: list servers in smart group
            Steven Alexson

            I am having a similar problem that I cannot list servers in a Smart Group through BLCLI. My error is a little different, however. The command is complaining that the group cannot be found with the specified name and a type of 5003 (Server Static Group). The BLCLI help on the command explicitly states it will list servers in both static and smart groups. I am running BSA 8.5 SP1? Perhaps this is another bug in SP1?

             

            BLCLI> Server listServersInGroup '/Enterprise/Regulatory Compliance/PCI/File Integrity Monitoring/ALL PCI'
            Command execution failed. com.bladelogic.om.infra.mfw.util.NotFoundException: Could not find server group with name : /Enterprise/Regulatory Compliance/PCI/File Integrity Monitoring/ALL PCI and type : 5003: com.bladelogic.om.infra.mfw.util.NotFoundException: Could not find server group with name : /Enterprise/Regulatory Compliance/PCI/File Integrity Monitoring/ALL PCI
            
            BLCLI> Group groupExistsByTypeAndName 5003 '/Enterprise/Regulatory Compliance/PCI/File Integrity Monitoring/ALL PCI'
            false
            BLCLI> Group groupExistsByTypeAndName 5007 '/Enterprise/Regulatory Compliance/PCI/File Integrity Monitoring/ALL PCI'
            true
            

             

            Any thoughts before I open an incident ticket with BMC support?

            • 3. Re: list servers in smart group
              Bill Robinson

              this works for me:

              # blcli_execute Server listServersInGroup "/Workspace/All Servers"

              win08x64-85

              cos6x64-85

              red5x64-85

              red6x64-85

              ....

               

              'All Servers' is a smart group.  this is w/ 8.5.01.301 (p5) and 8.3.03.  it's possible that something was messed up between there. 

              • 4. Re: list servers in smart group
                Steven Alexson

                Well, I just tried again...

                 

                This time I copied the group path out of the console and pasted into my CL. Wouldn't you know it, it worked. So, I then tried my original command with the hand-typed group path, and it still generates the error. I copied paths into a text document, and the look identical:

                 

                /Enterprise/Regulatory Compliance/PCI/File Integrity Monitoring/All PCI    (copied path)
                /Enterprise/Regulatory Compliance/PCI/File Integrity Monitoring/All PCI    (hand-typed path)
                


                In my original post, the command to check if the group exists was able to correctly identify the group in as existing. Not sure what the difference is (gremlins, perhaps), but as long as it is working. Perhaps so weird invisible character encoding or something.

                • 5. Re: list servers in smart group
                  Bill Robinson

                  Maybe there is an extra character in the group name ?  like a space at the end ?

                  • 6. Re: list servers in smart group

                    Probably you are right. In my new installation this command works.

                    • 7. Re: list servers in smart group
                      Martín Ponce

                      Hi All,

                       

                      I´m facing the same problem in my 8.3.02.407 NSH version.

                      May be someone can bring me a light on this...

                       

                      I try to execute this script, from the NSH CLI:

                      ====================================================

                      #blcli_setjvmoption -Xmx768

                      blcli_setoption serviceProfileName XXXXXX

                      blcli_setoption roleName XXXXXXXXXXXXX

                      blcli_connect

                       

                      GROUP="/Bladelogic/Servers/Delivery Brasil/VDC Argentina/Windows_Obsoletos"

                       

                      blcli_execute Server listServersInGroup "${GROUP}"

                      ====================================================

                       

                      resulting this:

                       

                      --------------------------------------------------------------------------------------------------------

                      WSR700004% ./lista_server.nsh

                      Command execution failed. com.bladelogic.om.infra.mfw.util.NotFoundException: Could not find server group with name : /Bladelogic/Servers/Delivery Brasil/VDC Argentina/Windows_Obsoletos and type : 5003: com.bladelogic.om.infra.mfw.util.NotFoundException: Could not find server group with name : /Bladelogic/Servers/Delivery Brasil/VDC Argentina/Windows_Obsoletos

                      --------------------------------------------------------------------------------------------------------

                       

                      And I´m quite sure about there is no space o extra character in the namespaces, because I copied y paste it into a notepad.

                      In fact I got this: /Bladelogic/Servers/Delivery Brasil/VDC Argentina/Windows_Obsoletos

                      error_smart_group.JPG

                      Any idea or recommendation will be really appreciated.

                      Thank in advance guys!

                      Martin

                      • 8. Re: list servers in smart group
                        Bill Robinson

                        the group path should be: /Delivery Brasil/VDC Argentina/Windows_Obsoletos


                         

                        • 9. Re: list servers in smart group
                          Martín Ponce

                          Awesome Bill!!!.. it worked perfectly.

                           

                          Thanks again.

                          Martin