in reply to Re^3: LWP for URL monitoring - 500 connect timeout errors
in thread LWP for URL monitoring - 500 connect timeout errors

First you set the proxy variables , otherwise lwp-request can't connect
  • Comment on Re^4: LWP for URL monitoring - 500 connect timeout errors

Replies are listed 'Best First'.
Re^5: LWP for URL monitoring - 500 connect timeout errors
by Anonymous Monk on Jul 21, 2009 at 10:48 UTC

    Well, I had set it before as well, but on scond try I get a slightly different error where its saying the site has moved. >/p>

    Z:\>lwp-request -USe -m get http://www.eserve.com.sa/ GET https://www.eserve.com.sa/ User-Agent: lwp-request/5.810 GET http://www.eserve.com.sa/ --> 302 Moved Temporarily GET https://www.eserve.com.sa/ --> 500 Connect failed: connect: Unknow +n error; U nknown error Content-Type: text/plain Client-Date: Tue, 21 Jul 2009 10:41:34 GMT Client-Warning: Internal response 500 Connect failed: connect: Unknown error; Unknown error Z:\>lwp-request -USe -m head http://www.eserve.com.sa/ HEAD https://www.eserve.com.sa/ User-Agent: lwp-request/5.810 HEAD http://www.eserve.com.sa/ --> 302 Moved Temporarily HEAD https://www.eserve.com.sa/ --> 500 Connect failed: connect: Unkno +wn error; Unknown error Content-Type: text/plain Client-Date: Tue, 21 Jul 2009 10:41:58 GMT Client-Warning: Internal response
      I too get http://www.eserve.com.sa/ --> 302 Moved Temporarily its normal, website redirects to https, then does a html (refresh) redirect to special/changing url. Makes sense, if you trust HTTPS, you can trust the new url.

        I didn't get the line:

        die sprintf "ERRRR(%d)(%s)(%d)(%s)", $!,$!,$^E,$^E;

        Nor did I get it to work, putting it in as the last line of my code.

        ERRRR(9)(Bad file descriptor)(0)() at C:\SCRIPTING\URLTESTv6.pl line 22.

        As for these redirected websites, the one in question http://www.eserve.com.sa is HTTP. In any case, should I conclude that redirection isn't supported. In that case I'll need to hardcode the eventual address.

      Add this to your code
      die sprintf "ERRRR(%d)(%s)(%d)(%s)", $!,$!,$^E,$^E;
      that should give you better idea of exact error (LWP should include this)