Forum Discussion

Tim_Vaudt_11296's avatar
Tim_Vaudt_11296
Icon for Nimbostratus rankNimbostratus
Jun 06, 2012

HTTP 500 Internal Server Error from iControl on LTM 10.2.0

When sending a SOAP request to the F5 API using a perl script to connect to the API to query for a list of LocalLB/VirtualServer members, the F5 is returning a 500 Internal Server error. The XML/SOAP request being sent to the device follows (the entire request has been abbreviated for purposes of this post). I have changed the XML/HTML markers to square brackets to allow me to post the code in this message.

 

 

 

SOAP::Transport::HTTP::Client::send_receive: POST h t t p s://[DNS NAME]/iControl/iControl

 

Portal.cgi HTTP/1.1

 

Accept: text/xml

 

Accept: multipart/*

 

Accept: application/soap

 

Authorization: Basic bmdpYWRXXXXXXXXXXDNudDAx

 

Content-Length: 25123

 

Content-Type: text/xml; charset=utf-8

 

SOAPAction: "urn:iControl:LocalLB/VirtualServerget_destination"

 

 

 

 

[?xml version="1.0" encoding="UTF-8"?][soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"][soap:Body]

.....

 

.....

 

[item xsi:type="xsd:string"]e1qrewards-443[/item][item xsi:type="xsd:string"]vs_QWWW201-443[/item][/virtual_servers][/get_destination][/soap:Body][/soap:Envelope]

 

 

 

 

 

 

RESPONSE MESSAGE:

 

The SOAP response received from the device is:

 

SOAP::Transport::HTTP::Client::send_receive: HTTP/1.1 500 Internal Server Error

 

Connection: close

 

Date: Thu, 31 May 2012 17:01:33 GMT

 

Server: Apache

 

Content-Length: 624

 

Content-Type: text/html; charset=iso-8859-1

 

Client-Date: Thu, 31 May 2012 17:03:41 GMT

 

Client-Peer: XXX.XXX.XXX.22:443

 

Client-Response-Num: 3

 

Client-SSL-Cert-Issuer: /C=--/ST=WA/L=Seattle/O=MyCompany/OU=1228921382/CN=dhcp-248/emailAddress=root@dhcp-248

 

Client-SSL-Cert-Subject: /C=--/ST=WA/L=Seattle/O=MyCompany/OU=1228921382/CN=dhcp-248/emailAddress=root@dhcp-248

 

Client-SSL-Cipher: DHE-RSA-AES256-SHA

 

Client-SSL-Warning: Peer certificate not verified

 

Set-Cookie: BIGIPAuthCookie=742D5CA3DAE5XXXXXXXXEAFE3593BA0C250F28A3; path=/;

 

Set-Cookie: BIGIPAuthUsernameCookie=xxxxxxxx; path=/;

 

Title: 500 Internal Server Error

 

 

 

[!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"]

 

[html][head]

 

[title]500 Internal Server Error[/title]

 

[/head][body]

 

[h1]Internal Server Error[/h1]

 

[p]The server encountered an internal error or

 

misconfiguration and was unable to complete

 

your request.[/p]

 

[p]Please contact the server administrator,

 

support@f5.com and inform them of the time the error occurred,

 

and anything you might have done that may have

 

caused the error.[/p]

 

[p]More information about this error may be available

 

in the server error log.[/p]

 

[hr]

 

[address]Apache Server at [DNS NAME] Port 443[/address]

 

[/body][/html]

 

 

 

8 Replies

  • Tim,

     

     

    > SOAP::Transport::HTTP::Client::send_receive: POST h t t p s://[DNS NAME]/iControl/iControl

     

     

    One thing I'm wondering about is why does it look like there are 'space' characters in the 'https' portion?

     

    Can you post your client code? You're using SOAP::Lite, correct?

     

     

    ~ snovakov
  • John_Gruber_432's avatar
    John_Gruber_432
    Historic F5 Account
    500 errors are server side errors. The server side of iControl is on the BigIP and is an F5 process. You can rightfully open a support ticket. Besides the normal qkview, they are going to want an XML dump of the SOAP interaction (using the trace function in SOAP::Lite package make this really easy). The qkview is going to include the Apache error logs, but the error message you are getting returned the Apache server default verbage and not XML. That typically means the iControl process handling that request likely did not return or exited without returning anything to Apache. The leading cause of this is passing it bad XML in the SOAP request. Not surprising if you are rolling your own request messages.

     

     

    If you want to see if it is just bad XML getting sent to the BigIP before opening the ticket, please try LocalLB::VirtualServer.get_list which requires no arguments to be passed in which you need to encode in a list and makes sure you are not having other problems in the stack. How manual are your 'XML' messages, or are you letting SOAP::Lite do that for you? If your are not letting SOAP::Lite do it for you, why not? (I understand if you aren't.. it is a slow pig of a SOAP client)

     

     

    My homegrown iControl PM which uses SOAP::Lite has request / response wrappers in functions which handle errors / caching etc.. so a code snippet from my examples would not be helpful, but if you are using SOAP::Lite your call should look something like this in perl:

     

     

    
          my $urn = "urn:iControl:LocalLB/VirtualServer"; 
          my $request =  SOAP::Lite
            -> uri($urn)
            -> readable(1)
            -> proxy($self->{bigipprotocol}."://".$self->{bigiphost}.":".$self->{bigipport}."/iControl/iControlPortal.cgi", 
                 credentials => [
            $bigiphost.":".$bigipport,
            'BIG-IP',
            $bigipuser => $self->{bigippassword},
            ]
            );
            my @virtualserver = ("]vs_QWWW201-443");
            $request->get_destination(
    SOAP::Data->name(virtual_servers=>[@virtualservers])
    );
            $IPPortDefinitionList = $response->result;
     
  • I had to put spaces in the URL in order for devcentral to accept my post. The real URL does not contain the spaces in the protocol.

     

     

    I'm not too familiar with this F5 forum or the intricacies of being able to post XML code without it being interpreted by the posting system :)

     

  • In response to John Gruber:

    I opened a support ticket and F5 responded that iControl is not covered by support! They recommended the dev forum to find an answer. Kind of surprising since the error is coming from apache on the F5 which is internal to the system itself.

     

     

     

    Yes, I am using SOAP::Lite on the perl side. The XML is not being constructed manually, the SOAP module in perl is constructing the SOAP envelope and message. The XML being passed in to the iControl API passes validation in other utilities like SoapUI.

     

     

     

    The LocalLB::VirtualServer.get_list works ok and I get the list back. I can make other requests that I pass in data and get the proper response back from F5. Seems to be limited to the urn:iControl:LocalLB/VirtualServerget_destination action.

     

     

     

    On a side note...what do I need to do in this site to post code snips in a box as you have done?

     

     

     

    Thanks.

     

  • John_Gruber_432's avatar
    John_Gruber_432
    Historic F5 Account
    It is a wiki. Use:

     

     

    ![code!] Your code here ![/code!]

     

     

     

    Hope that comes through formatted properly.

     

     

    As for the ticket.. look at /var/log/httpd/httpd_errors and see if you see:

     

     

     
    FastCGI: server "/usr/local/www/iControl/iControlPortal.cgi" (pid XXX) terminated due to uncaught signal '6' (Aborted)
    FastCGI: server "/usr/local/www/iControl/iControlPortal.cgi" restarted (pid XXXX)
    

     

     

    That proves it is a service issue. Reopen the ticket and 'lead' with that error message.

     

     

    If you are in AZ, is J. Bartlett your F5 engineer? You might want to drop him an email with your ticket number. If you are getting an incorrect response from support your local team is the right way to go.
  • You can use [ code ] my code [/ code ] blocks (without the spaces before and after "code") to prevent interpretation of characters and preserve spacing. As John said, Support should troubleshoot the function of iControl calls--particularly when the BIG-IP is generating a serverside error.

     

     

    Aaron
  • Trying to open another case with support...apache logs are showing:

     

    Jun 7 09:56:12 local/PHX-TRCWWWF5WEB2B err httpd[17328]: [error] [client xxx.xxx.xxx.221] (32)Broken pipe: FastCGI: comm with server "/usr/local/www/iControl/iControlPortal.cgi" aborted: write failed

     

    Jun 7 09:56:13 local/PHX-TRCWWWF5WEB2B err httpd[17328]: [error] [client xxx.xxx.xxx.221] FastCGI: incomplete headers (0 bytes) received from server "/usr/local/www/iControl/iControlPortal.cgi"
  • Please post your perl code that elicits this error, along with the input you're giving the system.