Forum Discussion
lucadentella_55
Jan 18, 2011Nimbostratus
Get persistence records
Good afternoon,
I'm working on a management app for our Big-IP (BIG-IP 10.0.1 Build 378.0 Hotfix HF3) and I've some problems with a method that should get the number of persistence records for a given VirtualServer.
Here's the code I'm using:
string[] vservers = new string[1];
vservers[0] = "VS_Test";
LocalLBPersistenceMode[] modes = new LocalLBPersistenceMode[1];
modes[0] = LocalLBPersistenceMode.PERSISTENCE_MODE_NONE;
LocalLBPersistenceRecord[][] records = interfaces.LocalLBVirtualServer.get_persistence_record(vservers, modes);
The code compiles, but when I run my app I get the following exception:
Unhandled Exception: System.InvalidOperationException: There is an error in XML document (39, 51). ---> System.InvalidOperationException: Instance validation er ror: '' is not a valid value for CommonProtocolType.
If I run a similar command (bigip persist virtual VS_Test show) from a command line, it works fine.
I found an old post about a similar problem:
http://devcentral.f5.com/Forums/tabid/1082223/asg/51/showtab/groupforums/afv/topic/aff/1/aft/56693/Default.aspx
but the hotfix should be already present in newer versions...
Can you help me?
Thanks!
- This error most often indicates you aren't using the most recent version of the iControl libraries. Hopefully you are using the iControl Assembly for .Net (or library for Java). I can't tell from your code whether it's .Net or Java...
- lucadentella_55NimbostratusHi Joe,
- The size isn't likely the problem. When looking through your trace, I see that the "protocol" field in the "virtual_server" structure being returned in the result array is empty. In a response from my system I get the value of "PROTOCOL_ANY" returned.
I looked trough the sources and in 10.0 this value was omitted in the response generation but it was fixed in 10.1 and above. This very likely could be your problem. I don't have a way to test this as I don't have access to a 10.0 build, but I'm fairly confident that upgrading to 10.1 or above will fix your issue with this method.xmlns:E="http://schemas.xmlsoap.org/soap/envelope/" xmlns:A="http://schemas.xmlsoap.org/soap/encoding/" xmlns:s="http://www.w3.org/2001/XMLSchema-instance" xmlns:y="http://www.w3.org/2001/XMLSchema" xmlns:iControl="urn:iControl" E:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> xmlns:m="urn:iControl:LocalLB/VirtualServer"> s:type="A:Array" A:arrayType="iControl:LocalLB.PersistenceRecord[][1]"> A:arrayType="iControl:LocalLB.PersistenceRecord[1]"> s:type="y:string">DC5 s:type="iControl:Common.IPPortDefinition"> s:type="y:string">10.10.10.221 s:type="y:long">80 s:type="iControl:LocalLB.PersistenceMode">PERSISTENCE_MODE_SOURCE_ADDRESS_AFFINITY s:type="y:string">192.168.44.149 s:type="iControl:Common.VirtualServerDefinition"> s:type="y:string">DC5 s:type="y:string">172.27.11.117 s:type="y:long">0 s:type="iControl:Common.ProtocolType">PROTOCOL_ANY s:type="y:long">1295440156 s:type="y:long">11
- The iControl libraries should be forward and backward compatible with the following exceptions
- lucadentella_55NimbostratusJoe,
- No problem, always glad to help out. Looks like this is one that slipped through the cracks in our testing with 10.0.
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects