1

Continuation of my previous question(LWP::Protocol::https::Socket: connect: timeout error) I am creating the new topic here.

I am trying to use the AWS cloud watch scripts which throw error during execution. Please find the below Stout of the commands to see if required modules remain installed and the script execution error.

[root@ip-10-175-82-195 aws-scripts-mon]# perl -MIO::Socket::SSL -e
No code specified for -e.
[root@ip-10-175-82-195 aws-scripts-mon]# perl -MLWP::Protocol::https -e 'warn $LWP::Protocol::https::VERSION'
6.06 at -e line 1.
[root@ip-10-175-82-195 aws-scripts-mon]# perl -MIO::Socket::SSL=debug4 ./mon-put-instance-data.pl --mem-util --mem-used --mem-avail --aws-credential-file=/root/.aws/awscreds

ERROR: Failed to call CloudWatch: HTTP 500. Message: SSL negotiation failed:  at /usr/local/share/perl5/LWP/Protocol/http.pm line 27.
 at /usr/local/share/perl5/LWP/Protocol/http.pm line 27.
;  at /usr/local/share/perl5/LWP/Protocol/http.pm line 27.
;  at /usr/local/share/perl5/LWP/Protocol/http.pm line 27.

For more information, run 'mon-put-instance-data.pl --help'
Community
  • 1
  • 1
keeplearning
  • 113
  • 1
  • 9
  • Given that no debug output happens when you include IO::Socket::SSL with debug4 I guess that IO::Socket::SSL is not used but that something in your unknown script tries to enforce use of (old and deprecated) Crypt::SSLeay instead. For errors which might be caused by this see http://stackoverflow.com/questions/26564028/500-ssl-negotiation-failed. – Steffen Ullrich Oct 19 '16 at 07:36
  • Hi Steffen, I am bit confused here. The script was provided by AWS and I am not sure how to find if it uses IO::Socket::SSL or Crypt::SSLeay. I checked your reply in other query you have replied but I really don't know how to proceed. Please help. – keeplearning Oct 19 '16 at 07:49
  • This is strange: the error message comes from Net::SSL which is only used if IO::Socket::SSL is not used but I don't see that the code from amazon is enforcing use of Net::SSL/Crypt::SSLeay. Can you check `perl -MLWP::UserAgent -e 'print LWP::UserAgent->VERSION'` to make sure that there is not an old version lurking in the perl path? Please check also the content of the directory where your mom-...*.pl program is for older LWP versions since the script includes this directory in the library path. – Steffen Ullrich Oct 19 '16 at 08:09
  • I got the below output.[root@ip-10-175-82-195 aws-scripts-mon]# perl -MLWP::UserAgent -e 'print LWP::UserAgent->VERSION' 6.15 – keeplearning Oct 19 '16 at 08:13
  • And did you check the script path too for older versions of LWP? – Steffen Ullrich Oct 19 '16 at 08:23
  • Script path ? Are you asking about aws script? – keeplearning Oct 19 '16 at 09:25
  • Yes, the directory where the aws script is stored. – Steffen Ullrich Oct 19 '16 at 09:40
  • No the path remain same. /root/cronjobs/aws-scripts-mon. – keeplearning Oct 19 '16 at 09:54
  • Then I don't know. Based on the error message it is using the old and deprecated Net::SSL/Crypt::SSLeay backend for some reason and with the current information I don't know why. – Steffen Ullrich Oct 19 '16 at 10:41
  • For reference, the scripts are available here: http://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/mon-scripts.html FWIW, I do not see anything in the stock modules and scripts that force the use of `Crypt::SSLeay`. Remember, even installing the current `Crypt::SSLeay` opts you in to use `IO::Socket::SSL` (and, by extension, `Net::SSLeay`). See https://www.nu42.com/2014/04/does-your-code-really-depend-on.html – Sinan Ünür Oct 19 '16 at 14:17
  • Thanks for your efforts Steffen and Sinan. I raised a ticket with AWS. – keeplearning Oct 20 '16 at 07:33

0 Answers0