aws-ecr-http-proxy icon indicating copy to clipboard operation
aws-ecr-http-proxy copied to clipboard

error parsing HTTP 400 response body:

Open DrPreobrazhensky opened this issue 6 years ago • 4 comments

Thank for sharing aws-ecr-http-proxy.

When I do docker push an error occurred.

error parsing HTTP 400 response body: invalid character '<' looking for beginning of value: "<html>\r\n<head><title>400 The plain HTTP request was sent to HTTPS port</title></head>\r\n<body bgcolor=\"white\">\r\n<center><h1>400 Bad Request</h1></center>\r\n<center>The plain HTTP request was sent to HTTPS port</center>\r\n<hr><center>openresty/1.13.6.1</center>\r\n</body>\r\n</html>\r\n"

DrPreobrazhensky avatar May 24 '18 15:05 DrPreobrazhensky

hi @DrPreobrazhensky. thanks for trying the proxy.

Are you able to pull images? Also it would be great if you post your configuration (docker_proxy_backend format and docker_proxy_backend_schema) and nginx logs here.

mqasimsarfraz avatar May 25 '18 09:05 mqasimsarfraz

Yes I able to pull. I've switched already from aws-ecr-http-proxy to nginx and own config but my server_name like name.subdomain.domain.net and other settings is default.

Sorry I can't provide more info. I guess we can close this issue.

DrPreobrazhensky avatar May 25 '18 11:05 DrPreobrazhensky

That is strange. Have you marked the proxy insecure? or SSL/TLS termination? or any other modifications?

mqasimsarfraz avatar May 25 '18 12:05 mqasimsarfraz

I am also getting something similar on docker push.

Authentication: IAM Role Version: 1.4.0

Command: docker push aws-registry-proxy-test.example.com/abc:master Error:

The push refers to repository [aws-registry-proxy-test.example.com/abc:master]
d52a5eca0207: Preparing
6d1e6cb4df22: Preparing
0029f0c4cc17: Preparing
2b93c8d2bde6: Preparing
b20016f37d0d: Preparing
76a2a461089b: Waiting
denied: User: arn:aws:sts::<acount-id>:assumed-role/ecr-proxy/<role> is not authorized to perform: ecr:InitiateLayerUpload on resource: arn:aws:ecr:eu-west-1:<account-id>:repository/abc

Can we somehow separately handle the 401 and 403 requests also like 3xx?

varunpalekar avatar Aug 14 '20 18:08 varunpalekar