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

docker push error 404: #1291

Closed
xiaomaosusie opened this issue Nov 6, 2017 · 11 comments
Closed

docker push error 404: #1291

xiaomaosusie opened this issue Nov 6, 2017 · 11 comments

Comments

@xiaomaosusie
Copy link

xiaomaosusie commented Nov 6, 2017

While pushing image I had following error:
:

error parsing HTTP 404 response body: invalid character '<' looking for beginning of value: "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 3.2 Final//EN\">\n<title>404 Not Found</title>\n<h1>Not Found</h1>\n<p>The requested URL was not found on the server.  If you entered the URL manually please check your spelling and try again.</p>\n"

I'm using windows 10; trying to push image to corporate private registry.

Information

  • Diagnostic ID: 59336000-3628-4D06-8666-77DD45BCA64F/2017-11-06_18-36-12

docker info

Containers: 12
 Running: 0
 Paused: 0
 Stopped: 12
Images: 22
Server Version: 17.09.0-ce
Storage Driver: overlay2
 Backing Filesystem: extfs
 Supports d_type: true
 Native Overlay Diff: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
 Volume: local
 Network: bridge host ipvlan macvlan null overlay
 Log: awslogs fluentd gcplogs gelf journald json-file logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 06b9cb35161009dcb7123345749fef02f7cea8e0
runc version: 3f2f8b84a77f73d38244dd690525642a72156c64
init version: 949e6fa
Security Options:
 seccomp
  Profile: default
Kernel Version: 4.9.49-moby
Operating System: Alpine Linux v3.5
OSType: linux
Architecture: x86_64
CPUs: 2
Total Memory: 1.934GiB
Name: moby
ID: RHZQ:CRI7:JM4B:GEVX:KJ3Q:22WS:YWU4:BYBI:QZYA:6BYS:AIW4:TO6F
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): true
 File Descriptors: 16
 Goroutines: 25
 System Time: 2017-11-06T23:41:08.5224314Z
 EventsListeners: 0
Registry: https://index.docker.io/v1/
Experimental: true
Insecure Registries: (I've input private registry...I just removed it here for security purpose) 
 127.0.0.0/8
Live Restore Enabled: false

Let me know if anything else I shall provide...

Thank you so much!!

@xiaomaosusie
Copy link
Author

Hi Jason,

Thanks for picking up the ticket. I had a feeling that it could be related to V1 and V2 thing...I noticed that the latest docker I downloaded automatically generate http://private host:5000/v2/repositories while my corporate one is http://private host:5000/v1/repositories....if I changed "v1" to "v2", I got the 404 error.

Would this be the issue?

Thanks,
Susie

@jasonbivins
Copy link

Hi Susie, thanks for the extra information! The "v1" and "v2" are definitely the issue here, the error you're seeing says that it's a mistyped URL. Are you using DTR, or is your company using the standard Docker hub?
image

@xiaomaosusie
Copy link
Author

xiaomaosusie commented Nov 9, 2017

Hi Jason,

Thanks. for some reason, my "respositories" is grey out. Does it mean that I haven't setup any repos?

image

Thanks,
Susie

@jasonbivins
Copy link

Hi Susie, do you have a Docker Login? It looks like you're signed out. You'll need to sign into your Docker Hub account to get to the right Repositories.
Try a docker login command

Thanks

@xiaomaosusie
Copy link
Author

I've created a login. my company is using our own insecure repository. So now I can see "Repositories"...do I need to set up anything here?

Thanks,
Susie

@jasonbivins
Copy link

jasonbivins commented Nov 9, 2017

Hi Susie,
If your Docker cloud account doesn't already attach you to the repositories you need, then you'll need to point to them manually using the Docker Daemon settings. Is there someone on your team who already has it setup?
Right click the Whale icon > Settings > Daemon
image

@xiaomaosusie
Copy link
Author

xiaomaosusie commented Nov 10, 2017

Hi Jason,
Yes. I had set up "insecure-registries", same setup as my coworker. (Sorry I should have mentioned it earlier.) Though Daemon setup looked good, the 404 error came along (the reason I submitted this ticket). I did some googling but couldn't figure out whether the issue was around v1/v2, DNS, or other unknown ones...

I tried following steps at a mac machine and got the exact same 404 error. Hence, I think the issue isn't Windows specific.
What I did:

  1. downloaded latest stable version from Docker website;
  2. installed it, ran "hello world" and it worked;
  3. added insecure registry;
  4. built a tag named same as an existing tag (because I wanted to overwrite the existing one)
  5. successfully built the tag but failed to push it, getting 404 error as stated above.

Feel free to let me know what else I shall provide to help diagnose my problem. Thank you so much.

really appreciated,
Susie

@changming1988
Copy link

Hi Jason,
I had a same issue. I can login docker hub, run hello world successfully, and set the insecure registry, but I cannot pull image from our registry.

My colleague has the same configuration, and can pull image from our registry. But we cannot figure out what the problem is in my docker...

Thanks,
Arthur

@thaJeztah
Copy link
Member

thaJeztah commented Dec 29, 2017

while my corporate one is http://private host:5000/v1/repositories....if I changed "v1" to "v2", I got the 404 error.

@xiaomaosusie Yes, that most likely is the issue. The V1 protocol is deprecated, and interacting with V1 registries was deprecated in Docker 1.8.3. Since then, docker has printed a warning for each image that was pulled from a V1 registry; if you've seen that message when pulling images, then your internal registry is in deed a V1 registry;

this image was pulled from a legacy registry.
Important: This registry version will not be supported in future versions of docker

Since Docker 17.06, pulling from legacy registries was disabled by default (but could be enabled with the --disable-legacy-registries=false / {"disable-legacy-registries": false} daemon configuration), and is now completely removed in Docker 17.12.

Docker 17.09 is the last version that still allows you to connect to v1 registries, but I would really urge you to upgrade your internal registry to a registry that supports the V2 standard. The V1 standard is known to have vulnerabilities, and if you're running the open-source V1 registry; that code hasn't been maintained for 3 years, and should not be used anymore.

You can run the open source V2 registry, but for a corporate environment I'd recommend running DTR (Docker Trusted Registry), as it also brings additional features targeted at corporate use (access control, security scanning of your images for CVE's/vulnerabilities, image signing)

@docker-robott
Copy link
Collaborator

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale comment.
Stale issues will be closed after an additional 30d of inactivity.

Prevent issues from auto-closing with an /lifecycle frozen comment.

If this issue is safe to close now please do so.

Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows.
/lifecycle stale

@docker-robott
Copy link
Collaborator

Closed issues are locked after 30 days of inactivity.
This helps our team focus on active issues.

If you have found a problem that seems similar to this, please open a new issue.

Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows.
/lifecycle locked

@docker docker locked and limited conversation to collaborators Jun 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants