For more information regarding the security incident at F5, the actions we are taking to address it, and our ongoing efforts to protect our customers, click here.

Forum Discussion

wayney_128269's avatar
wayney_128269
Icon for Nimbostratus rankNimbostratus
Aug 18, 2005

example of a call to PoolMember.set_monitor_state

 

I cannot find any sample C code in the SDK that does a call to PoolMember.set_monitor_state. Can someone send me some sample c code that makes this call?

 

 

thanks

 

wayne

13 Replies

  •  

    Yes, port 80 is in Pool100 and port 443 is in Pool101.

     

     

    So I made the changes you suggested and its now coming back with

     

     

     

    Could not find element by name: member

     

    at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClie

     

    ntMessage message, WebResponse response, Stream responseStream, Boolean asyncCal

     

    l)

     

    at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodN

     

    ame, Object[] parameters)

     

    at PoolMember.LocalLBPoolMember.set_monitor_state(String[] pool_names, LocalL

     

    BPoolMemberMemberMonitorState[][] monitor_states)

     

    at Pool.Class1.setPoolInfo(String[] pool_name)

     

     

    thanks

     

    wayne
  • Posted By Joe on 9/26/2005 11:51 AM

     

     

    Wayne,

     

     

    What is your configuration? The code looks odd as you are passing in two pools in the first parameter, but not sending in any monitor_states for the second pool.

     

     

    ie.

     

    +pool101

     

    |-- 10.10.10.12:443 (DISABLED)

     

    |-- 10.10.10.12:80 (DISABLED)

     

    +pool100

     

     

    Is the node listening on 80 in your pool101? That is what it seems the error is indicating? The reason why I'm confused is that you specified in the post that you were trying to manage two pools when this error occurred.

     

     

    If the 80 node is in the second pool, you need to add that monitor state to the second entry in the first dimension of the array:

     

     

    String [] pool_names = new String[] { "pool101","pool100" };
    PoolMember.LocalLBPoolMemberMemberMonitorState[][] monitor_states = 
      new PoolMember.LocalLBPoolMemberMemberMonitorState[2][];
    // For pool pool101
    monitor_states[0] = new PoolMember.LocalLBPoolMemberMemberMonitorState[1]; 
    monitor_states[0][0] = new PoolMember.LocalLBPoolMemberMemberMonitorState();
    monitor_states[0][0].member = new PoolMember.CommonIPPortDefinition();
    monitor_states[0][0].member.address = "10.10.10.12";
    monitor_states[0][0].member.port = 443;
    monitor_states[0][0].monitor_state = PoolMember.CommonEnabledState.STATE_DISABLED;
    // For pool pool100
    monitor_states[1] = new PoolMember.LocalLBPoolMemberMemberMonitorState[1]; 
    monitor_states[1][0] = new PoolMember.LocalLBPoolMemberMemberMonitorState();
    monitor_states[1][0].member = new PoolMember.CommonIPPortDefinition();
    monitor_states[1][0].member.address = "10.10.10.12";
    monitor_states[1][0].member.port = 80;
    monitor_states[1][0].monitor_state = PoolMember.CommonEnabledState.STATE_DISABLED;
    PoolMember2.set_monitor_state(pool_names, monitor_states);

     

     

    This will send the following:

     

     

    +pool101

     

    |-- 10.10.10.12:443 (DISABLED)

     

    +pool100

     

    |-- 10.10.10.12:80 (DISABLED)

     

     

    Which is what I think you are trying to do? Correct me if I've got it wrong.

     

     

    -Joe

     

     

  • Your best bet is to turn on iControl tracing on the BIG-IP.

     

     

    $ b db iControl.LogLevel trace

     

    $ bigstart restart httpd

     

     

     

    This will dump the raw a decoded requests into the /var/log/ltm logfile. Looking at the two app requests will likely show that there is something amiss with the client side formatting. It's almost impossible to tell what's going on without a trace.

     

     

    -Joe