MacOracle

Oracle 23ai Free: Docker ORA-12547/Make File Issue

I was thrilled to see the new Oracle 23ai Free come out on Thursday, so I marched over on Friday and downloaded the newest docker image to continue becoming comfortable with the newest version’s features. 

When I tried to connect via SQLPlus as SYSDBA, I received an EXTPROC error. It pointed clearly to the listener.ora file, which I discovered a path listed still to ora23c for the extproc, corrected it, started the Listener, but to no avail- an ORA-12547 error, realizing I had a make file issue on the binaries for Oracle.

I contacted Geral Venzl, who was very gracious and after some quick research, he came back that his folks said everything was fine with the images, so I thanked him and dug into the issue deeper.  I quickly discovered this problem could happen to others, so decided I better document here for anyone who does happen upon it.

  1.  The issue is a docker problem, not an Oracle problem.  Oracle is just the victim of the unfortunate challenge here.
  2.  If you do have it happen, you will be able to successfully update to the latest image of Oracle 23ai from the Oracle 23c free image, but this will happen only if you previously downloaded the image and are updating to the latest 23ai one, downloaded with the tag “latest” as this relates to the docker confusion.
  3.  You must have had an Oracle 23c free container running at one time, even if you have removed it before updating.
  4. If you run the command “docker images” it may have 0 images listed – I was able to reproduce this with and without any images listed.

Dangling images in Docker

Docker has multiple layers and over time can retain data that should have been removed, including a scenario referred to as “dangling” images.  These images, if named and tagged the same as an updated image, can “intermingle” causing a problem if there were directory or critical application changes, which is what happened with the Oracle 23ai update.  Directories changed, but when the update occurred, the dangling image retained the original 23c directories as part of the latest image and corrupted my container builds.

If I attempted to rerun the download, it stated I was already updated to the latest one, all checks on the image passing, but in reality, it wasn’t a viable image due to the dangling image issue.

Scouring Dangling Images

To identify and resolve the issue, the process is to add a few arguments to show dangling images and to scour the system of unused i.e. “dangling” images.

First view the digests for images:

% docker images --digests
REPOSITORY                                    TAG       DIGEST                                                                    IMAGE ID       CREATED        SIZE

<none>                                        <none>    <none>                                                                    7510f8869b04   13 days ago    8.7GB

container-registry.oracle.com/database/free   <none>    sha256:5ac0efa9896962f6e0e91c54e23c03ae8f140cf6ed43ca09ef4354268a942882   39cabc8e6db0   8 months ago   9.16GB

Notice that I have an unnamed repository shadow and a repository that’s untagged.  I’ve only downloaded the latest Oracle 23c and ai on my Mac, so this was bizarre for me to see in the list.

I needed to remove these by the Image ID, since they didn’t have another qualifying naming convention.  And for one, it showed a container that I couldn’t view at all, but it did give me the Image ID, so at least I was informed of it’s shadowy existence, which then I was able to stop it and force the removal from there… :):

% docker rmi -f 7510f8869b04

Error response from daemon: conflict: unable to delete 7510f8869b04 (cannot be forced) - image is being used by running container bd62f588a848
 % docker stop bd62f588a848

bd62f588a848
 % docker rmi -f 7510f8869b04

Deleted: sha256:7510f8869b041dbd0dc782e7432aeee37cc2fd28eb4496e3b03c4ba3c5c4218e

Time to prune Docker from everything it’s been holding onto.  If you are using docker for other containers than JUST ORACLE 23c, please heed the warnings for running this command:

 
% docker system prune

WARNING! This will remove:

  - all stopped containers

  - all networks not used by at least one container

  - all dangling images

  - all dangling build cache

Are you sure you want to continue? [y/N] y

Deleted Containers:

bd62f588a84850902600cf5aaaf984e044b0b34a8d49cff5bd0b100176bc8935

0070ae6c345183e6396deaa6fc03719f7db1b2705a9bd811334d22ab7719e5a5

Total reclaimed space: 254.1MB

You now can rerun your check on the digests and you’ll see there are no more “dangling” out there!  If you still have problems, consider pruning everything and the storage (oradata) and then proceed again with the following steps.  I’m recommending the least destructive steps first!

Pull the Image and Create The 23ai Container

Pull the latest installation, which should now be successful and no longer tell you that you are already up to date:

% docker pull container-registry.oracle.com/database/free:latest

latest: Pulling from database/free

6d6e36f7c9fb: Pull complete 

21def9023b6f: Pull complete 

5e7b2cfeb7fa: Pull complete 

b4a24759beff: Pull complete 

78bba54e9814: Pull complete 

716b489ad5ad: Pull complete 

c23fd8c6cbee: Pull complete 

79dea26b3a5a: Pull complete 

5dfbcf799df3: Pull complete 

154719a62576: Pull complete 

Digest: sha256:83edd0756fda0e5faecc0fdf047814f0177d4224d7bf037e4900123ee3e08718

Status: Downloaded newer image for container-registry.oracle.com/database/free:latest

container-registry.oracle.com/database/free:latest

Create your new container:

docker run -d \

  --name ora23ai \

  -p 1522:1521 \

  --mount source=oradata,target=/opt/oracle/oradata \

  container-registry.oracle.com/database/free

Go ahead and login now:

% docker exec -it ora23ai sqlplus / as sysdba                               

SQL*Plus: Release 23.0.0.0.0 - Production on Wed May 8 19:03:47 2024

Version 23.4.0.24.05

Copyright (c) 1982, 2024, Oracle.  All rights reserved.

Connected to:

Oracle Database 23ai Free Release 23.0.0.0.0 - Develop, Learn, and Run for Free

Version 23.4.0.24.05

SQL> 

Score- Success.

If you do still run into the issue, perform the prune on everything that’s not connected to a container in docker for all images and prune the storage, then pull the latest image again.  

Happy Oracle 23ai day… 🙂

Kellyn

http://about.me/dbakevlar

One thought on “Oracle 23ai Free: Docker ORA-12547/Make File Issue

Comments are closed.