Taking the above expected requests along with understanding the purpose of the reverse proxy configuration allows for us to further debug and pinpoint possible places where the issue originates. Even without a reverse proxy, we still can further troubleshoot by just understanding what we expect in the logs.
The first thing to confirm is the request structure. We expect to see within the artifactory-request.log, that each request starts with the /api/docker/REPO_NAME. If we don’t see this format, we can then point to the Docker request or reverse proxy configuration as the cause of the issue as Artifactory is receiving an incorrectly formed request.
A couple examples of bad requests and what cause them:
|user|POST|/api/docker//v2/path/some-images/blobs/uploads/|404| (the repository name is missing which could be caused by the reverse proxy not having the $repo variable set properly)
|user|GET|/v2|202| (caused by the v2 request from the Docker client not being rewritten to /api/docker/REPO_NAME/…)
|user|GET|/api/docker/some-image/|404| (Docker pull request does not have the repository name within the request)
Another couple of common causes for Docker issues within the Artifactory configuration would be the Docker method we are using does not match the selected Docker method under the Artifactory -> Http Settings tab on the Admin panel. We also need to confirm the Default Deployment Repository is set within the virtual repository we are hitting.
The first thing to confirm is the request structure. We expect to see within the artifactory-request.log, that each request starts with the /api/docker/REPO_NAME. If we don’t see this format, we can then point to the Docker request or reverse proxy configuration as the cause of the issue as Artifactory is receiving an incorrectly formed request.
A couple examples of bad requests and what cause them:
|user|POST|/api/docker//v2/path/some-images/blobs/uploads/|404|
|user|GET|/v2|202|
|user|GET|/api/docker/some-image/|404|
Another couple of common causes for Docker issues within the Artifactory configuration would be the Docker method we are using does not match the selected Docker method under the Artifactory -> Http Settings tab on the Admin panel. We also need to confirm the Default Deployment Repository is set within the virtual repository we are hitting.