Open smsuresh opened 4 years ago
Update: Below is the latest error:
2020-06-05T04:31:10.125 INFO AnchoreWorker Analysis request accepted, received image digest sha256:5a56005eddb033987b97179b28140c991e1b61997a1fcb02f1838c739df9ba3a 2020-06-05T04:31:10.126 INFO AnchoreWorker Waiting for analysis of myregistry.com:5000/st2-ui-server-alpha:developv2_alpha_94, polling status periodically 2020-06-05T04:31:10.126 DEBUG AnchoreWorker anchore-engine get policy evaluation URL: http://myregistry.com:8228/v1/images/sha256:5a56005eddb033987b97179b28140c991e1b61997a1fcb02f1838c739df9ba3a/check?tag=myregistry.com:5000/st2-ui-server-alpha:developv2_alpha_94&detail=true 2020-06-05T04:31:10.170 DEBUG AnchoreWorker Attempting anchore-engine get policy evaluation (1/300) 2020-06-05T04:31:10.200 DEBUG AnchoreWorker anchore-engine get policy evaluation failed. URL: http://myregistry.com:8228/v1/images/sha256:5a56005eddb033987b97179b28140c991e1b61997a1fcb02f1838c739df9ba3a/check?tag=myregistry.com:5000/st2-ui-server-alpha:developv2_alpha_94&detail=true, status: HTTP/1.1 404 NOT FOUND, error: { "detail": { "error_codes": [] }, "httpcode": 404, "message": "image is not analyzed - analysis_status: not_analyzed" }
2020-06-05T04:31:10.200 DEBUG AnchoreWorker Snoozing before retrying anchore-engine get policy evaluation 2020-06-05T04:31:11.201 DEBUG AnchoreWorker Attempting anchore-engine get policy evaluation (2/300) 2020-06-05T04:31:11.226 DEBUG AnchoreWorker anchore-engine get policy evaluation failed. URL: http://myregistry.com:8228/v1/images/sha256:5a56005eddb033987b97179b28140c991e1b61997a1fcb02f1838c739df9ba3a/check?tag=myregistry.com:5000/st2-ui-server-alpha:developv2_alpha_94&detail=true, status: HTTP/1.1 404 NOT FOUND, error: { "detail": { "error_codes": [] }, "httpcode": 404, "message": "image is not analyzed - analysis_status: not_analyzed" }
2020-06-05T04:31:11.226 DEBUG AnchoreWorker Snoozing before retrying anchore-engine get policy evaluation 2020-06-05T04:31:12.227 DEBUG AnchoreWorker Attempting anchore-engine get policy evaluation (3/300) .. .. ... ..... ............ 2020-06-05T04:36:17.306 DEBUG AnchoreWorker Snoozing before retrying anchore-engine get policy evaluation 2020-06-05T04:36:18.307 DEBUG AnchoreWorker Attempting anchore-engine get policy evaluation (300/300) 2020-06-05T04:36:18.330 DEBUG AnchoreWorker anchore-engine get policy evaluation failed. URL: http://myregistry.com:8228/v1/images/sha256:5a56005eddb033987b97179b28140c991e1b61997a1fcb02f1838c739df9ba3a/check?tag=myregistry.com:5000/st2-ui-server-alpha:developv2_alpha_94&detail=true, status: HTTP/1.1 404 NOT FOUND, error: { "detail": { "error_codes": [] }, "httpcode": 404, "message": "image is not analyzed - analysis_status: analyzing" }
2020-06-05T04:36:18.330 WARN AnchoreWorker anchore-engine get policy evaluation failed. HTTP method: GET, URL: http://myregistry.com:8228/v1/images/sha256:5a56005eddb033987b97179b28140c991e1b61997a1fcb02f1838c739df9ba3a/check?tag=myregistry.com:5000/st2-ui-server-alpha:developv2_alpha_94&detail=true, status: 404, error: { "detail": { "error_codes": [] }, "httpcode": 404, "message": "image is not analyzed - analysis_status: analyzing" }
2020-06-05T04:36:18.331 WARN AnchoreWorker Exhausted all attempts polling anchore-engine. Analysis is incomplete for sha256:5a56005eddb033987b97179b28140c991e1b61997a1fcb02f1838c739df9ba3a 2020-06-05T04:36:18.331 ERROR AnchorePlugin Failing Anchore Container Image Scanner Plugin step due to errors in plugin execution hudson.AbortException: Timed out waiting for anchore-engine analysis to complete (increasing engineRetries might help). Check above logs for errors from anchore-engine at com.anchore.jenkins.plugins.anchore.BuildWorker.runGatesEngine(BuildWorker.java:443) at com.anchore.jenkins.plugins.anchore.BuildWorker.runGates(BuildWorker.java:295) at com.anchore.jenkins.plugins.anchore.AnchoreBuilder.perform(AnchoreBuilder.java:245) at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:80) at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:67) at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) 2020-06-05T04:36:18.331 DEBUG AnchoreWorker Cleaning up build artifacts 2020-06-05T04:36:18.331 DEBUG AnchoreWorker Deleting Jenkins workspace AnchoreReport.zTest-dk-dep_94 2020-06-05T04:36:19.043 INFO AnchorePlugin Completed Anchore Container Image Scanner step [Pipeline] } [Pipeline] // withEnv [Pipeline] } [Pipeline] // stage [Pipeline] stage [Pipeline] { (cleanup images) Stage "cleanup images" skipped due to earlier failure(s)
Image exist in repo:
Hi, I've added the local registry using [root@hostname1 anchoree]# anchore-cli registry add myregserver.com:5000 admin mypwd --insecure --skip-validate Registry: myregserver.com:5000 Name: myregserver.com:5000 User: admin Type: docker_v2 Verify TLS: False Created: 2020-06-05T08:31:58Z Updated: 2020-06-05T08:31:58Z
when i trigger using jenkins: seeing the below log. It looks searching at docker://docker.io/library instead of my local repo which is : myregserver.com:5000
Can you please help to fix it.
2020-06-05T02:19:17.814 ERROR AnchoreWorker anchore-engine add image failed. URL: http://myregserver.com:8228/v1/images?force=true, status: HTTP/1.1 400 BAD REQUEST, error: { "detail": { "error_codes": [ "REGISTRY_PERMISSION_DENIED" ], "raw_exception_message": "Error encountered in skopeo operation. cmd=/bin/sh -c skopeo inspect --raw --tls-verify=false docker://docker.io/library/st2-ui-server-alpha:developv2_alpha_88, rc=1, stdout=None, stderr=b'time=\"2020-06-05T08:19:17Z\" level=fatal msg=\"Error parsing image name \\\"docker://docker.io/library/st2-ui-server-alpha:developv2_alpha_88\\\": Error reading manifest developv2_alpha_88 in docker.io/library/st2-ui-server-alpha: errors:\\ndenied: requested access to the resource is denied\\nunauthorized: authentication required\\n\"\n', error_code=REGISTRY_PERMISSION_DENIED" }, "httpcode": 400, "message": "cannot fetch image digest/manifest from registry" }