s5cmd
s5cmd copied to clipboard
tls: first record does not look like a TLS handshak
Where i successfully use aws cli for S3 commands i can't get this working in our environment
[hostuser@my-host my-user-name]$ export AWS_PROFILE=DLK
[hostuser@my-host my-user-name]$ ./s5cmd ls s3://my-bucket-name/private/my-app-name/datalake/dev1/5/my-app-names3/
ERROR session: fetching region failed: RequestError: send request failed
caused by: proxyconnect tcp: tls: first record does not look like a TLS handshake
ERROR "ls s3://my-bucket-name/private/my-app-name/datalake/dev1/5/my-app-names3/": RequestError: send request failed caused by: Get "https://my-bucket-name.s3.amazonaws.com/?delimiter=%2F&list-type=2&prefix=private%2Fmy-app-name%2Fdatalake%2Fdev1%2F5%2Fmy-app-names3%2F": proxyconnect tcp: tls: first record does not look like a TLS handshak
As you can see we get an error like "first record does not look like a TLS handshak"
Now our onsite proxy uses man in the middle attack like unpacking where, we may need to trust our internal Certificate authority cert, but I'm not sure how to do that.
works for me (key thing being https proxy pointing to http address, also unsetting CA bundle):
export HTTP_PROXY=http://redactedhost:redactedport
export http_proxy=http://redactedhost:redactedport
export HTTPS_PROXY=http://redactedhost:redactedport
export https_proxy=http://redactedhost:redactedport
export AWS_REGION=ap-southeast-2
export AWS_PROFILE=LIQ
unset AWS_CA_BUNDLE
./s5cmd ls s3://redacted/
I haven't never been able to reproduce this issue. I don't know about your setup but if you could provide us a Docker image or a step-by-step reproducer, we'd be happy to take a look.
Closing the issue for now but please re-open if you have a reproducer. Thanks.