Hi there,

I'm having some issues with some strange behaviour on one of my perl monitoring scripts.

The script uses LWP::UserAgent to request a given url and check the results...

This afternoon, the script has started failing with '404 not found'...

I've checked everything I can think of on the server with no success. The script is still working perfectly on another server...

The HTTP response content looks like:

LWP Returned... Checking response $VAR1 = bless( { '_protocol' => 'HTTP/1.0', '_content' => '<?xml version="1.0" encoding="iso-8859 +-1"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>404 - Not Found</title> </head> <body> <h1>404 - Not Found</h1> </body> </html> ', '_rc' => 404, '_headers' => bless( { 'connection' => 'close', 'client-response-num' => 1, 'date' => 'Tue, 22 May 2012 12 +:20:13 GMT', 'client-ssl-cert-issuer' => '/ +C=US/O=Equifax/OU=Equifax Secure Certificate Authority', 'client-ssl-cipher' => 'AES256 +-SHA', 'client-peer' => '67.215.65.13 +2:443', 'content-length' => '345', 'client-date' => 'Tue, 22 May +2012 12:20:12 GMT', 'content-type' => 'text/html', 'client-ssl-cert-subject' => ' +/serialNumber=u1qcmJQFwrxSq31GeQxJEn9-PfyfU0Fp/C=US/O=*.opendns.com/O +U=GT55236522/OU=See www.rapidssl.com/resources/cps (c)10/OU=Domain Co +ntrol Validated - RapidSSL(R)/CN=*.opendns.com', 'title' => '404 - Not Found', 'server' => 'OpenDNS Guide' }, 'HTTP::Headers' ), '_msg' => 'Not Found', '_request' => bless( { '_content' => '', '_uri' => bless( [ bless( do{\ +(my $o = 'https://cms.wag.card.co.uk/CMSBackOffice')}, 'URI::https' ) +, undef ], 'URI::URL' + ), '_headers' => bless( { 'user-a +gent' => 'libwww-perl/5.836', 'accept +-language' => 'en-gb, en', 'accept +-encoding' => 'gzip, x-gzip, deflate, x-bzip2' }, 'HTTP: +:Headers' ), '_method' => 'GET', '_uri_canonical' => $VAR1->{'_ +request'}{'_uri'}[0] }, 'HTTP::Request' ) }, 'HTTP::Response' );

Any ideas???

Cheers Gavin

In reply to LWP Script suddenly stopped working... by fatmcgav

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.