Closed hakunamatataaaaa closed 4 years ago
It looks like you are trying to use Python 3. This tool is meant to be used with Python 2. If you don't want to install the older version of Python, I suggest you use the Docker container of Python to run it (see https://github.com/jfrog/docker2artifactory#data-migration-1)
I am using below command now and the output show me error
Command: docker run -it --rm --name ecr-jfrog -v "$PWD":/usr/src/myapp -w /usr/src/myapp python:2.7.14 python DockerMigrator.py ecr --ignore-certs -v --image-file image.txt https://XXXXXXX.dkr.ecr.ap-southeast-2.amazonaws.com/ eyXXXX https://mydockerrepo.myorg.com usernameXXX passwordXXX mydockerrepo
error: 2020-08-16 13:55:10,064 [Thread-1] [INFO] (migrator.HTTPAccess:132) - Sending GET request to https://XXXXXX.dkr.ecr.ap-southeast-2.amazonaws.com/v2/pm-evolve-nginx-svc/manifests/latest. 2020-08-16 13:55:10,084 [Thread-1] [ERROR] (migrator.Migrator:89) - Unable to get manifest for pm-evolve-nginx-svc/latest... Migration finished. Failed to migrate the following 1 images: pm-evolve-nginx-svc/latest
That does not provide a lot of details. My guess is that you are running into #10 . Are you able to import other images successfully? Can you try it with a few others? You can also try running with the redirectDebug branch which will print out a lot more verbose HTTP errors.
If the issue is #10, we may be able to provide a fix for it but you should still be able to migrate everything else (by not using the --image-file feature) in the mean time and simply rerun it when the #10 is resolved to handle the remaining images. It is safe to run and over (only the diff will be done).
redirectDebug
Hi,
i am not able to upload any images. i will provide full details.
Also can you provide the command where to pass the parameter redirectDebug?
2020-08-16 13:55:01,937 [MainThread] [INFO] (migrator.DockerRegistryAccess:52) - Verify Registry is V2 2020-08-16 13:55:01,938 [MainThread] [INFO] (migrator.HTTPAccess:132) - Sending GET request to https://XXXXXX.dkr.ecr.ap-southeast-2.amazonaws.com/v2/. 2020-08-16 13:55:01,958 [MainThread] [INFO] (migrator.ArtifactoryBaseAccess:58) - Checking the Artifatory version 2020-08-16 13:55:01,959 [MainThread] [INFO] (migrator.ArtifactoryBaseAccess:132) - Sending GET request to https://evolve-docker-nonprod.myorg.com/api/system/version. 2020-08-16 13:55:03,121 [MainThread] [INFO] (migrator.ArtifactoryBaseAccess:61) - Found version: 6.13.1 2020-08-16 13:55:03,121 [MainThread] [INFO] (migrator.ArtifactoryDockerAccess:133) - Checking the Artifatory Docker repo 'evolve-docker-nonprod' 2020-08-16 13:55:03,122 [MainThread] [INFO] (migrator.ArtifactoryDockerAccess:132) - Sending GET request to https://evolve-docker-nonprod.myorg.com/api/repositories/evolve-docker-nonprod. 2020-08-16 13:55:04,599 [MainThread] [INFO] (migrator.ArtifactoryDockerAccess:132) - Sending GET request to https://evolve-docker-nonprod.myorg.com.com/api/docker/evolve-docker-nonprod/v2/_catalog. Performing migration for 1 image/tags. 2020-08-16 13:55:05,757 [MainThread] [INFO] (migrator.ArtifactoryDockerAccess:38) - Usage call 2020-08-16 13:55:05,758 [MainThread] [INFO] (migrator.ArtifactoryDockerAccess:132) - Sending POST request to https://evolve-docker-nonprod.myorg.com/api/system/usage. 2020-08-16 13:55:07,434 [Thread-1] [INFO] (migrator.ArtifactoryBaseAccess:58) - Checking the Artifatory version 2020-08-16 13:55:07,435 [Thread-1] [INFO] (migrator.ArtifactoryBaseAccess:132) - Sending GET request to https://evolve-docker-nonprod.myorg.com.com/api/system/version. 2020-08-16 13:55:07,438 [Thread-2] [INFO] (migrator.ArtifactoryBaseAccess:58) - Checking the Artifatory version 2020-08-16 13:55:07,440 [Thread-2] [INFO] (migrator.ArtifactoryBaseAccess:132) - Sending GET request to https://evolve-docker-nonprod.myorg.com/api/system/version. 2020-08-16 13:55:08,571 [Thread-1] [INFO] (migrator.ArtifactoryBaseAccess:61) - Found version: 6.13.1 2020-08-16 13:55:08,572 [Thread-1] [INFO] (migrator.ArtifactoryDockerAccess:132) - Sending HEAD request to https://evolve-docker-nonprod.myorg.com/api/docker/evolve-docker-nonprod/v2/pm-evolve-nginx-svc/manifests/latest. 2020-08-16 13:55:09,110 [Thread-2] [INFO] (migrator.ArtifactoryBaseAccess:61) - Found version: 6.13.1 2020-08-16 13:55:10,063 [Thread-1] [INFO] (migrator.Migrator:60) - Uploading image pm-evolve-nginx-svc/latest... 2020-08-16 13:55:10,064 [Thread-1] [INFO] (migrator.HTTPAccess:132) - Sending GET request to https://XXXXXXXX.dkr.ecr.ap-southeast-2.amazonaws.com/v2/pm-evolve-nginx-svc/manifests/latest. 2020-08-16 13:55:10,084 [Thread-1] [ERROR] (migrator.Migrator:89) - Unable to get manifest for pm-evolve-nginx-svc/latest... Migration finished. Failed to migrate the following 1 images: pm-evolve-nginx-svc/latest
The redirectDebug is a debug branch (https://github.com/jfrog/docker2artifactory/tree/redirectDebug). YOu will have to do a git checkout of this particular branch and rerun the command.
I am able to migrate all repos without using --image-file and with using --image-file as well with the 'redirectDebug" branch feature. please confirm if i have to continue with "redirectDebug" branch further.
The migration was successful then? Or do you mean you are NOT able to? If you weren't able to, the logs would be helpful. If it worked, it is likely because we fixed a redirect issue in that branch. If that is the case, you can use the branch and close this ticket. That branch will work, it is just a little more verbose than the master branch.
Marking as closed. Reopen with additional details if you still have issues with this.
File "DockerMigrator.py", line 242 print "Found no repositories." ^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print("Found no repositories.")?