docker-images icon indicating copy to clipboard operation
docker-images copied to clipboard

`Password: su: Authentication failure` error when starting the container

Open ZhouXing19 opened this issue 11 months ago • 2 comments

  • OS: Mac M1
  • Image: container-registry.oracle.com/database/express:21.3.0-xe
  • Docker Driver: Podman (in shell commands below, docker is alias of podman)

I'm aware that as mentioned in https://github.com/oracle/docker-images/issues/2709 that it's recommended to use container-registry.oracle.com/database/enterprise:19.19.0.0 but it doesn't seem to be accessible:

$ docker pull container-registry.oracle.com/database/enterprise       

Trying to pull container-registry.oracle.com/database/enterprise:latest...
Error: initializing source docker://container-registry.oracle.com/database/enterprise:latest: unable to retrieve auth token: invalid username/password: authentication required

So I switched to container-registry.oracle.com/database/express:21.3.0-xe following instruction here.

And I encountered this error constantly, and with ORACLE_PWD set, it still shows the same error.

$ docker run --name oracle-cont -v $(PWD)/oracle-data:/opt/oracle/oradata \
container-registry.oracle.com/database/express:21.3.0-xe   

WARNING: image platform (linux/amd64) does not match the expected platform (linux/arm64)
Password: su: Authentication failure

The thing is, i didn't have the chance to enter any password, but it seems to autocomplete some password, resulting in this auth failure.

ZhouXing19 avatar Mar 12 '24 20:03 ZhouXing19

@ZhouXing19 to pull from container-registry.oracle.com/database/enterprise you now need an Auth Token. Password does not work.

Login to container-registry.oracle.com from your browser and generate an Auth Token by clicking on your profile icon on top right.

yunus-qureshi avatar Mar 13 '24 04:03 yunus-qureshi

@ZhouXing19, the recommendation from @yunus-qureshi should resolve the unable to retrieve auth token: invalid username/password: authentication required error you see when pulling the ARM-based 19.19 image. To expand on his response:

  1. Go to https://container-registry.oracle.com/
  2. In the upper right corner, click on and complete the "Sign In" steps using your Oracle SSO username/password.
  3. Navigate to the database page at https://container-registry.oracle.com/ords/ocr/ba/database
  4. You'll see a list of repositories. Screenshot 2024-03-13 at 04 57 29
  5. The image you're trying to download is under the enterprise repo. At the far right side of that row, click on the "Continue" button to bring up the Oracle license agreement.
  6. Carefully read and accept the agreement.
  7. You'll return to the database repository page. In the enterprise row, you should now see a message indicating that you've accepted the license, and there will be a green checkmark on the far right side.
  8. Then, login to the repo from your host using docker login container-registry.oracle.com
  9. Enter your Oracle SSO username and password (the same one you used to log into the container registry page).
  10. Your pull request should now work!

The error you're seeing with the container-registry.oracle.com/database/express:21.3.0-xe image is misleading. There isn't a password issue; the problem stems from an architecture mismatch between the host OS (Mac M1 runs ARM architecture) and the image, which is built for AMD (Intel). That's visible in the preceding warning text: WARNING: image platform (linux/amd64) does not match the expected platform (linux/arm64).

If you can't solve the token issue accessing the container registry and you have access to download the installation binary from My Oracle Support, you can also build the image locally using this repository. HTH!

oraclesean avatar Mar 13 '24 11:03 oraclesean

Thanks! The instruction worked. Closing.

ZhouXing19 avatar Jun 18 '24 18:06 ZhouXing19