Forum Discussion
Mike_Thompson_9
Nimbostratus
Aug 27, 2007InvalidOperationException - HELP!
I have a SOAP interface which makes calls to the F5 to get data about stats, pools, members, etc. You ask, why write another web service that talks to the F5. Simply because I have simplified a lot of the tasks needed to get the data out of the F5 for different scripts around the company. In other words, they can call my service, pass in a few args and get lots of data back.
To get back to the point, 90%/95% of the time, this service works. However, the other 5%/10% of the time I get the following:
System.InvalidOperationException: Client found response content type of 'text/html; charset=iso-8859-1', but expected 'text/xml'.
Sometimes this happens when calling get_session_status(String[] pool_names) and other times it happens when calling get_monitor_status(String[] pool_names). However, I belive it can happen on any of the functions being called.
It seems to me that the F5 is choking on the request and throwing an exception back to my service in the form of HTML. However, there is no HTML to read in as part of the exception.
This is the full exception:
: GetPoolMemberStatus_Error_InvalidOperationException: System.InvalidOperationException: Client found response content type of 'text/html; charset=iso-8859-1', but expected 'text/xml'.
The request failed with the error message:
--
--.
at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
at LocalLB.PoolMember.LocalLBPoolMember.get_session_status(String[] pool_names) in c:\Users\thompsmd\AppData\Local\Temp\Temporary ASP.NET Files\f5manager\0ec0b867\38653d1b\App_WebReferences.5.cs:line 588
at WebSvcMgr.GetPoolMbrSession() in C:\My Data\ASP.NET Applications\F5Mgr\App_Code\WebSvcMgr.vb:line 182
at WebSvcMgr.GetPoolMbrDetail() in C:\My Data\ASP.NET Applications\F5Mgr\App_Code\WebSvcMgr.vb:line 162
at F5Services.GetPoolMemberStatus(String[] inServerNames, Int32 inEnvironmentID) in C:\My Data\ASP.NET Applications\F5Mgr\App_Code\F5Services.vb:line 161
As you can see, it is dying on ReadResponse.
Can anyone help here or offer some insight?
- Mike_Thompson_9
Nimbostratus
Are there logs from iControl that we could look at on the device that would tell us what the exception was and why it was not handled? I am not on the F5 team at my work place, so excuse my ignorance. - Another reason for an exception, as you pointed out, very well could be corrupted client data. I've heard of issues when ASP apps are using keep-alive connections (re-using HTTP connections). If you are using the iControl assembly, that reuses proxy class instances, this could be your problem. A quick and easy way to enable iControl logging on the BIG-IP might be your best bet in diagnosing this. Here's the steps
local4.* /var/log/ltm
$ b db iControl.LogLevel trace
$ bigstart restart httpd
$ b db iControl.LogLevel none
- Mike_Thompson_9
Nimbostratus
As soon as I get back to work after the weekend, we will give this a go and I will let you know the results. The problem seems to occur with all the devices in all our environments. So, we will give it a go in Dev and see what happens. Again Joe, your replies are invaluable! - Mike_Thompson_9
Nimbostratus
Ok, I was finally able to get logging enabled and isolated on the Dev F5 and found some interesting results. First off, I start my test harness application which essentially makes the same call to the ASP.NET web service over and over until it reaches an error. - Mike_Thompson_9
Nimbostratus
Apparently these calls can be manually initiated by calling "bigpipe config sync show" and "bigpipe config check" (according to the logs). However, if I manually make either of these calls from the command line while my SOAP calls are being made, I cannot get it to fail. Unless they need to be made at just the right time in the cycle and I cannot duplicate. - That makes sense. The iControlPortal is implemented as a single FIFO queue to avoid two callers from stomping on eachother. If there is a process (in your situation ConfigSync) that is communicating between the boxes for a long lived connection, then if you are trying to make an iControl call to the same target box as your BIG-IP is, you'll have to wait for the first call to return before yours can be processed. I'm surprised that this is taking longer than your intervals. The only other issue I could see is that a load of the configuration forces a restart of httpd which will cause iControl connections currently in the queue to be aborted.
- Mike_Thompson_9
Nimbostratus
I went ahead and opened a support case for this issue. More than likely the problem will turn out to be more involved than what we could resolve here on DevCentral. In any case, I will be sure to keep the updates posted here. If you want the case number Joe, I can send it to you. - Go ahead and throw the case number up here on this thread. That way others can refer to it if they come into this issue.
- Mike_Thompson_9
Nimbostratus
Case number is C377954. As things progress, I will be sure to update DevCentral as needed... - John_Arnold_106
Nimbostratus
Did you guys ever get an answer to this issue? I'm (we're) building a similiar tool and seeing similiar errors -- very low frequency (0-15 times/hr) on VERY static iControl calls to test-only lab devices. Is this a call contention issue -- one call (to save config) ties up the iControl portal until other iControl calls timeout?
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