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 pull i/o timeout with v2 registry #878
Comments
I suggest you start with fetching your nginx error log and registry log as well, to validate the request never reach them - then you will have to investigate why your client fails to communicate with the service. |
This seems related to moby/moby#13337. Let's eliminate registry configuration as the root cause and work from there. |
I'm getting this log entry over an over again in the nginx log:
|
@kyleburnett Looks like nginx is timing out on fetching the manifest. Looking at the default value for a proxy_read_timeout of 60s, there might be an upstream problem. I noticed you have what looks like a random id for the repository name, "035088a9398b/math". Is this intended? Do you have the registry logs? |
The "random id" is intentional. Here are the logs
|
@kyleburnett So, it looks like the manifest requests are taking up to 100 seconds or more. This explains the nginx timeouts. Increasing the timeout will avoid the errors, but there seems to be a performance problem. Would it be possible to change to the debug logging level and try the pull again? |
Here are the debug level logs
|
Could this issue stem from the way our storage backend is configured? Specifically the location |
We were just looking at more of the logs and thought that this was interesting:
It tries to do a GET /v2/ request, receives a 401 and then falls back to GET /v1/_ping |
@kyleburnett this last behavior is expected (fallback to v1 on v2 failure). |
Trying some new things this morning. We upgraded docker to the latest version. Here is our new docker version information:
We also changed the registry to use silly authentication. The errors are a bit different, but they still seem to be related to timeouts. Again, the errors happen intermittently. Running docker using
|
@kyleburnett: Also, disable all sort of authentication, and validate that your registry is working that way. Let me know. |
@kyleburnett I really don't recommend random repository names. The registry is not designed to cope with a high cardinality of repositories. How many random ids are you generating per day? |
@dmp42 Ok, here is where I'm at. I have upgraded docker from 1.7.0 to 1.8.1 (the latest). I added these lines in the nginx configuration.
It still works sometimes. Other times, it times out with the following error in the nginx error.log file:
When the timeout hits, I see the the following error in the docker log:
because nginx has returned a 404.
Seems like the registry just stops responding. @stevvooe We're running a test suite, so we set up an account with a random name (the "random id" that you see). In a production environment, accounts would correspond to real entities that would be created very infrequently. |
Also I have removed the |
@stevvooe and @dmp42 Either way, I'm closing this issue since there is really no reason to not use Thanks! |
@kyleburnett i think there may be something wrong with inmemory cache..i'm also using imemory on my registry proxy. I found a problem that the proxy's scheduler removed the expired blob, but its info still existed in cache, which leading client pulling blob with failure. Then i remove cache settings in i''m using distribution v2.2.1. |
@depay There may be a cache invalidation bug. @RichardScothern Do we have an issue open for that? |
There was a bug, it was fixed and I replied in the other thread which @depay raised this issue in. |
@stevvooe @RichardScothern thanks and i saw the reply there. |
I'm running a private registry (v2) with the following configuration.
The registry sits behind nginx which is configured as follows:
Occasionally (about 15% of the time), pulling an image with the npm module dockerode fails with the following logs from the docker daemon.
Here is my docker version information:
Not sure where to go from here. Any suggestions?
The text was updated successfully, but these errors were encountered: