Forum Discussion

Anthony_Gerace_'s avatar
Anthony_Gerace_
Historic F5 Account
Dec 07, 2007

Unable to create GlobalLB Servers

Hi All,

I'm attempting to create a group of servers in GTM and my script keeps failing with the following error

error_string: 01020037:3: The requested GTM server (Server105) already exists.

The server does not already exist. I have verified this through the gui and looking at the wideip.conf file.

I have tried this in VB.net and in Perl with versions 9.3.0 HF3 and 9.3.1 and receive the same error. The VB version shown is below.

Any suggestions?

Thanks

Anthony

my script:

   Sub Main()
        Dim host As String = "ltm"
        Dim uName As String = "admin"
        Dim uPass As String = "admin"
        Dim soap As iControl.Interfaces = New iControl.Interfaces
        Dim index As Integer = 0
        Dim numServers As Integer = 5
        Dim dcNum As Integer = 1
        Dim servers(4) As iControl.GlobalLBServerServerIPDefinition
        Dim server As iControl.GlobalLBServerServerIPDefinition = New iControl.GlobalLBServerServerIPDefinition
        Dim sAddresses(0) As iControl.GlobalLBServerServerIPsForUnitID
        Dim sAddress As iControl.GlobalLBServerServerIPsForUnitID = New iControl.GlobalLBServerServerIPsForUnitID
        Dim aOnUnit(0) As String
        Dim types(4) As iControl.GlobalLBServerType
        Dim data_centers(4) As String
        Dim sType As iControl.GlobalLBServerType = iControl.GlobalLBServerType.SERVER_TYPE_BIGIP_STANDALONE
        Dim dc As String = Nothing
        Dim address As String = Nothing
        Dim sName As String = Nothing
        Dim sNum As Integer = 1
        While index < numServers
            address = "10.0." & index & ".1"
            sName = "Server0" & sNum
            dc = "dc" & dcNum
            data_centers(index) = dc
            aOnUnit(0) = address
            sAddress.unit_id = 1
            sAddress.addresses_on_unit = aOnUnit
            sAddresses(0) = sAddress
            server.server = sName
            server.addresses = sAddresses
            servers(index) = server
            types(index) = sType
            If dcNum = 1 Then
                dcNum = 2
            Else
                dcNum = 1
            End If
            index += 1
            sNum = index + 1
        End While
        soap.initialize(host, uName, uPass)
        soap.GlobalLBServer.create(servers, types, data_centers)
    End Sub
No RepliesBe the first to reply