A server room with lots of cables running into hardware. It looks very messy.

How to fix containerized Oracle 23ai Database not starting on Mac

When trying out the Free Oracle 23ai Database Docker Image I always encountered the same issue. The database wouldn't start. Here is how I fixed it.

TL;DR

Make sure your containerization VM (podman, colima, etc.) is allowed to use more than 2GB of memory. Check the end of the blog post for the commands to increase the memory limit.

The Problem

I was very enthusiastic when Oracle announced that 23ai now has an ARM image. As an M3 Mac user, I can finally run an up-to-date Oracle database on my machine without a throttling translation layer.

As Oracle and Gerald Venzl offer a dockerized DB image, I thought I would be able to spin up a DB in no time. So, quickly start up colima (the Docker-compatible containerization VM of my choice) and copy and paste the following command:

1docker run --name orcl23ai-free -d \
2    -p 1521:1521 \
3    -e ORACLE_PASSWORD=SuperSecret1 \
4    -e APP_USER=appuser \
5    -e APP_USER_PASSWORD=SuperSecret2 \
6    gvenzl/oracle-free:23.5-slim-faststart
7

In only a few seconds, I would be able to connect to my new database. But instead I was greeted with the following error message:

1CONTAINER: starting up...
2CONTAINER: first database startup, initializing...
3CONTAINER: starting up Oracle Database...
4
5LSNRCTL for Linux: Version 23.0.0.0.0 - Production on 07-NOV-2024 14:44:04
6
7Copyright (c) 1991, 2024, Oracle.  All rights reserved.
8
9(...)
10
11Listening Endpoints Summary...
12  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC_FOR_FREE)))
13  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=0.0.0.0)(PORT=1521)))
14The listener supports no services
15The command completed successfully
16ORA-03113: end-of-file on communication channel
17

ORA-03113

What does this error message mean? Googling it gave me no clear answer. Instead, I looked up GitHub issues in Gerald’s repository. There were no issues related to that ORA, but for other stuff, people posted their log files.

I thought this would be a great starting point to dig deeper and copied all the log files from the container to my host:

1docker cp orcl23ai-free:/opt/oracle/diag/rdbms/free/FREE/trace ./trace_files
2

The alert_FREE.log file is the most interesting one. It contains the following error message:

1(...)
2Oracle instance running with ODM in SGA: Oracle File Server ODM Library, Version: 1.0
3Oracle instance running with ODM in SGA: Object Store ODM Library Version 8.0
4Broadcast on commit is enabled and is using Message mode.
52024-11-07T14:44:05.778383+00:00
6Errors in file /opt/oracle/diag/rdbms/free/FREE/trace/FREE_vktm_37.trc  (incident=41) (PDBNAME=CDB$ROOT):
7ORA-00800: soft external error, arguments: [Set Priority Failed], [VKTM], [Check traces and OS configuration], [Check Oracle document and MOS notes], []
8Incident details in: /opt/oracle/diag/rdbms/free/FREE/incident/incdir_41/FREE_vktm_37_i41.trc
9--ATTENTION--
10The priority of process VKTM cannot be elevated.
11
12Failed to elevate VKTM's priority from 0 to 1, policy 5
13Error : Category(-2), Opname(skgdism_create), Loc(sp.c:setpr:1), ErrMsg(Error 0) Dism(16)
14Using default pga_aggregate_limit of 2048 MB
152024-11-07T14:44:05.893920+00:00
16Errors in file /opt/oracle/diag/rdbms/free/FREE/trace/FREE_lgwr_75.trc  (incident=161) (PDBNAME=CDB$ROOT):
17ORA-00800: soft external error, arguments: [Set Priority Failed], [LGWR], [Check traces and OS configuration], [Check Oracle document and MOS notes], []
18Incident details in: /opt/oracle/diag/rdbms/free/FREE/incident/incdir_161/FREE_lgwr_75_i161.trc
19--ATTENTION--
20The priority of process LGWR cannot be elevated.
21
22Failed to elevate LGWR's priority from 0 to 1, policy 5
23Error : Category(-2), Opname(skgdism_create), Loc(sp.c:setpr:1), ErrMsg(Error 0) Dism(16)
24starting up 1 dispatcher(s) for network address '(ADDRESS=(PARTIAL=YES)(PROTOCOL=TCP))'...
25Warning: Shared server clients will not be able to connect because SHARED_SERVERS is 0
26(...)
27

Set priority failed? I know that from my daily life, but as a person who is afraid of compiling any C code, this was not very insightful to me.

The log refers to another trace file with the name FREE_vktm_37.trc. Let’s take a look at that file:

1(...)
2*** 2024-11-07T14:44:05.743073+00:00 (CDB$ROOT(1))
32024-11-07 14:44:05.742932 : fsd_notify_cb: FsDirect not implemented
4WARNING: Failed to disable OOMK
52024-11-07T14:44:05.778558+00:00
6Incident 41 created, dump file: /opt/oracle/diag/rdbms/free/FREE/incident/incdir_41/FREE_vktm_37_i41.trc
7ORA-00800: soft external error, arguments: [Set Priority Failed], [VKTM], [Check traces and OS configuration], [Check Oracle document and MOS notes], []
8(...)
9

What the hell is FsDirect? And there is a link to another trace file. This one is much longer, and I will spare you the details. It was also not helpful to me.

Let’s try podman

You know what? Maybe my colima is just incompatible, or I messed something up. So let’s just download and try it with podman. At least the Oracle container repo lists podman as the default containerization tool.

Long story short, the same error message greeted me with podman too.

Okay, I guess my machine is cursed. Containers are the tool to make software run on any machine, and as it clearly works for others, my machine must be the problem.

In the depths of the internet, there is always a solution

My last hope was to open an issue on the GitHub repository, but before that, I googled a little bit deeper. Somehow I stumbled upon a GitHub issue by davidg251 with the title “Unable to start container”.

He had an entirely different error message, but he was able to resolve the issue by removing the 2GB memory limit from his container.

Wait a minute. Do I have memory limitations too?

Some solutions are simple

1> colima list
2PROFILE    STATUS     ARCH       CPUS    MEMORY    DISK     RUNTIME    ADDRESS
3default    Stopped    aarch64    2       2GiB      60GiB
4

Damn it! Let’s increase that:

1colima start --memory 4
2

And now the database starts up without any issues…

Why didn’t podman work? Well, it turns out the default machine limitations are also 2GB.

1> podman machine list
2NAME                     VM TYPE     CREATED         LAST UP     CPUS        MEMORY      DISK SIZE
3podman-machine-default*  applehv     51 seconds ago  Never       6           2GiB        100GiB
4

This should do the trick for podman:

1podman machine set --memory 4096
2

Conclusion

I guess it makes sense that a feature-rich database like Oracle needs more than 2GB of memory to start up. I would have appreciated a more meaningful error message, but I’m glad I found the solution.

Furthermore, I hope the search engines and LLMs will pick up this blog post so that others can find the solution more easily.

Edit: Chris Hoina made me aware that he ran into the same issues. He actually has a blog post on it too. He also said that the container team will add a note to the repository.