WWW::Mechanize を使用してシングル サインオン ページへの SSL 接続を開き、Nagios の接続をテストする perl スクリプトがあります。昨日、そのスクリプトが機能しなくなりましたが、その理由はわかりません。そのスクリプトのデバッグのスニペットを次に示します。
main::(./check_profiles.pl:13): $auth_url = "https://account.example.com/SSO/index.html";
main::(./check_profiles.pl:14): $profile_url = "https://example.com/prof";
main::(./check_profiles.pl:16): $user = "nagios\@heyyou.com";
main::(./check_profiles.pl:17): $pass = "testing123";
main::(./check_profiles.pl:18): $expected_string = "Bunnies";
main::(./check_profiles.pl:21): $digest_username = "user";
main::(./check_profiles.pl:22): $digest_password = "pass";
main::(./check_profiles.pl:25): $mech = WWW::Mechanize->new( agent=>"Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.4) Gecko/2008102920 Firefox/3.0.4" );
main::(./check_profiles.pl:28): $mech->credentials("example.com/prof:443","Nokia", $digest_username=>$digest_password);
main::(./check_profiles.pl:31): $mech->add_handler("request_send", sub { shift->dump; return });
main::(./check_profiles.pl:32): $mech->add_handler("response_done", sub { shift->dump; return });
main::(./check_profiles.pl:35): $mech->get( $auth_url );
GET https://account.example.com/SSO/index.html
Accept-Encoding: gzip
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.4) Gecko/2008102920 Firefox/3.0.4
(no content)
500 Can't connect to account.example.com:443 (connect: Network is unreachable)
Content-Type: text/plain
Client-Date: Wed, 15 May 2013 16:16:25 GMT
Client-Warning: Internal response
500 Can't connect to account.example.com:443 (connect: Network is unreachable)\n
Error GETing https://account.example.com/SSO/index.html: Can't connect to account.example.com:443 (connect: Network is unreachable) at ./check_profiles.pl line 35
at /usr/share/perl5/vendor_perl/WWW/Mechanize.pm line 2747
WWW::Mechanize::_die('Error ', 'GET', 'ing ', 'URI::https=SCALAR(0x3291d40)', ': ', 'Can\'t connect to account.example.com:443 (connect: Network is ...') called at /usr/share/perl5/vendor_perl/WWW/Mechanize.pm line 2734
WWW::Mechanize::die('WWW::Mechanize=HASH(0x31ce490)', 'Error ', 'GET', 'ing ', 'URI::https=SCALAR(0x3291d40)', ': ', 'Can\'t connect to account.example.com:443 (connect: Network is ...') called at /usr/share/perl5/vendor_perl/WWW/Mechanize.pm line 2383
WWW::Mechanize::_update_page('WWW::Mechanize=HASH(0x31ce490)', 'HTTP::Request=HASH(0x330f490)', 'HTTP::Response=HASH(0x3489c28)') called at /usr/share/perl5/vendor_perl/WWW/Mechanize.pm line 2213
WWW::Mechanize::request('WWW::Mechanize=HASH(0x31ce490)', 'HTTP::Request=HASH(0x330f490)') called at /usr/share/perl5/LWP/UserAgent.pm line 387
LWP::UserAgent::get('WWW::Mechanize=HASH(0x31ce490)', 'https://account.example.com/SSO/index.html') called at /usr/share/perl5/vendor_perl/WWW/Mechanize.pm line 407
WWW::Mechanize::get('WWW::Mechanize=HASH(0x31ce490)', 'https://account.example.com/SSO/index.html') called at ./check_profiles.pl line 35
ご覧のとおり、WWW::Mechanize は account.example.com への 443 アクセスがないと信じていますが、これは正しくありません。もしそれが本当なら、私のアプリ全体が壊れてしまいますが、問題なく動作しています。これはさらなる証拠です:
> telnet account.example.com 443
Trying 2.2.2.2...
Connected to account.example.com.
Escape character is '^]'.
なぜこれが起こっているのか分かりません。誰でもデバッグ情報に基づいて問題を特定できますか、またはさらにヘルプを提供できますか? ありがとう!