I've been trying to create the Oracle 12.2.0.1 container with no success. I made some small changes to make it easier to debug. One I noticed that during db creation it was failing because it wanted an sga_target larger than ~2500M, so I just made it 3000M. I also added the vim package so I could modify files and make it easier to make changes within the container.
A SIDE NOTE: I've been able to successfully install the Oracle Database XE container.
For my Oracle 12.2.0.1, my docker run looks like:
docker run --privileged --name oracle -p 9000:1521 -p 9001:5500 -e ORACLE_SID=ORCLCDB -e ORACLE_PID=ORCLPDB1 -e ORACLE_CHARACTERSET=AL32UTF8 -v /var/oracle:/opt/oracle/oradata oracle/database:12.2.0.1-ee
My /var/oracle is an ext4 filesystem, with permissions oracle as the user and dba as the group permission.
Permissions on the /var/oracle directory:
drwxr-xr-x. 6 oracle dba 4096 Mar 7 11:04 oracle
The error I'm seeing is below. My guess is it has something to do with the LISTENER and its not liking that its not set? I tried changing the dbca template to say the name was LISTENER but it wasn't happy with that either. Any guidance would be appreciated.
Thanks,
Roger
ERROR BELOW:
LSNRCTL for Linux: Version 12.2.0.1.0 - Production on 07-MAR-2017 16:03:58
Copyright (c) 1991, 2016, Oracle. All rights reserved.
Starting /opt/oracle/product/12.2.0.1/dbhome_1/bin/tnslsnr: please wait...
TNSLSNR for Linux: Version 12.2.0.1.0 - Production
System parameter file is /opt/oracle/product/12.2.0.1/dbhome_1/network/admin/listener.ora
Log messages written to /opt/oracle/diag/tnslsnr/2b276472afdf/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=0.0.0.0)(PORT=1521)))
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 12.2.0.1.0 - Production
Start Date 07-MAR-2017 16:03:59
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /opt/oracle/product/12.2.0.1/dbhome_1/network/admin/listener.ora
Listener Log File /opt/oracle/diag/tnslsnr/2b276472afdf/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=0.0.0.0)(PORT=1521)))
The listener supports no services
The command completed successfully
**[WARNING] [DBT-10102] The listener configuration is not selected for the database. EM DB Express URL will not be accessible.
CAUSE: The database should be registered with a listener in order to access the EM DB Express URL.
ACTION: Select a listener to be registered or created with the database.**
Copying database files
1% complete
2% complete
**DBCA Operation failed.**
Look at the log file "/opt/oracle/cfgtoollogs/dbca/ORCLCDB/ORCLCDB.log" for further details.
[ 2017-03-07 16:04:06.230 UTC ] Copying database files
DBCA_PROGRESS : 1%
[ 2017-03-07 16:04:08.027 UTC ] ORA-01078: failure in processing system parameters
DBCA_PROGRESS : 2%
[ 2017-03-07 16:04:08.028 UTC ] ORA-01034: ORACLE not available
[ 2017-03-07 16:04:08.029 UTC ] ORA-01034: ORACLE not available
[ 2017-03-07 16:04:13.185 UTC ] DBCA_PROGRESS : DBCA Operation failed.
SQL*Plus: Release 12.2.0.1.0 Production on Tue Mar 7 16:04:13 2017
Copyright (c) 1982, 2016, Oracle. All rights reserved.
Connected to an idle instance.
SQL> ALTER SYSTEM SET control_files='/opt/oracle/oradata/ORCLCDB/control01.ctl' scope=spfile
*
ERROR at line 1:
ORA-01034: ORACLE not available
Process ID: 0
Session ID: 0 Serial number: 0
SQL> ALTER PLUGGABLE DATABASE ORCLPDB1 SAVE STATE
*
ERROR at line 1:
ORA-01034: ORACLE not available
Process ID: 0
Session ID: 0 Serial number: 0
SQL> Disconnected
mv: cannot stat '/opt/oracle/product/12.2.0.1/dbhome_1/dbs/spfileORCLCDB.ora': No such file or directory
mv: cannot stat '/opt/oracle/product/12.2.0.1/dbhome_1/dbs/orapwORCLCDB': No such file or directory
#########################
DATABASE IS READY TO USE!
#########################
tail: cannot open '/opt/oracle/diag/rdbms/*/*/trace/alert*.log' for reading: No such file or directory
tail: no files remaining
**cat /opt/oracle/cfgtoollogs/dbca/ORCLCDB/ORCLCDB.log**
[ 2017-03-07 16:04:06.230 UTC ] Copying database files
DBCA_PROGRESS : 1%
[ 2017-03-07 16:04:08.027 UTC ] ORA-01078: failure in processing system parameters
DBCA_PROGRESS : 2%
[ 2017-03-07 16:04:08.028 UTC ] ORA-01034: ORACLE not available
[ 2017-03-07 16:04:08.029 UTC ] ORA-01034: ORACLE not available
[ 2017-03-07 16:04:13.185 UTC ] DBCA_PROGRESS : DBCA Operation failed.
I've updated your post to improve the formatting.
The error [ 2017-03-07 16:04:08.027 UTC ] ORA-01078: failure in processing system parameters suggests that there is a corruption with the dbca.rsp file. In general, changes such as SGA_TARGET, etc, should now be one during initial database build but once the database is up and running. The database parameter, just like the data files themselves are persisted in the data volume. There is also no need for the --privileged Docker parameter for Oracle Database containers.
Can you please share the initial log file without any changes made to the image/container.
@gvenzl
Decided on rebuilding the image without my changes, so I can post what my initial error was when I attempted to run the container.
What I did to get to this step:
1) Created an oracle user and group dba and oinstall on OS
id oracle
uid=500(oracle) gid=500(dba) groups=500(dba),501(oinstall)
2) Created an ext4 filesystem on my /dev/sdb2 mounted it on /var/oracle
/dev/sdb2 on /var/oracle type ext4 (rw,relatime,seclabel,data=ordered)
3) Permissions of my /var/oracle
drwxr-xr-x. 5 oracle dba 4096 Mar 7 17:02 oracle
4) Git clone this repository
5) Within the docker-images/OracleDatabase/dockerfiles/12.2.0.1 directory placed: linuxx64_12201_database.zip
6) Create the build image
./buildDockerImage.sh -v 12.2.0.1 -e
7) Run it
docker run --name oracle -p 1521:1521 -p 5500:5500 -e ORACLE_SID=ORCLCDB -e ORACLE_PID=ORCLPDB1 -e ORACLE_CHARACTERSET=AL32UTF8 -v /var/oracle:/opt/oracle/oradata oracle/database:12.2.0.1-ee
Key parts in the output from what I'm seeing:
[WARNING] [DBT-10102] The listener configuration is not selected for the database. EM DB Express URL will not be accessible.
CAUSE: The database should be registered with a listener in order to access the EM DB Express URL.
ACTION: Select a listener to be registered or created with the database.
[ 2017-03-07 22:02:03.223 UTC ] ORA-00821: Specified value of sga_target 1536M is too small, needs to be at least 2720M
OUTPUT
ORACLE AUTO GENERATED PASSWORD FOR SYS, SYSTEM AND PDBAMIN: zB8YejNQ60o=1
LSNRCTL for Linux: Version 12.2.0.1.0 - Production on 07-MAR-2017 22:01:54
Copyright (c) 1991, 2016, Oracle. All rights reserved.
Starting /opt/oracle/product/12.2.0.1/dbhome_1/bin/tnslsnr: please wait...
TNSLSNR for Linux: Version 12.2.0.1.0 - Production
System parameter file is /opt/oracle/product/12.2.0.1/dbhome_1/network/admin/listener.ora
Log messages written to /opt/oracle/diag/tnslsnr/b45ac51a743e/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=0.0.0.0)(PORT=1521)))
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 12.2.0.1.0 - Production
Start Date 07-MAR-2017 22:01:54
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /opt/oracle/product/12.2.0.1/dbhome_1/network/admin/listener.ora
Listener Log File /opt/oracle/diag/tnslsnr/b45ac51a743e/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=0.0.0.0)(PORT=1521)))
The listener supports no services
The command completed successfully
[WARNING] [DBT-10102] The listener configuration is not selected for the database. EM DB Express URL will not be accessible.
CAUSE: The database should be registered with a listener in order to access the EM DB Express URL.
ACTION: Select a listener to be registered or created with the database.
Copying database files
1% complete
2% complete
DBCA Operation failed.
Look at the log file "/opt/oracle/cfgtoollogs/dbca/ORCLCDB/ORCLCDB.log" for further details.
[ 2017-03-07 22:02:01.392 UTC ] Copying database files
DBCA_PROGRESS : 1%
[ 2017-03-07 22:02:03.223 UTC ] ORA-00821: Specified value of sga_target 1536M is too small, needs to be at least 2720M
ORA-01078: failure in processing system parameters
DBCA_PROGRESS : 2%
[ 2017-03-07 22:02:03.224 UTC ] ORA-01034: ORACLE not available
[ 2017-03-07 22:02:03.226 UTC ] ORA-01034: ORACLE not available
[ 2017-03-07 22:02:08.369 UTC ] DBCA_PROGRESS : DBCA Operation failed.
SQL*Plus: Release 12.2.0.1.0 Production on Tue Mar 7 22:02:08 2017
Copyright (c) 1982, 2016, Oracle. All rights reserved.
Connected to an idle instance.
SQL> ALTER SYSTEM SET control_files='/opt/oracle/oradata/ORCLCDB/control01.ctl' scope=spfile
*
ERROR at line 1:
ORA-01034: ORACLE not available
Process ID: 0
Session ID: 0 Serial number: 0
SQL> ALTER PLUGGABLE DATABASE ORCLPDB1 SAVE STATE
*
ERROR at line 1:
ORA-01034: ORACLE not available
Process ID: 0
Session ID: 0 Serial number: 0
SQL> Disconnected
mv: cannot stat '/opt/oracle/product/12.2.0.1/dbhome_1/dbs/spfileORCLCDB.ora': No such file or directory
mv: cannot stat '/opt/oracle/product/12.2.0.1/dbhome_1/dbs/orapwORCLCDB': No such file or directory
#########################
DATABASE IS READY TO USE!
#########################
tail: cannot open '/opt/oracle/diag/rdbms/*/*/trace/alert*.log' for reading: No such file or directory
tail: no files remaining
-bash-4.2#
Hi @rlopez133, unfortunately the error needs some more drilling into. It is strange that the installer thinks that there isn't enough memory available. Can you please upload the trace*.log file from /opt/oracle/cfgtoollogs/dbca/ORCLCDB?
Thx and have a great weekend!
hi, i had the same problem while running second container on windows 10, oracle ee. Resolved by increasing Docker memory:
@vatless I'll try that tomorrow and respond here with what I find.
@gvenzl - the log you requested: https://gist.github.com/anonymous/59e3985c2a1938dbf96b13d0d6965ecc
Thank you very much @rlopez133 I have sent it on to the Installer folks to get some more information on why this is failing on your env.
@vatless can you provide more info on the "add more memory to docker" part? When I do a docker info my system has 125 gb of total memory avail.
@rlopez133 yes, i meant that one which was set to 2 GB by default. Seems you have no memory shortage issue at os level.
In logs: ORA-00821: Specified value of sga_target 1536M ... may indicate that oracle sga target is being affected by oracle granule size. I would suggest following solutions:
Hope it helps...
Hi @rlopez133, can you please share the output of docker info too? Turns out that we have some default checks based on the amount of system resources available to the database. The memory requirements are calculated based on those. Interesting would be to see how many CPUs for example you have available within your Docker container.
Hi @gvenzl ,
I am facing the same issue while trying to create contianer
Copying database files
1% complete
2% complete
DBCA Operation failed.
Look at the log file "/opt/oracle/cfgtoollogs/dbca/ORCLCDB/ORCLCDB.log" for further details.
[ 2017-04-20 16:19:31.933 UTC ] Copying database files
DBCA_PROGRESS : 1%
[ 2017-04-20 16:19:34.476 UTC ] ORA-00821: Specified value of sga_target 1536M is too small, needs to be at least 1936M
ORA-01078: failure in processing system parameters
DBCA_PROGRESS : 2%
[ 2017-04-20 16:19:34.477 UTC ] ORA-01034: ORACLE not available
[ 2017-04-20 16:19:34.479 UTC ] ORA-01034: ORACLE not available
[ 2017-04-20 16:19:39.650 UTC ] DBCA_PROGRESS : DBCA Operation failed.
SQL*Plus: Release 12.2.0.1.0 Production on Thu Apr 20 16:19:40 2017
Copyright (c) 1982, 2016, Oracle. All rights reserved.
Connected to an idle instance.
SQL> ALTER SYSTEM SET control_files='/opt/oracle/oradata/ORCLCDB/control01.ctl' scope=spfile
*
ERROR at line 1:
ORA-01034: ORACLE not available
Process ID: 0
Session ID: 0 Serial number: 0
SQL> ALTER PLUGGABLE DATABASE ORCLPDB1 SAVE STATE
*
ERROR at line 1:
ORA-01034: ORACLE not available
Process ID: 0
Session ID: 0 Serial number: 0
SQL> Disconnected
mv: cannot stat '/opt/oracle/product/12.2.0.1/dbhome_1/dbs/spfileORCLCDB.ora': No such file or directory
mv: cannot stat '/opt/oracle/product/12.2.0.1/dbhome_1/dbs/orapwORCLCDB': No such file or directory
DATABASE IS READY TO USE!
tail: cannot open '/opt/oracle/diag/rdbms///trace/alert*.log' for reading: No such file or directory
tail: no files remaining
Output of docker info
docker info
Containers: 55
Running: 32
Paused: 0
Stopped: 23
Images: 182
Server Version: 1.12.3
Storage Driver: devicemapper
Pool Name: docker-251:0-212074500-pool
Pool Blocksize: 65.54 kB
Base Device Size: 214.7 GB
Backing Filesystem: ext4
Data file: /dev/loop0
Metadata file: /dev/loop1
Data Space Used: 1.595 TB
Data Space Total: 2.683 TB
Data Space Available: 1.089 TB
Metadata Space Used: 830.2 MB
Metadata Space Total: 2.147 GB
Metadata Space Available: 1.317 GB
Thin Pool Minimum Free Space: 268.3 GB
Udev Sync Supported: true
Deferred Removal Enabled: false
Deferred Deletion Enabled: false
Deferred Deleted Device Count: 0
Data loop file: /scratch/docker_data/devicemapper/devicemapper/data
WARNING: Usage of loopback devices is strongly discouraged for production use. Use --storage-opt dm.thinpooldev to specify a custom block storage device.
Metadata loop file: /scratch/docker_data/devicemapper/devicemapper/metadata
Library Version: 1.02.117-RHEL6 (2016-08-15)
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: null overlay bridge host
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Security Options:
Kernel Version: 4.1.12-61.1.19.el6uek.x86_64
Operating System: Oracle Linux Server 6.7
OSType: linux
Architecture: x86_64
CPUs: 24
Total Memory: 141.4 GiB
Name: slcag837
ID: VKTF:HRSF:MHGA:EUKW:C6F6:WJNC:JSTM:X7NF:ORHQ:RBL7:HHNU:6WDW
Docker Root Dir: /scratch/docker_data
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Insecure Registries:
saasqa.docker.oraclecorp.com
127.0.0.0/8
Also @rlopez133 :+1:
Can you please let me know how to do the below
Decrease Docker memory/cpu limits, or
increase totalMemory parameter in template file as 75% of a new value tops 2720M (> 4760M i guess)
The image now detects how big the machine is and uses default memory allocation on bigger environments.
Hi @gvenzl ,
I am facing the same issue while trying to create contianerCopying database files
1% complete
2% complete
DBCA Operation failed.
Look at the log file "/opt/oracle/cfgtoollogs/dbca/ORCLCDB/ORCLCDB.log" for further details.
[ 2017-04-20 16:19:31.933 UTC ] Copying database files
DBCA_PROGRESS : 1%
[ 2017-04-20 16:19:34.476 UTC ] ORA-00821: Specified value of sga_target 1536M is too small, needs to be at least 1936M
ORA-01078: failure in processing system parametersDBCA_PROGRESS : 2%
[ 2017-04-20 16:19:34.477 UTC ] ORA-01034: ORACLE not available[ 2017-04-20 16:19:34.479 UTC ] ORA-01034: ORACLE not available
[ 2017-04-20 16:19:39.650 UTC ] DBCA_PROGRESS : DBCA Operation failed.
SQL*Plus: Release 12.2.0.1.0 Production on Thu Apr 20 16:19:40 2017
Copyright (c) 1982, 2016, Oracle. All rights reserved.
Connected to an idle instance.
SQL> ALTER SYSTEM SET control_files='/opt/oracle/oradata/ORCLCDB/control01.ctl' scope=spfile
*
ERROR at line 1:
ORA-01034: ORACLE not available
Process ID: 0
Session ID: 0 Serial number: 0SQL> ALTER PLUGGABLE DATABASE ORCLPDB1 SAVE STATE
*
ERROR at line 1:
ORA-01034: ORACLE not available
Process ID: 0
Session ID: 0 Serial number: 0SQL> Disconnected
mv: cannot stat '/opt/oracle/product/12.2.0.1/dbhome_1/dbs/spfileORCLCDB.ora': No such file or directory
mv: cannot stat '/opt/oracle/product/12.2.0.1/dbhome_1/dbs/orapwORCLCDB': No such file or directory#
DATABASE IS READY TO USE!
#
tail: cannot open '/opt/oracle/diag/rdbms/_/_/trace/alert*.log' for reading: No such file or directory
tail: no files remainingOutput of docker info
docker info
Containers: 55
Running: 32
Paused: 0
Stopped: 23
Images: 182
Server Version: 1.12.3
Storage Driver: devicemapper
Pool Name: docker-251:0-212074500-pool
Pool Blocksize: 65.54 kB
Base Device Size: 214.7 GB
Backing Filesystem: ext4
Data file: /dev/loop0
Metadata file: /dev/loop1
Data Space Used: 1.595 TB
Data Space Total: 2.683 TB
Data Space Available: 1.089 TB
Metadata Space Used: 830.2 MB
Metadata Space Total: 2.147 GB
Metadata Space Available: 1.317 GB
Thin Pool Minimum Free Space: 268.3 GB
Udev Sync Supported: true
Deferred Removal Enabled: false
Deferred Deletion Enabled: false
Deferred Deleted Device Count: 0
Data loop file: /scratch/docker_data/devicemapper/devicemapper/data
WARNING: Usage of loopback devices is strongly discouraged for production use. Use--storage-opt dm.thinpooldevto specify a custom block storage device.
Metadata loop file: /scratch/docker_data/devicemapper/devicemapper/metadata
Library Version: 1.02.117-RHEL6 (2016-08-15)
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: null overlay bridge host
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Security Options:
Kernel Version: 4.1.12-61.1.19.el6uek.x86_64
Operating System: Oracle Linux Server 6.7
OSType: linux
Architecture: x86_64
CPUs: 24
Total Memory: 141.4 GiB
Name: slcag837
ID: VKTF:HRSF:MHGA:EUKW:C6F6:WJNC:JSTM:X7NF:ORHQ:RBL7:HHNU:6WDW
Docker Root Dir: /scratch/docker_data
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Insecure Registries:
saasqa.docker.oraclecorp.com
127.0.0.0/8Also @rlopez133 馃憤
Can you please let me know how to do the below
Decrease Docker memory/cpu limits, or
increase totalMemory parameter in template file as 75% of a new value tops 2720M (> 4760M i guess)
Reinstall the docker and initiate the oracle setup from scratch, This worked for me! (Workarround)
hi, i had the same problem while running second container on windows 10, oracle ee. Resolved by increasing Docker memory:
- Stop container1, 2. add more memory to Docker (4gb, was 2gb). 3. run container2 - success, 4. start container1 - success. Thanks for great upload.
Worked for me! Thank you!
Most helpful comment
hi, i had the same problem while running second container on windows 10, oracle ee. Resolved by increasing Docker memory: