-
Notifications
You must be signed in to change notification settings - Fork 212
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
gsutil cp bad request #217
Comments
Hey @jonasfugedi, thanks for opening this issue. What do you see in the server logs? |
The logs did not give me any good clues. Is there any debug flag I can enable to get more details? time="2020-04-19T17:01:22Z"` Also, I assume this is reproducible anywhere? I've only tried it on two machines so far. |
@jonasfugedi thanks for sharing. I wanted to check where exactly the 400 was happening. So:
I believe next step would be to try and tap into what gsutil is sending, creating a test and fixing the issue in fake-gcs-server. Will tag this as a bug. Thanks again for reporting and for sharing the logs! |
I think I'm running into this same issue in my tests to create signed upload URLs. When using fake-gcs server I just return a "direct" URL without the signing key (since that I can't fake KMS stuff and this works for downloads). Edit: I'm not entirely sure this is the same bug, so I moved this comment over to #270 as its own thing. |
I'm having a similar problem with
https://stackoverflow.com/questions/43527820/mime-parsemediatype-fails-on-multipart-boundary gave me enough of a clue to mess with I made the change on a fork and verified I was able to get past this error. See StephenWithPH@87e3e3e. However...
This is at https://github.com/GoogleCloudPlatform/gsutil/blob/master/gslib/commands/cp.py#L1053. I'm working backwards, but it looks like Of note, the object uploads successfully (see logs):
And the object is actually there in
|
An update: It seems that the second half of @StephenWithPH 's comment has been fixed - fixing the multipart boundary bug is now sufficient for |
I need to test some bash scripts which run gsutil but I keep getting errors when trying to create objects using gsutil. The scenario I run is basically:
docker run --name fake-gcs-server -p 4443:4443 fsouza/fake-gcs-server
gsutil -o "Credentials:gs_json_host=0.0.0.0" -o "Credentials:gs_json_port=4443" -o "Boto:https_validate_certificates=False" mb "gs://test"
gsutil -o "Credentials:gs_json_host=0.0.0.0" -o "Credentials:gs_json_port=4443" -o "Boto:https_validate_certificates=False" ls "gs://test"
echo "Hello" | gsutil -o "Credentials:gs_json_host=0.0.0.0" -o "Credentials:gs_json_port=4443" -o "Boto:https_validate_certificates=False" cp - "gs://test/hello.txt"
Copying from ...
ResumableUploadStartOverException: 404 Bad Request
gsutil -o "Credentials:gs_json_host=0.0.0.0" -o "Credentials:gs_json_port=4443" -o "Boto:https_validate_certificates=False" cp ./tmp/funny-memes-81.jpg "gs://test/"
Copying file://./tmp/funny-memes-81.jpg [Content-Type=image/jpeg]...
BadRequestException: 400 Bad Request
The text was updated successfully, but these errors were encountered: