Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem: CannotSendRequest: Request-sent #1261

Closed
ravithakkarrepo opened this issue Jun 24, 2022 · 1 comment
Closed

Problem: CannotSendRequest: Request-sent #1261

ravithakkarrepo opened this issue Jun 24, 2022 · 1 comment
Milestone

Comments

@ravithakkarrepo
Copy link

Invoked as: /usr/local/bin/s3cmd --configure
Problem: CannotSendRequest: Request-sent
S3cmd: 2.2.0
python: 3.8.10 (default, Mar 15 2022, 12:22:08)
[GCC 9.4.0]
environment LANG=en_IN

Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/s3cmd-2.2.0-py3.8.egg/EGG-INFO/scripts/s3cmd", line 3209, in
File "/usr/local/lib/python3.8/dist-packages/s3cmd-2.2.0-py3.8.egg/EGG-INFO/scripts/s3cmd", line 2895, in main
File "/usr/local/lib/python3.8/dist-packages/s3cmd-2.2.0-py3.8.egg/S3/Config.py", line 289, in init
self.role_config()
File "/usr/local/lib/python3.8/dist-packages/s3cmd-2.2.0-py3.8.egg/S3/Config.py", line 383, in role_config
conn.request('GET', "/latest/meta-data/iam/security-credentials/", headers=imds_auth)
File "/usr/lib/python3.8/http/client.py", line 1256, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/usr/local/lib/python3.8/dist-packages/s3cmd-2.2.0-py3.8.egg/S3/Custom_httplib3x.py", line 159, in httpconnection_patched_send_request
self.putrequest(method, url, **skips)
File "/usr/lib/python3.8/http/client.py", line 1093, in putrequest
raise CannotSendRequest(self.__state)
http.client.CannotSendRequest: Request-sent

@fviard
Copy link
Contributor

fviard commented Jun 27, 2022

Hi,
I have just pushed in MASTER a fix for this issue, could it be possible for you to give it a try?
If it works, I will try to have a release soon with that.
Thank you

fviard added a commit to fviard/s3cmd that referenced this issue Oct 3, 2022
In some cases, like "timeout", and python3, despite the exception, the
connection could stay in "request-sent" state and so crash if attempting
another request.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants