diff --git a/src/bosh_aws_cpi/lib/cloud/aws/cloud.rb b/src/bosh_aws_cpi/lib/cloud/aws/cloud.rb index 6c8509b6..c78b7603 100644 --- a/src/bosh_aws_cpi/lib/cloud/aws/cloud.rb +++ b/src/bosh_aws_cpi/lib/cloud/aws/cloud.rb @@ -737,7 +737,8 @@ def aws_accessible? @ec2_client.regions.first true rescue SocketError => socket_error - cloud_error("Unable to create a connection to AWS; please check your region or EC2 endpoint.\nIaaS Error: #{socket_error.inspect}\nBacktrace: #{socket_error.backtrace.join("\n")}") + logger.error("Failed to connect to AWS: #{socket_error.inspect}\n#{socket_error.backtrace.join("\n")}") + cloud_error("Unable to create a connection to AWS; please check your region or EC2 endpoint.\nIaaS Error: #{socket_error.inspect}") rescue Net::OpenTimeout => e false end