java
13 TopicsJava application persistence issue with load balancer
I have a java application running on 2 web servers, load balanced in round robin fashion and cookie insert persistence on VIP. From what I understand of the application, it keeps doing some kind of pulse check with server every few seconds because of which the java app disconnects as it is getting bounced bw one server and other, meaning persistence is not working for subsequent connections made by the java applet. I cannot use source/dest_addr persistence, so it has to be cookie persistence. I somehow managed to disable the pulse check within application, which made the app stable and no disconnects were noticed. However after a while some of the tabs/pages started to throw errors which I believe is due to server switch at the F5 load balancing. Any ideas what else can be done to ensure the java application connection made to one server is persistent for subsequent connections made from same source?600Views0likes6CommentsiControl with Java - Retrieve List of Virtual Servers does not include Applications
Hi, i connect to the F5 using the Java Wrapper API; Now, when i get the list of Virtual-Servers via iControlInterfaces.getLocalLBVirtualServer().get_list() it only returns the virtual servers that are not created with an application (i.e. with the f5.microsoft_exchange_2010_2013_cas template). I could not find any way to further "open" the list; How can i retrieve these too? Many thanks in advance! Rene418Views0likes3CommentsHow to access RDP from Mac OSX on BIG-IP APM 12.0
Hello Devcentral, First of, there have been many "MAC OSX RDP" topics on here, I think I've read through all of them but I still cannot seem to get RDP working for my MAC OSX users. As with our Windows users I want them to be able to log onto the BIG-IP APM, click a link (Application Tunnel for MAC OSX of course) and then have them be able to log onto a Windows Server through RDP. I'm getting Java errors, "ClassNotFoundException" from the AppletTunnelProxy (seems to be something wrong with f5apptunnel.jar?). I've tried JRE 1.8 and 1.7 on my test Mac Mini here (OSX 10.11.6 El Capitan) and using Safari as well as Firefox. I did get this to work on BIG-IP APM 11.6 if I recall correctly. Any help on this would be greatly appreciated. I have Java error logs/traces but didn't want to immediately spam this topic. If need be I can paste them into here. Thanks in advance!379Views0likes1CommentiControl transaction problem
Here is my code written with iControl Library for Java. // set timeout interfaces.getSystemSession().set_session_timeout(60); interfaces.getSystemSession().set_transaction_timeout(30); // get transaction final long sessionId = interfaces.getSystemSession().get_session_identifier(); interfaces.getSystemSession().setHeader("urn:iControl", "session", Long.toString(sessionId)); interfaces.getLocalLBPool().setHeader("urn:iControl","session",Long.toString(sessionId); // start transaction interfaces.getSystemSession().submit_transaction(); // create pool1 interfaces.getLocalLBPool().create_v2(poolname1, lbmethod1, addressport1); // sleep 30 sec to wait transaction will be expired Thread.sleep(30000); // create pool2 interfaces.getLocalLBPool().create_v2(poolname2, lbmethod2, addressport2); // submit transaction interfaces.getSystemSession().submit_transaction(); I expected that creating both pool1 and pool2 would be rollbacked, but pool2 was succesfully created. Is there a way to detect transaction expiration and roleback all configuration in transaction ?372Views0likes5CommentsAbility 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.php318Views0likes1CommentVirtual Server creation through iControl Java API fails silently due to missing profiles
I'm using iControl Java API to create a virtual server. The code is as follows: final LocalLBVirtualServerBindingStub virtualServerStub = (LocalLBVirtualServerBindingStub) new LocalLBVirtualServerLocator().getLocalLBVirtualServerPort(foobarURL); final CommonProtocolType vserverProtocolType = CommonProtocolType.fromString(protocol); final CommonVirtualServerDefinition[] vserverDefinition = new CommonVirtualServerDefinition[]{new CommonVirtualServerDefinition(name, ip, port, vserverProtocolType)}; final LocalLBVirtualServerVirtualServerResource[] resource = new LocalLBVirtualServerVirtualServerResource[]{new LocalLBVirtualServerVirtualServerResource(LocalLBVirtualServerVirtualServerType.RESOURCE_TYPE_POOL, loadBalancerPoolName)}; virtualServerStub.create(vserverDefinition, new String[]{netmask}, resource, new LocalLBVirtualServerVirtualServerProfile[0][0]); Now this call just "passes" although no virtual server is really created (I checked through the admin UI). There are no exceptions or even any other relevant logging. After various trial and error tests, I realized that the problem was that the code was passing no "profiles" for the virtual server creation: virtualServerStub.create(vserverDefinition, new String[]{netmask}, resource, new LocalLBVirtualServerVirtualServerProfile[0][0]); The questions I have are: 1) Why isn't the API throwing an exception if profiles is mandatory 2) Is there an API I can use to fetch the list of available profiles for a particular "protocol" and any available "default profile" for that protocol? The reason why I would like to have something like this is, because for a user who is using this code, it won't be feasible to send in some random profile name strings that perhaps won't apply to a particular "protocol" of the virtual server or even the "service type" of the virtual server. P.S: I stumbled upon a similar thread here https://devcentral.f5.com/questions/virtual-server-create-fails-silently which shows sample code to create the virtual server and in there it hard codes certain profile names which is exactly what I'm trying to avoid. Environment details: 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.php304Views0likes0CommentsAbility 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.php245Views0likes1CommentRead Access Denied on LocalLBRule::get_metadata
I'm using the iControl Java lib and am getting "Read Access Denied" errors. public class F5Test implements Credentials { private Interfaces f5Interface = new Interfaces("my-lb.example.com", 443, UNAME, PSWD); public static void main(String[] args) { F5Test test = new F5Test(); test.test(); } void test() { try { f5Interface.getManagementPartition().set_active_partition("my-partition"); String[] rules = { "irule_my_rule" }; String[][] md = f5Interface.getLocalLBRule().get_metadata(rules); for(String[] mds : md) { for(String metadata : mds) { System.out.println(metadata); } } } catch (RemoteException e) { e.printStackTrace(); } catch (Exception e) { e.printStackTrace(); } } } When I run this I get: AxisFault faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server faultSubcode: faultString: Exception caught in LocalLB::urn:iControl:LocalLB/Rule::get_metadata() Exception: Common::OperationFailed primary_error_code : 17238051 (0x01070823) secondary_error_code : 0 error_string : 01070823:3: Read Access Denied: user (zharvey) type (rule metadata) faultActor: faultNode: faultDetail: {http://xml.apache.org/axis/}stackTrace:Exception caught in LocalLB::urn:iControl:LocalLB/Rule::get_metadata() Exception: Common::OperationFailed primary_error_code : 17238051 (0x01070823) secondary_error_code : 0 error_string : 01070823:3: Read Access Denied: user (zharvey) type (rule metadata) at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:222) at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:129) ...rest of stack trace omitted for brevity I have confirmed that the iRule "irule_my_rule" is defined inside "my-partition" and our IT staff confirms I have full r/w permission for it. Am I using the API incorrectly or is this an F5 config issue?238Views0likes2CommentsiControl transaction problem. iControl occasionally cannot delete the referenced Node object.
I wrote following code with iControl SDK for Java. final Interfaces interfaces = new Interfaces(host, 443L, user, password); final SystemSessionBindingStub systemSession = interfaces.getSystemSession(); systemSession.set_session_timeout(300); systemSession.set_transaction_timeout(300); final long sessionId = systemSession.get_session_identifier(); systemSession.setHeader("urn:iControl", "session", Long.toString(sessionId)); systemSession.start_transaction(); final LocalLBVirtualServerBindingStub localLBVirtualServer = interfaces.getLocalLBVirtualServer(); localLBVirtualServer.setHeader("urn:iControl", "session", Long.toString(sessionId)); localLBVirtualServer.delete_virtual_server(new String[]{"MyVirtualServer"}); final LocalLBPoolBindingStub lbPoolStub = interfaces.getLocalLBPool(); lbPoolStub.setHeader("urn:iControl", "session", Long.toString(sessionId)); lbPoolStub.delete_pool(new String[]{"MyPool"}) final LocalLBNodeAddressV2BindingStub lbNodeAddressV2 = interfaces.getLocalLBNodeAddressV2(); lbNodeAddressV2.setHeader("urn:iControl", "session", Long.toString(sessionId)); lbNodeAddressV2.delete_node_address(new String[]{"192.168.1.1%97"}); systemSession.submit_transaction(); System::Session::submit_transaction will occasionally throw a following exception. Exception caught in System::urn:iControl:System/Session::submit_transaction() Exception: Common::OperationFailed primary_error_code : 17236240 (0x01070110) secondary_error_code : 0 error_string : 01070110:3: Node address '/Common/192.168.1.1%97' is referenced by a member of pool '/Common/MyPool'. This problem occurs on "v11.5.1" , not occurs on "v11.2.1" .226Views0likes1Comment