Compiled image with https://github.com/oracle/docker-images/tree/master/OracleDatabase, but the database does not start.
OS is RHEL 7.3 on AWS
Instance Type c3.8xlarge
Storage 1000 GB
Docker version is 17.03.1-ee-3 Build 3fcee33
docker run command generates the following output including error message.
[ec2-user@ip-172-30-2-25 ~]$ sudo docker run --name orclcdb \
> -p 1521:1521 -p 5500:5500 \
> -e ORACLE_SID=ORCLCDB \
> -e ORACLE_PDB=ORCLPDB1 \
> -e ORACLE_PWD=oracle \
> oracle/database:12.2.0.1-ee
33a3a5e469a8: Pull complete
212988691fe8: Pull complete
4542c5e3ea46: Pull complete
985c5fc42dff: Pull complete
de0d00c03d2d: Pull complete
9ca44aa383aa: Pull complete
Digest: sha256:6fef7c2a38aef2a8e447ebdd405c9964edec7945001f3692792fae7df810d3d1
ORACLE AUTO GENERATED PASSWORD FOR SYS, SYSTEM AND PDBAMIN: wlQln0MqTz0=1
LSNRCTL for Linux: Version 12.2.0.1.0 - Production on 20-APR-2017 16:30: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/4726052f9147/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 20-APR-2017 16:30: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/4726052f9147/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-04-20 16:30:59.409 UTC ] Copying database files
DBCA_PROGRESS : 1%
[ 2017-04-20 16:30:59.665 UTC ] ORA-12547: TNS:lost contact
DBCA_PROGRESS : 2%
[ 2017-04-20 16:30:59.868 UTC ] Error while cataloging RMAN Backups
[ 2017-04-20 16:30:59.957 UTC ] DBCA_PROGRESS : DBCA Operation failed.
SQL*Plus: Release 12.2.0.1.0 Production on Thu Apr 20 16:31:00 2017
Copyright (c) 1982, 2016, Oracle. All rights reserved.
ERROR:
ORA-12547: TNS:lost contact
Enter user-name: SP2-0306: Invalid option.
Usage: CONN[ECT] [{logon|/|proxy} [AS {SYSDBA|SYSOPER|SYSASM|SYSBACKUP|SYSDG|SYSKM|SYSRAC}] [edition=value]]
where <logon> ::= <username>[/<password>][@<connect_identifier>]
<proxy> ::= <proxyuser>[<username>][/<password>][@<connect_identifier>]
Enter user-name: SP2-0306: Invalid option.
Usage: CONN[ECT] [{logon|/|proxy} [AS {SYSDBA|SYSOPER|SYSASM|SYSBACKUP|SYSDG|SYSKM|SYSRAC}] [edition=value]]
where <logon> ::= <username>[/<password>][@<connect_identifier>]
<proxy> ::= <proxyuser>[<username>][/<password>][@<connect_identifier>]
SP2-0157: unable to CONNECT to ORACLE after 3 attempts, exiting SQL*Plus
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
/opt/oracle/cfgtoollogs/dbca/ORCLCDB/ORCLCDB.log is as follows:
[ 2017-04-20 16:30:59.409 UTC ] Copying database files
DBCA_PROGRESS : 1%
[ 2017-04-20 16:30:59.665 UTC ] ORA-12547: TNS:lost contact
DBCA_PROGRESS : 2%
[ 2017-04-20 16:30:59.868 UTC ] Error while cataloging RMAN Backups
[ 2017-04-20 16:30:59.957 UTC ] DBCA_PROGRESS : DBCA Operation failed.
~
docker info output:
[ec2-user@ip-172-30-2-25 ~]$ sudo docker info
Containers: 4
Running: 0
Paused: 0
Stopped: 4
Images: 4
Server Version: 17.03.1-ee-3
Storage Driver: overlay
Backing Filesystem: xfs
Supports d_type: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: bridge host macvlan null overlay
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 4ab9917febca54791c5f071a9d1f404867857fcc
runc version: 54296cf40ad8143b62dbcaa1d90e520a2136ddfe
init version: 949e6fa
Security Options:
seccomp
Profile: default
Kernel Version: 3.10.0-514.el7.x86_64
Operating System: Red Hat Enterprise Linux Server 7.3 (Maipo)
OSType: linux
Architecture: x86_64
CPUs: 32
Total Memory: 58.56 GiB
Name: ip-172-30-2-25.ec2.internal
ID: 7UWG:G34M:4V7Z:CJZR:CR52:624T:KNIF:DZ75:4UTW:ARCF:MEOZ:PEMC
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Username: dvohra
Registry: https://index.docker.io/v1/
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
[ec2-user@ip-172-30-2-25 ~]$
It seems like that it is the copying of the data files that crashes and causes the installation to abort. Looking at the output from docker info I can see that overlay is used as storage driver. There are some well known issues with the overlay storage driver. Please use overlay2 or btrfs instead and see whether you can reproduce the issue there.
Thanks @gvenzl. The issue is indicated as a known issue, but does not seem to be CentOS-specific as indicated in Known issues. Shall use overlay2 or btrfs.
For overlay2 storage driver kernel has to be 4.0, but is Kernel Version: 3.10.0-514.el7.x86_64 for RHEL 7.3.
For btrfs "wrong filesystem" on RHEL 7.3.
@dvohra you need to mount /var/lib/docker on a btrfs filesystem to use the btrfs storage driver. Docker will automatically use the driver if it detects this, in fact. If you're using XFS, you should switch to overlay2.
Thanks @Djelibeybi. Created a btrfs filesystem from a EBS volume device and mounted /var/lib/docker on the filesystem. docker info lists btrfs as Storage Driver. The docker run command generates same issue and error message as with overlay.
I missed the fact that this is on AWS with an EBS backend. I'm not sure we've ever tested this.
Is it possible to run Oracle Linux 7 on your EC2 instance with our 4.1.12 UEK4 kernel and test with the Oracle build of Docker (1.12.6) instead? That would at least get us to a known good platform combination.
The highest version supported on EC2 is Oracle Enterprise Linux 6.8. Would it be fine? Or Oracle Linux 7 is required?
RHEL 7 is listed as one of the two supported systems. The OS kernel not supporting overlay2and the btrfsnot fixing the issue, has RHEL 7 been tested?
_The highest version supported on EC2 is Oracle Enterprise Linux 6.8. Would it be fine? Or Oracle Linux 7 is required?_
"To install Docker EE, you need the 64-bit version of Oracle Linux 7.3 running the Red Hat Compatible kernel (RHCK) 3.10.0-514 or higher. Older versions of Oracle Linux are not supported."
When you go to launch your EC2 instance, search for OL7.3-x86_64-HVM. That's the AMI from Oracle for Oracle Linux 7. We're still working with Amazon to update our official images, but that's outside my sphere of influence.
Essentially, we don't know if the issue is RHEL and the overlay driver, or something to do with being on EC2/EBS. I'd like to get an OL7 image with UEK4 running, so we can start narrowing down the issue.
@gvenzl can you spin up an OL7 VM with RHCK (3.10) and enable the old overlay driver and see if you have the same problem outside of EC2?
_When you go to launch your EC2 instance, search for OL7.3-x86_64-HVM. That's the AMI from Oracle for Oracle Linux 7._
No such AMI OL7.3-x86_64-HVM
I can find it:

Thanks @Djelibeybi. In Community AMIs does get listed.
Hi @dvohra, is your issue still open or solved by now?
May close issue. Did not test further. Used a different Docker image phsalvisberg/oddgendemo-cdb which did not generate any issues for creating a CDB. Shall re-open issue if OL7.3-x86_64-HVM is tested with oracle/database:12.2.0.1-ee.
Hi @dvohra,
Please keep in mind we do not support images produced by 3rd-parties. Plus, these images (such as the one produced by @PhilippSalvisberg are non-compliant with the license agreement of commercial products, since redistribution of binaries on Docker Hub (or anywhere else) by these 3rd-parties is not allowed by the license agreement.
Thanks
The Dockerfile does not directly download Oracle database.
https://github.com/PhilippSalvisberg/docker-oddgendemo-cdb/blob/master/Dockerfile
Nor does the image setup script.
https://github.com/PhilippSalvisberg/docker-oddgendemo-cdb/blob/master/assets/image_setup.sh
Also refer "Note that there are plenty of Oracle images on the Docker Hub that conform to the license requirements by requiring the installation archives to be downloaded directly from OTN and then automate the installation of the product. You could absolutely rebuild your Dockerfile so that it looks for the install zip files locally and pushes them into the container. This is perfectly fine as the end-user would need to accept the OTN license when they download the RDBMS binaries."
https://community.oracle.com/thread/3629935?start=0
In the case of the image phsalvisberg/oracle12ee from @PhilippSalvisberg, the software is distributed on Docker Hub, and that is not compliant with the license. Pushing a Docker image to the Hub that contains Oracle software inside is no different than pushing a ZIP file to Dropbox and sharing that URL publicly to anyone.
If one does the docker build locally, where the download happens during build time, then that should be fine. But the resulting image shall not be published to a public repository for others to download.
Shall retest and update issue, as suggested with:
OL7.3-x86_64-HVM
oracle/database:12.2.0.1-ee
Docker 1.12.6
With Storage driver as overlay getting following exception.
[ec2-user@ip-172-30-4-4 ~]$ docker pull dvohra/oracle-db:12.2.0.1-ee
12.2.0.1-ee: Pulling from dvohra/oracle-db
33a3a5e469a8: Pull complete
212988691fe8: Extracting 3.452 GB/3.452 GB
4542c5e3ea46: Download complete
985c5fc42dff: Download complete
de0d00c03d2d: Download complete
9ca44aa383aa: Download complete
failed to register layer: ApplyLayer exit status 1 stdout: stderr: write /opt/oracle/install/linuxx64_12201_database.zip: no space left on device
dvohra/oracle-db is a private repo as publicly distributable repo is not in compliance with license requirements.
The docker info command generates the following output:
[ec2-user@ip-172-30-4-4 ~]$ docker info
Containers: 0
Running: 0
Paused: 0
Stopped: 0
Images: 0
Server Version: 1.12.6
Storage Driver: overlay
Backing Filesystem: extfs
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: null host bridge overlay
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Security Options: seccomp
Kernel Version: 4.1.12-94.2.1.el7uek.x86_64
Operating System: Oracle Linux Server 7.3
OSType: linux
Architecture: x86_64
CPUs: 32
Total Memory: 58.71 GiB
Name: ip-172-30-4-4
ID: KWY5:DCWZ:4V5C:GTKH:YOCI:74VL:ILQ5:UIX7:IKG3:U4FT:R6LA:XFL7
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Username: dvohra
Registry: https://index.docker.io/v1/
Insecure Registries:
127.0.0.0/8
You ran out of space inside the container: stderr: write /opt/oracle/install/linuxx64_12201_database.zip: no space left on device
Thanks @gvenzl. Not inside a Docker container as only the pull command is run, but on the root partition /dev/xvda1. Shall expand Linux partition /dev/xvda1 which lists only 15 GB with lsblk even though 1000 GB is available.
With Debian 7, Storage driver as aufs same error:
ERROR:
ORA-12547: TNS:lost contact
Enter user-name: SP2-0306: Invalid option.
Usage: CONN[ECT] [{logon|/|proxy} [AS {SYSDBA|SYSOPER|SYSASM|SYSBACKUP|SYSDG|SYSKM|SYSRAC}] [edition=value]]
where <logon> ::= <username>[/<password>][@<connect_identifier>]
<proxy> ::= <proxyuser>[<username>][/<password>][@<connect_identifier>]
Enter user-name: SP2-0306: Invalid option.
Usage: CONN[ECT] [{logon|/|proxy} [AS {SYSDBA|SYSOPER|SYSASM|SYSBACKUP|SYSDG|SYSKM|SYSRAC}] [edition=value]]
where <logon> ::= <username>[/<password>][@<connect_identifier>]
<proxy> ::= <proxyuser>[<username>][/<password>][@<connect_identifier>]
SP2-0157: unable to CONNECT to ORACLE after 3 attempts, exiting SQL*Plus
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
BTW, the following message should be displayed only if the installation is successful:
#########################
DATABASE IS READY TO USE!
#########################
The docker infocommand output is as follows.
dvohra10@instance-4:~$ sudo docker info
Containers: 2
Running: 0
Paused: 0
Stopped: 2
Images: 2
Server Version: 17.03.1-ce
Storage Driver: aufs
Root Dir: /var/lib/docker/aufs
Backing Filesystem: extfs
Dirs: 11
Dirperm1 Supported: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: bridge host macvlan null overlay
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 4ab9917febca54791c5f071a9d1f404867857fcc
runc version: 54296cf40ad8143b62dbcaa1d90e520a2136ddfe
init version: 949e6fa
Kernel Version: 3.16.0-4-amd64
Operating System: Debian GNU/Linux 8 (jessie)
OSType: linux
Architecture: x86_64
CPUs: 4
Total Memory: 14.72 GiB
Name: instance-4
ID: 7WP3:A46M:A7EN:PY7F:FMIT:GEXX:5PTE:G7QD:SKTY:2FZS:GCOX:23U4
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Username: dvohra
Registry: https://index.docker.io/v1/
WARNING: No memory limit support
WARNING: No swap limit support
WARNING: No kernel memory limit support
WARNING: No oom kill disable support
WARNING: No cpu cfs quota support
WARNING: No cpu cfs period support
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
Same issue with the following combination:
OS: Ubuntu 16.04
Storage driver: overlay
The docker info output is as follows.
sudo docker info
Containers: 1
Running: 0
Paused: 0
Stopped: 1
Images: 1
Server Version: 17.03.1-ce
Storage Driver: overlay
Backing Filesystem: extfs
Supports d_type: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: bridge host macvlan null overlay
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 4ab9917febca54791c5f071a9d1f404867857fcc
runc version: 54296cf40ad8143b62dbcaa1d90e520a2136ddfe
init version: 949e6fa
Security Options:
apparmor
seccomp
Profile: default
Kernel Version: 4.8.0-51-generic
Operating System: Ubuntu 16.04.2 LTS
OSType: linux
Architecture: x86_64
CPUs: 4
Total Memory: 14.69 GiB
Name: instance-5
ID: 3TV4:CR2L:JZ6U:M4EY:A3O2:TKV4:YBNP:PO6P:JPQ6:3723:SJCF:EPLF
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Username: dvohra
Registry: https://index.docker.io/v1/
WARNING: No swap limit support
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
Same issue with following combination:
OS: Ubuntu 16.04
Storage Driver: overlay2
Thanks @dvohra:
Regarding the database is ready to use message, we have already changed that in https://github.com/gvenzl/docker-images/commit/eb0b52a3e00b4b31b07659b8c371d0ba906aca52 but still undergoing some testing.
Debian 7, Storage driver as aufs: This is not the same error.
I missed the fact that this is on AWS with an EBS backend. I'm not sure we've ever tested this.
AWS with an EBS backend should be fine for btrfs, even though not tested. Seems like btrfs has the same issue as overlay.
Have not tested the combination, but is the only supported combination the following?
OS: OL7.3-x86_64-HVM
Storage Driver: overlay2
Debian 7, Storage driver as aufs: This is not the same error.
Same error as the initial post combination:
OS is RHEL 7.3 on AWS
Instance Type c3.8xlarge
Storage 1000 GB
Docker version is 17.03.1-ee-3 Build 3fcee33
The overlay storage driver on CentOS has proven to run into Docker bug #25409. We recommend using btrfs or overlay2 instead.
CentOS 7 does generate the same issue with overlay.
CentOS 7 kernel is 3.10 also, which does not support overlay2.
The overlay2 Storage driver also generates the same issue.
OS: CoreOS alpha
The docker infooutput is as follows.
sudo docker info
Containers: 1
Running: 0
Paused: 0
Stopped: 1
Images: 1
Server Version: 17.05.0-ce
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Native Overlay Diff: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: bridge host macvlan null overlay
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 9048e5e50717ea4497b757314bad98ea3763c145
runc version: 9c2d8d184e5da67c95d601382adf14862e4f2228
init version: v0.13.2 (expected: 949e6facb77383876aeff8a6944dde66b3089574)
Security Options:
seccomp
Profile: default
selinux
Kernel Version: 4.11.0-coreos
Operating System: Container Linux by CoreOS 1409.0.0 (Ladybug)
OSType: linux
Architecture: x86_64
CPUs: 1
Total Memory: 3.617GiB
Name: instance-8.c.oracledatabase12ccdb.internal
ID: 5G5J:ZTAR:MBLU:O5FJ:LQPH:OLLD:6T5Y:A47E:46TK:3PZ3:ZJRO:WP3C
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Username: dvohra
Registry: https://index.docker.io/v1/
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
Seems like the issue is not with the Storage driver or the OS, but with the Docker image; either with the Docker image source code or in the build. Shall make the Docker image dvohra/oracle-db:12.2.0.1-ee available for testing if required by the Docker image development team, presently uploaded to a private repo on Docker Hub.
Regarding the database is ready to use message, we have already changed that in gvenzl/docker-images@eb0b52a but still undergoing some testing.
The link is for OracleDatabase/dockerfiles/12.1.0.2 while the message is generated in 12.2.0.1. Or is the fix propogated to other Dockerfile versions?
If you scroll down you will see that the changes are also applied for 12.2.
Thanks @gvenzl. Which OS have been tested and on which Storage drivers? The documentation is ambiguous about support. The Support section mentions
Oracle Database in single instance configuration is supported for Oracle Linux 7 and Red Hat Enterprise Linux (RHEL) 7.
, but the Known Issues section mentions CentOS.
Known issues
The overlay storage driver on CentOS has proven to run into Docker bug #25409. We recommend using btrfs or overlay2 instead.
Is the issue a duplicate of https://github.com/oracle/docker-images/issues/307?
As the source code for the Docker image was updated 3-4 days ago, rebuilt Docker image. The issue is fixed in rebuilt image.
Hi @dvohra, we only test the image on OL 7 and RHEL 7 with btrfs as this is the recommended configuration. Are you saying that you believe that the fix introduced for #307 has also fixed your problem and that this was the same issue?
Are you saying that you believe that the fix introduced for #307 has also fixed your problem and that this was the same issue?
Yes.
Posted a tutorial on Docker image for CDB and PDBs.
https://www.toadworld.com/platforms/oracle/b/weblog/archive/2017/06/21/modularization-by-using-oracle-database-containers-and-pdbs-on-docker-engine
@brunoborges Is a Oracle Database image on Docker store valid? Or is the Docker image non-distributable?
https://store.docker.com/images/oracle-database-enterprise-edition
@dvohra I'm not sure the two questions are related. The Oracle Database image on Docker Store is valid, but it is non-distributable because it contains Oracle proprietary software that requires license acceptance.
@Djelibeybi The follow up question is related to @brunoborges's reply :
Please keep in mind we do not support images produced by 3rd-parties. Plus, these images (such as the one produced by @PhilippSalvisberg are non-compliant with the license agreement of commercial products, since redistribution of binaries on Docker Hub (or anywhere else) by these 3rd-parties is not allowed by the license agreement.
Docker Store is a third-party. And, thanks for the clarification.
@dvohra the image on the Docker Store is being distributed by Oracle and you have to agree to our terms before you can pull it. Those terms do not permit you to distribute the image to anyone else.
Is the Docker image the same as https://github.com/oracle/docker-images/tree/master/OracleDatabase,
If different, why is the other image not distributed and has to be built?
They are not the same image. The image on GitHub is designed to be as flexible as possible, while the image on the Docker Store is designed to be used in development and test environments.
If you want to discuss this further, please open a new issue instead of posting in a closed one.
Thanks for the clarification.