Forum Discussion

jaikiran_138399's avatar
jaikiran_138399
Icon for Nimbostratus rankNimbostratus
Nov 26, 2013

Ability to create new LocalLBPool without any members through iControl Java API

I've been using the iControl Java (assembly) API to manage/configure the BigIP LTM instance (the virtual edition trial version). The management console of BigIP allows creating a LTM pool without any (initial) members added and just passing a load balancing method and a pool name. However, trying to do the same via the iControl Java API as follows results in an exception which isn't informative on why it's failing:

final LocalLBPoolBindingStub localLBPool = (LocalLBPoolBindingStub) new LocalLBPoolLocator().getLocalLBPoolPort(this.bigIpLoadBalancerURL);
localLBPool.create(new String[]{poolName}, new LocalLBLBMethod[]{loadBalancingMethod}, new CommonIPPortDefinition[0][0]);

Notice that I am passing an empty array as the 3rd param to the create method. It fails with:

Caused by: (500)Internal Server Error
    at org.apache.axis.transport.http.HTTPSender.readFromSocket(HTTPSender.java:744)
    at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:144)
    at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
    at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
    at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
    at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
    at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
    at org.apache.axis.client.Call.invoke(Call.java:2767)
    at org.apache.axis.client.Call.invoke(Call.java:2443)
    at org.apache.axis.client.Call.invoke(Call.java:2366)
    at org.apache.axis.client.Call.invoke(Call.java:1812)
    at iControl.LocalLBPoolBindingStub.create(LocalLBPoolBindingStub.java:2429)

and no more information.

1) Should it be possible to use iControl API to create a new pool without any (initial) members? From a BigIP point of view, I think it's possible since the UI allows you to do that.

2) Is there a way I can figure out what exactly the problem is with that method call? The error message isn't too informative.

Environment information:

iControl Java (assembly) API version: 11.4.1 (the latest that was available here https://devcentral.f5.com/d/icontrol-library-for-java)

BigIP version: 10.1 Virtual edition trial version available from here https://www.f5.com/trial/big-ip-ltm-virtual-edition.php
  • I spent a bit more time on this to see what's going on with that non descriptive 500 internal server error message. I enabled trace level logging of iControl as explained here https://devcentral.f5.com/questions/icontrol-logging and after the httpd restart, saw these initial logs from the admin UI:

    Fri Nov 29 12:31:38 PST 2013    notice  local/bigip     root        -bash ==> /usr/bin/bigstart restart httpd
    Fri Nov 29 12:31:40 PST 2013    debug   local/bigip     iControlPortal.cgi[1796]        icontrol_portal:iControl SOAP Portal starting ...
    

    which make sense because we had just restarted the httpd server and as a result the iControl SOAP portal.

    I then ran my test with invokes the Java API that I noted in my question earlier and saw these logs from the admin UI:

    Fri Nov 29 12:38:13 PST 2013    debug   local/bigip     iControlPortal.cgi[1796]        icontrol_portal:NewPoolFromTest-1385786661845LB_METHOD_FASTEST_APP_RESPONSE
    Fri Nov 29 12:38:13 PST 2013    debug   local/bigip     iControlPortal.cgi[1796]        LocalLB:+++++++++++++++++++++++++++++++++++++
    Fri Nov 29 12:38:13 PST 2013    debug   local/bigip     iControlPortal.cgi[1796]        LocalLB:Pool::create ( ) called by user "admin"
    Fri Nov 29 12:38:13 PST 2013    debug   local/bigip     iControlPortal.cgi[1796]        LocalLB: [0] Pool name: NewPoolFromTest-1385786661845, LB method: 11
    Fri Nov 29 12:38:13 PST 2013    debug   local/bigip     iControlPortal.cgi[1994]        icontrol_portal:iControl SOAP Portal starting ... 
    

    Most of it looks fine except that last log message which says:

    Fri Nov 29 12:38:13 PST 2013 debug local/bigip iControlPortal.cgi[1994] icontrol_portal:iControl SOAP Portal starting ...

    It looks like that pool creation method call is ending up (crashing?) restarting the iControl SOAP protal. Did I read this correct? If so, I would think that this is perhaps a bug in the iControl server side thing?

    Anyone has any inputs on this?