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

DB oracle error [FATAL] ORA-03114: not connected to ORACLE

Open skmar2 opened this issue 1 year ago • 8 comments

I am using Mac M2 and getting below error while running the docker image. 2024-04-11 09:53:45 Specify a password to be used for database accounts. Oracle recommends that the password entered should be at least 8 characters in length, contain at least 1 uppercase character, 1 lower case character and 1 digit [0-9]. Note that the same password will be used for SYS, SYSTEM and PDBADMIN accounts: 2024-04-11 09:53:45 Confirm the password: 2024-04-11 09:53:45 Configuring Oracle Listener. 2024-04-11 09:53:48 Listener configuration succeeded. 2024-04-11 09:53:48 Configuring Oracle Database XE. 2024-04-11 09:53:59 Enter SYS user password: 2024-04-11 09:53:59************* 2024-04-11 09:53:59 Enter SYSTEM user password: 2024-04-11 09:53:59*********** 2024-04-11 09:53:59 Enter PDBADMIN User Password: 2024-04-11 09:53:59 ************** 2024-04-11 09:53:59 Prepare for db operation 2024-04-11 09:53:59 7% complete 2024-04-11 09:53:59 Copying database files 2024-04-11 09:54:07 8% complete 2024-04-11 09:54:07 [WARNING] ORA-03113: end-of-file on communication channel 2024-04-11 09:54:07 2024-04-11 09:54:07 9% complete 2024-04-11 09:54:07 [FATAL] ORA-03114: not connected to ORACLE 2024-04-11 09:54:07 2024-04-11 09:54:07 29% complete 2024-04-11 09:54:07 100% complete 2024-04-11 09:54:07 [FATAL] ORA-03114: not connected to ORACLE 2024-04-11 09:54:07 2024-04-11 09:54:09 7% complete 2024-04-11 09:54:09 0% complete 2024-04-11 09:54:09 Look at the log file "/opt/oracle/cfgtoollogs/dbca/XE/XE.log" for further details. 2024-04-11 09:54:09 2024-04-11 09:54:09 Database configuration failed. Check logs under '/opt/oracle/cfgtoollogs/dbca'. 2024-04-11 09:54:09 2024-04-11 09:54:09 Executing user defined scripts

Anyone can help here?

skmar2 avatar Apr 11 '24 08:04 skmar2

@skmar2 I assume you are trying XE which is not supported on Mac M2. However you can get Oracle Free working following the instructions here

https://github.com/oracle/docker-images/blob/main/OracleDatabase/SingleInstance/FAQ.md#running-oracle-database-23c-free-on-apple-silicon-arm-chip

yunus-qureshi avatar Apr 12 '24 09:04 yunus-qureshi

Can I use docker instead of podman?

skmar2 avatar Apr 12 '24 10:04 skmar2

Yes, docker should also work with Lima/Colima though we haven't tested it. Basically you need a cross architecture virtualisation that Lima provides since XE/Free images are amd64 based and not arm64 used in Mac M2

yunus-qureshi avatar Apr 12 '24 15:04 yunus-qureshi

Now I am getting the below error.... setup % docker run --name oracle-db
-p 1575:1521
-e ORACLE_PWD=deralf241
-e ORACLE_CHARACTERSET=AL32UTF8
-v /Users/skumar/IdeaProjects/der/implementierung/der-reactor/docker/oracle-db/volumes/scripts/setup:/opt/oracle/oradata
container-registry.oracle.com/database/free:latest Specify a password to be used for database accounts. Oracle recommends that the password entered should be at least 8 characters in length, contain at least 1 uppercase character, 1 lower case character and 1 digit [0-9]. Note that the same password will be used for SYS, SYSTEM and PDBADMIN accounts: Confirm the password: Configuring Oracle Listener. Listener configuration succeeded. Configuring Oracle Database FREE. Enter SYS user password:


Enter SYSTEM user password:


Enter PDBADMIN User Password:


Prepare for db operation Cannot create directory "/opt/oracle/oradata/FREE". 7% complete 100% complete [FATAL] Prepare Operation has failed. 0% complete Look at the log file "/opt/oracle/cfgtoollogs/dbca/FREE/FREE.log" for further details.

skmar2 avatar Apr 12 '24 18:04 skmar2

@skmar2 it looks like the error is caused by this line:

-v /Users/skumar/IdeaProjects/der/implementierung/der-reactor/docker/oracle-db/volumes/scripts/setup:/opt/oracle/oradata

The log output indicates that the database creation process could not add a directory under /opt/oracle/oradata. You should confirm that the directory exists and that your user can create files there. The path looks odd to me—is this under the default Volume directory on your machine, created by Docker? If so, try setting the volume to a different path, or try calling docker run without the -v option to confirm everything else is working as expected.

oraclesean avatar Apr 15 '24 11:04 oraclesean

I updated the exposed volume path and it worked. docker run --name oracle-db
-p 1575:1521
-e ORACLE_PWD=deralf241
-e ORACLE_CHARACTERSET=AL32UTF8
-v /Users/skumar/IdeaProjects/der/implementierung/der-reactor/docker/oracle-db/volumes/scripts/setup:/opt/oracle/scripts/startup
container-registry.oracle.com/database/free:latest

But now I am getting this error [FATAL] [DBT-10330] Container database (CDB) creation option is not selected. CAUSE: You have specified the database template (FREE Database) which represents container database (CDB) information. But, you have not selected to create container database (CDB). Only container database (CDB) can be created using this template. ACTION: Select container database (CDB) creation option. Alternatively specify different database template [FATAL] [DBT-10333] Container database (CDB) creation option is not selected. CAUSE: Non-CDB creation is not supported. ACTION: Make sure container database (CDB) option is selected.

skmar2 avatar Apr 17 '24 10:04 skmar2

@skmar2 I just ran this successfully (OEL 8.8, Docker 24.0.6). Will you please try running this same command without assigning the volume?

docker run --name oracle-db
-p 1575:1521
-e ORACLE_PWD=deralf241
-e ORACLE_CHARACTERSET=AL32UTF8
container-registry.oracle.com/database/free:latest

I suspect there's a script in the entrypoint directory that's attempting to do something that's causing the error.

If it still fails without the entrypoint, please share the full output of the docker run command and the results of running docker info?

oraclesean avatar Apr 17 '24 11:04 oraclesean

same problem

qingzhu521 avatar Jun 16 '24 11:06 qingzhu521