apache / openwhisk

Apache OpenWhisk is an open source serverless cloud platform
https://openwhisk.apache.org/
Apache License 2.0
6.56k stars 1.17k forks source link

pull access denied for scala, repository does not exist or may require 'docker login': denied: requested access to the resource is denied #5159

Open liusy58 opened 3 years ago

liusy58 commented 3 years ago

Hi,sir , after I entered the command ./gradlew :core:standalone:distDocker, I got the following error output:

Build using Scala 2.12

> Configure project :core:scheduler
[task ':core:scheduler:assemble', task ':core:scheduler:assembleDist', task ':core:scheduler:build', task ':core:scheduler:buildDependents', task ':core:scheduler:buildEnvironment', task ':core:scheduler:buildNeeded', task ':core:scheduler:check', task ':core:scheduler:checkScalafmt', task ':core:scheduler:checkScalafmtAll', task ':core:scheduler:checkScoverage', task ':core:scheduler:checkScoverageScalafmt', task ':core:scheduler:checkTestScalafmt', task ':core:scheduler:classes', task ':core:scheduler:clean', task ':core:scheduler:cleanEclipse', task ':core:scheduler:cleanEclipseClasspath', task ':core:scheduler:cleanEclipseJdt', task ':core:scheduler:cleanEclipseProject', task ':core:scheduler:compileJava', task ':core:scheduler:compileScala', task ':core:scheduler:compileScoverageJava', task ':core:scheduler:compileScoverageScala', task ':core:scheduler:compileTestJava', task ':core:scheduler:compileTestScala', task ':core:scheduler:components', task ':core:scheduler:dependencies', task ':core:scheduler:dependencyInsight', task ':core:scheduler:dependentComponents', task ':core:scheduler:distTar', task ':core:scheduler:distZip', task ':core:scheduler:eclipse', task ':core:scheduler:eclipseClasspath', task ':core:scheduler:eclipseJdt', task ':core:scheduler:eclipseProject', task ':core:scheduler:help', task ':core:scheduler:install', task ':core:scheduler:installDist', task ':core:scheduler:jar', task ':core:scheduler:javadoc', task ':core:scheduler:model', task ':core:scheduler:prepareKotlinBuildScriptModel', task ':core:scheduler:processResources', task ':core:scheduler:processScoverageResources', task ':core:scheduler:processTestResources', task ':core:scheduler:projects', task ':core:scheduler:properties', task ':core:scheduler:reportScoverage', task ':core:scheduler:run', task ':core:scheduler:scaladoc', task ':core:scheduler:scalafmt', task ':core:scheduler:scalafmtAll', task ':core:scheduler:scoverageClasses', task ':core:scheduler:scoverageScalafmt', task ':core:scheduler:startScripts', task ':core:scheduler:tasks', task ':core:scheduler:test', task ':core:scheduler:testClasses', task ':core:scheduler:testScalafmt']
Scala sub-project 'gatling_tests' doesn't have Scoverage applied and will be ignored in parent project aggregation
Sending build context to Docker daemon  206.1MB

Step 1/11 : FROM scala

> Task :core:standalone:distDocker
Thu Sep 23 19:43:32 CST 2021: Executing 'docker build --build-arg OPENWHISK_JAR=build/libs/openwhisk-standalone-1.0.0-SNAPSHOT.jar -f /home/lsy/backup/openwhisk/core/standalone/Dockerfile -t standalone /home/lsy/backup/openwhisk/core/standalone'

pull access denied for scala, repository does not exist or may require 'docker login': denied: requested access to the resource is denied

> Task :core:standalone:distDocker
Thu Sep 23 19:43:38 CST 2021: Command 'docker build --build-arg OPENWHISK_JAR=build/libs/openwhisk-standalone-1.0.0-SNAPSHOT.jar -f /home/lsy/backup/openwhisk/core/standalone/Dockerfile -t standalone /home/lsy/backup/openwhisk/core/standalone' failed with exitCode 1, 2 retries left, retrying...
Thu Sep 23 19:43:38 CST 2021: Executing 'docker build --build-arg OPENWHISK_JAR=build/libs/openwhisk-standalone-1.0.0-SNAPSHOT.jar -f /home/lsy/backup/openwhisk/core/standalone/Dockerfile -t standalone /home/lsy/backup/openwhisk/core/standalone'

Sending build context to Docker daemon  206.1MB

Step 1/11 : FROM scala
pull access denied for scala, repository does not exist or may require 'docker login': denied: requested access to the resource is denied

> Task :core:standalone:distDocker
Thu Sep 23 19:43:44 CST 2021: Command 'docker build --build-arg OPENWHISK_JAR=build/libs/openwhisk-standalone-1.0.0-SNAPSHOT.jar -f /home/lsy/backup/openwhisk/core/standalone/Dockerfile -t standalone /home/lsy/backup/openwhisk/core/standalone' failed with exitCode 1, 1 retries left, retrying...
Thu Sep 23 19:43:44 CST 2021: Executing 'docker build --build-arg OPENWHISK_JAR=build/libs/openwhisk-standalone-1.0.0-SNAPSHOT.jar -f /home/lsy/backup/openwhisk/core/standalone/Dockerfile -t standalone /home/lsy/backup/openwhisk/core/standalone'

Sending build context to Docker daemon  206.1MB

Step 1/11 : FROM scala
pull access denied for scala, repository does not exist or may require 'docker login': denied: requested access to the resource is denied

> Task :core:standalone:distDocker FAILED
Thu Sep 23 19:43:50 CST 2021: Command 'docker build --build-arg OPENWHISK_JAR=build/libs/openwhisk-standalone-1.0.0-SNAPSHOT.jar -f /home/lsy/backup/openwhisk/core/standalone/Dockerfile -t standalone /home/lsy/backup/openwhisk/core/standalone' failed with exitCode 1, no more retries left, aborting...
Error response from daemon: No such image: standalone:latest
Error response from daemon: No such image: standalone:latest
Error response from daemon: No such image: standalone:latest

> Task :core:standalone:tagImage FAILED
Thu Sep 23 19:43:50 CST 2021: Executing 'docker tag standalone whisk/standalone:latest'
Thu Sep 23 19:43:50 CST 2021: Command 'docker tag standalone whisk/standalone:latest' failed with exitCode 1, 2 retries left, retrying...
Thu Sep 23 19:43:50 CST 2021: Executing 'docker tag standalone whisk/standalone:latest'
Thu Sep 23 19:43:50 CST 2021: Command 'docker tag standalone whisk/standalone:latest' failed with exitCode 1, 1 retries left, retrying...
Thu Sep 23 19:43:50 CST 2021: Executing 'docker tag standalone whisk/standalone:latest'
Thu Sep 23 19:43:50 CST 2021: Command 'docker tag standalone whisk/standalone:latest' failed with exitCode 1, no more retries left, aborting...

FAILURE: Build completed with 2 failures.

1: Task failed with an exception.
-----------
* Where:
Script '/home/lsy/backup/openwhisk/gradle/docker.gradle' line: 168

* What went wrong:
Execution failed for task ':core:standalone:distDocker'.
> Thu Sep 23 19:43:50 CST 2021: Command 'docker build --build-arg OPENWHISK_JAR=build/libs/openwhisk-standalone-1.0.0-SNAPSHOT.jar -f /home/lsy/backup/openwhisk/core/standalone/Dockerfile -t standalone /home/lsy/backup/openwhisk/core/standalone' failed with exitCode 1

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
==============================================================================

2: Task failed with an exception.
-----------
* Where:
Script '/home/lsy/backup/openwhisk/gradle/docker.gradle' line: 168

* What went wrong:
Execution failed for task ':core:standalone:tagImage'.
> Thu Sep 23 19:43:50 CST 2021: Command 'docker tag standalone whisk/standalone:latest' failed with exitCode 1

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
==============================================================================

* Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/5.5.1/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 22s
30 actionable tasks: 8 executed, 22 up-to-date

Publishing build scan...

Could you please tell me how to solve it?

rabbah commented 3 years ago

Step 1/11 : FROM scala fails because this is an image built by openwhisk, it doesn't exist on dockerhub. The command you want to run standalone is:

gradlew core:standalone:bootRun 

If you use bin/wskdev it's bin/wskdev standalone (you can add -n for a dry run).

liusy58 commented 3 years ago

thx

liusy58 commented 3 years ago

But in fact I built successfully about 20 days ago? Interesting...

andrejonker commented 2 years ago

When I installed using the CouchDB procedure, I saw this in the logs: Executing 'docker build -f /opt/openwhisk/common/scala/Dockerfile -t scala /opt/openwhisk/common/scala'

I think this might be the Dockerfile: github.com/apache/openwhisk/common/scala/Dockerfile

upgle commented 2 years ago

I'm also having the same problem

#3 [internal] load metadata for docker.io/library/scala:latest
#3 sha256:519bc75d5b2c1249ddd98847fd40e9a311d81ab2f90550bf7630aa00e29a9983
#3 ERROR: pull access denied, repository does not exist or may require authorization: server message: insufficient_scope: authorization failed
------

environment

upgle commented 2 years ago

I found the reason why the build is failing.

Disable buildkit to use a local base image and restart docker daemon:

  "features": {
    "buildkit": false
  }

In my environment the build was successful.

 ---> Running in 25572aec8811
Removing intermediate container 25572aec8811
 ---> 73ed17e417f1
Successfully built 73ed17e417f1