I have a new setup of Drone that I am testing and I can’t seem to add a private Docker repository. I am using an admin user, have verified that the drone CLI works by pulling up some user info, verified the repo info and everything seems good overall, but everytime I try to add the repo I get get a “client_error 404:”. The Drone logs are showing nothing in reference to this error.
the results of drone registry ls <repo> so that we can confirm it was added correctly
your docker daemon logs
I ask that you please do not redact useful debugging information, such as the registry url. Without full visibility we may not be able to help fully debug.
I did read the docs. That’s where I got the drone CLI instructions for adding the repo. As for the info you need:
I don’t have a yaml yet. I’m still in the initial setup and am just trying to add the registry through the CLI.
‘drone registry ls xvela/xvela-build-container’ also gives me a ‘client error 404:’ As noted above ‘drone user’ commands work successfully.
Here ya go. The errors in there are related to a Rancher service that isn’t effecting the overall setup.
– Logs begin at Sat 2018-02-17 20:18:08 UTC. –
Feb 23 23:55:29 drone-master dockerd[5451]: time=“2018-02-23T23:55:29.627925682Z” level=error msg="Handler for GET /v1.22/volumes/cbc5b9d339e77e4b1f083ae456669a6c8bc88be6739ce62776fc64b874553263 returned error: get cbc5b9d339e77e4b1f083ae456669a6c8bc88be6739ce62776fc64b874553263: no such volume"
Feb 23 23:57:29 drone-master dockerd[5451]: time=“2018-02-23T23:57:29.494107048Z” level=error msg="Handler for POST /v1.22/containers/0689ca2ad982130578075886b2df2907c9b0ed95d2ebc1140b6730854849865c/kill returned error: Cannot kill container 0689ca2ad982130578075886b2df2907c9b0ed95d2ebc1140b6730854849865c: Container 0689ca2ad982130578075886b2df2907c9b0ed95d2ebc1140b6730854849865c is not running"
Feb 23 23:57:29 drone-master dockerd[5451]: time=“2018-02-23T23:57:29.503469625Z” level=error msg="Handler for GET /v1.22/containers/0689ca2ad982130578075886b2df2907c9b0ed95d2ebc1140b6730854849865c/json returned error: No such container: 0689ca2ad982130578075886b2df2907c9b0ed95d2ebc1140b6730854849865c"
Feb 23 23:57:29 drone-master dockerd[5451]: time=“2018-02-23T23:57:29.596152377Z” level=error msg="Handler for GET /v1.22/volumes/e805da9dc79d8a0331ddf9ab65239c49bdf1dc1771776231da2f02059a4bf848 returned error: get e805da9dc79d8a0331ddf9ab65239c49bdf1dc1771776231da2f02059a4bf848: no such volume"
Feb 23 23:59:29 drone-master dockerd[5451]: time=“2018-02-23T23:59:29.588577834Z” level=error msg="Handler for POST /v1.22/containers/49bcdc6c75b8f65481f88a4142f47465e991958478dc4f3747c075cd24555722/kill returned error: Cannot kill container 49bcdc6c75b8f65481f88a4142f47465e991958478dc4f3747c075cd24555722: Container 49bcdc6c75b8f65481f88a4142f47465e991958478dc4f3747c075cd24555722 is not running"
Feb 23 23:59:29 drone-master dockerd[5451]: time=“2018-02-23T23:59:29.596562869Z” level=error msg="Handler for GET /v1.22/containers/49bcdc6c75b8f65481f88a4142f47465e991958478dc4f3747c075cd24555722/json returned error: No such container: 49bcdc6c75b8f65481f88a4142f47465e991958478dc4f3747c075cd24555722"
Feb 23 23:59:29 drone-master dockerd[5451]: time=“2018-02-23T23:59:29.704883327Z” level=error msg="Handler for GET /v1.22/volumes/d605d22b4e4e0d7ebe21f15e67e00d25253f08668238b15d68f08dcf9b57472f returned error: get d605d22b4e4e0d7ebe21f15e67e00d25253f08668238b15d68f08dcf9b57472f: no such volume"
Feb 24 00:01:29 drone-master dockerd[5451]: time=“2018-02-24T00:01:29.535539157Z” level=error msg="Handler for POST /v1.22/containers/0f64c8337f6bd953873995232eb4a6584f0f14a6eba0ab51766029f69d86bc69/kill returned error: Cannot kill container 0f64c8337f6bd953873995232eb4a6584f0f14a6eba0ab51766029f69d86bc69: Container 0f64c8337f6bd953873995232eb4a6584f0f14a6eba0ab51766029f69d86bc69 is not running"
Feb 24 00:01:29 drone-master dockerd[5451]: time=“2018-02-24T00:01:29.544217388Z” level=error msg="Handler for GET /v1.22/containers/0f64c8337f6bd953873995232eb4a6584f0f14a6eba0ab51766029f69d86bc69/json returned error: No such container: 0f64c8337f6bd953873995232eb4a6584f0f14a6eba0ab51766029f69d86bc69"
Feb 24 00:01:29 drone-master dockerd[5451]: time=“2018-02-24T00:01:29.647547933Z” level=error msg="Handler for GET /v1.22/volumes/3ffbf045960f0671c37b860da389ae0bce26909f12b2de7eb824d4d68e26e078 returned error: get 3ffbf045960f0671c37b860da389ae0bce26909f12b2de7eb824d4d68e26e078: no such volume"
Feb 24 00:03:30 drone-master dockerd[5451]: time=“2018-02-24T00:03:30.071842958Z” level=error msg="Handler for POST /v1.22/containers/235075f319f812744471ccc334bf1d59ad9729b8fd7a366a8852f5aab2ffbc59/kill returned error: Cannot kill container 235075f319f812744471ccc334bf1d59ad9729b8fd7a366a8852f5aab2ffbc59: Container 235075f319f812744471ccc334bf1d59ad9729b8fd7a366a8852f5aab2ffbc59 is not running"
Feb 24 00:03:30 drone-master dockerd[5451]: time=“2018-02-24T00:03:30.080640734Z” level=error msg="Handler for GET /v1.22/containers/235075f319f812744471ccc334bf1d59ad9729b8fd7a366a8852f5aab2ffbc59/json returned error: No such container: 235075f319f812744471ccc334bf1d59ad9729b8fd7a366a8852f5aab2ffbc59"
Feb 24 00:03:30 drone-master dockerd[5451]: time=“2018-02-24T00:03:30.166847370Z” level=error msg=“Handler for GET /v1.22/volumes/427082c70f81731343ea9936614d8801e0ab0ad5046da41a2a068741804ded2b returned error: get 427082c70f81731343ea9936614d8801e0ab0ad5046da41a2a068741804ded2b: no such volume”
Also, the logs from the drone container itself are just a number of the following. These seem to correspond to pushes to our repo.
If you are trying to create a registry, I would expect to see lines in the server logs matching the below url pattern. Perhaps you need to enable debug server logging?
method=POST path=/api/repos/%s/%s/registry
With debug logging enabled, the server will write lines to the logs for every API request, which will include permission details and failure reason, if applicable. This will likely provide an immediate answer to why you are receiving a 404 not found.
drone synchronizes the repository list with github, and stores the synchronized list in the database. This error message indicates your repository does not exist in the database, which means you probably need to synchronize your account. If you do not see the repository in the Drone user interface, you will not be able to active via the CLI
I just resynchronized my Github repos. That worked, but am still getting a 404 when trying to add the DockerHub repo. Why would being in sync with GitHub have anything to do with DockerHub repos?
Why would being in sync with GitHub have anything to do with DockerHub repos?
Well, when you synchronize, drone adds the github repository to the database. When you configure a registry for your github repository, that registry is added to the database as well, with the repository ID as the foreign key. Or to put it another way, registries are stored per-repository. Therefore, a registry cannot be added to a repository that does not yet exist in the database.
In terms of why adding a registry still receives a 404, have you checked your server logs? What exact command are you using to add the registry? Note that you need admin access to a repository in order to manage registry credentials and secrets, so a 404 could indicate you only have either read or write permissions (according to github). A malformed CLI command or invalid input could also result in a 404.
I grokked that the --repository option needs to be the git repo and not the docker repo (very unclear in docs), and I have created a yaml below and tried a test run, but am getting an “Invalid or missing image” failure.
Please note that in the above examples the --repository flag should be set to your version control repository name (e.g. your github repository name).
If you feel that you thoroughly read the docs (i.e. not skimming), and it was still unclear, please consider providing actionable feedback for how we can improve.
Please look at your Docker daemon logs. This error message indicates that the Docker daemon is unable to download your image. This could mean that you still have not configured your credentials properly, our could indicate some other problem. The Docker daemon logs will provide more details.
My Docker daemon logs don’t show anything related to this. Nor does the drone logs. I get the following from a ‘drone registry info xvela/xvela-app’
docker.io
Username: xveladevops
Email:
I removed and re-added the registry to ensure the password is correct. I also successfully verified that I could login to DockerHub and pull the container directly from the host,which worked fine.
This error message is returned if the yaml is malformed or if the image is blank. You can read more about this error message in the documentation, or by searching this forum (highly recommended).
In this particular case, it looks like you may have accidentally put the services section under the pipeline section, which is not a valid structure.