Docker push giving 400

I’m trying to push to the docker hub registry and it is constantly failing.

The error is:

unknown: <html><body><h1>400 Bad request</h1>
Your browser sent an invalid request.
</body></html>

It appears to complete pushing must layers except for one that I see it constantly retrying. After a few retries and once all other layers have pushed the ‘push’ command then fails with above 404.

I don’t run a proxy (working from home with a simple internet connection).

I think this layer is fairly large 900MB and change.

I’ve tried running with the -D debug switch by no additional information is provided.

Any suggestions?

The complete output

docker push onepub/onepub-doc:4.63.124 
The push refers to repository [docker.io/onepub/onepub-doc]
cb2cb7d5cabe: Layer already exists 
5f70bf18a086: Layer already exists 
a1d066733af5: Layer already exists 
7f58d04395db: Layer already exists 
03b930a71e03: Layer already exists 
a97051ae74ed: Pushing [==================================================>]     304B/304B
dec295dac7c5: Layer already exists 
853c15e6cfd7: Layer already exists 
201a73b636cf: Layer already exists 
e2d9b4cc106b: Layer already exists 
44c463bdf28b: Layer already exists 
6f489b62acf7: Layer already exists 
24f1914ea34a: Layer already exists 
5eff2ffcf8ef: Layer already exists 
af8d4d9a90ca: Layer already exists 
63f86a2e9a68: Layer already exists 
a5f367779047: Layer already exists 
a55088c303b4: Layer already exists 
df99f51a8a63: Layer already exists 
107cbdaeec04: Layer already exists 
unknown: <html><body><h1>400 Bad request</h1>
Your browser sent an invalid request.
</body></html>

The layer that is stuck on ‘Pushing’ is the one that does multiple retries.

I’ve tried splitting the large layer into two layers (779MB and 155MB) but I’m still getting the same failure. I"m unclear on which layer is actually causing the issue as the history command does’t display layer ids.
I’ve also tried rebuilding with --no-cache with the same result.

so looking back through my logs the build --no-cache actually failed (for unrelated reasons).

I re-ran the build and now I can upload.

The docker error messages was not exactly helpful.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.