I have a Perl script that uses WWW::Mechanize to connect to a site over https, and that script just stopped working the other day. The status and error message I get back are 500 and "Can't connect to jobs.illinois.edu:443". The URL I'm trying to connect to is https://jobs.illinois.edu/. I can connect from my browser (Firefox). My platform is Linux -- up-to-date Arch Linux. I can also connect (using WWW::Mechanize) to other https sites.
I tried using LWP::UserAgent, and the behavior is the same.
I'm using ssl_opts => { SSL_version => 'TLSv1' }; I don't remember why I added that -- it may have been necessary to get it working at some point.
Any ideas on how to fix this, or how I might get more information as to what the problem is? Are there other ssl options I can try?
I have a feeling there was some slight configuration change on the site that led to this problem -- maybe some SSL-protocol version change or something like that. (I don't think I updated anything on my machine inbetween the times it worked and stopped working.)
Thanks.
Here's sample code that fails:
#!/usr/bin/perl
use strict;
use warnings;
use constant AJB_URL => 'https://jobs.illinois.edu/academic-job-board';
use WWW::Mechanize;
my $mech = WWW::Mechanize->new( ssl_opts => { SSL_version => 'TLSv1' } );
$mech->get( AJB_URL );
It returns:
Error GETing https://jobs.illinois.edu/academic-job-board: Can't connect to jobs.illinois.edu:443 at ./test2.pl line 12.