oracle / docker-images

Official source of container configurations, images, and examples for Oracle products and projects
https://developer.oracle.com/use-cases/#containers
Universal Permissive License v1.0
6.51k stars 5.41k forks source link

Oracle Database 12c EE -ORA-48122: error with opening the ADR block file #241

Closed chiroito closed 7 years ago

chiroito commented 7 years ago

I ran Oracle Database image as following command. However error that DB instance could not create ADR file has happened. Whole log is following.

> docker run --name orcl -p 1521:1521 -p 5500:5500 -e ORACLE_SID=orcl -e ORACLE_PDB=pdb1 oracle/database:12.1.0.2-ee

ORACLE AUTO GENERATED PASSWORD FOR SYS, SYSTEM AND PDBAMIN: 1kVjkSBHSjg=1

LSNRCTL for Linux: Version 12.1.0.2.0 - Production on 27-DEC-2016 16:28:35

Copyright (c) 1991, 2014, Oracle.  All rights reserved.

Starting /opt/oracle/product/12.1.0.2/dbhome_1/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 12.1.0.2.0 - Production
System parameter file is /opt/oracle/product/12.1.0.2/dbhome_1/network/admin/listener.ora
Log messages written to /opt/oracle/diag/tnslsnr/4c5a2d9ca68f/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.1.0.2.0 - Production
Start Date                27-DEC-2016 16:28:35
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.1.0.2/dbhome_1/network/admin/listener.ora
Listener Log File         /opt/oracle/diag/tnslsnr/4c5a2d9ca68f/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
Copying database files
1% complete
2% complete
8% complete
27% complete
Creating and starting Oracle instance
29% complete
32% complete
33% complete
34% complete
38% complete
42% complete
43% complete
45% complete
Completing Database Creation
48% complete
51% complete
53% complete
62% complete
64% complete
72% complete
Creating Pluggable Databases
78% complete
100% complete
Look at the log file "/opt/oracle/cfgtoollogs/dbca/orcl/orcl.log" for further details.

SQL*Plus: Release 12.1.0.2.0 Production on Tue Dec 27 17:08:10 2016

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

Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options

SQL>
System altered.

SQL>
Pluggable database altered.

SQL> Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
#########################
DATABASE IS READY TO USE!
#########################
Tue Dec 27 17:04:48 2016

ERROR: ORA-48178 encountered when checking if the process is able to
ERROR: create the ADR schema in the specified ADR Base directory [/opt/oracle]
ERROR: The ORA-48178 error is caused by the ORA-48122 error.
ORA-48122: error with opening the ADR block file [/opt/oracle/diag/rdbms/orcl/orcl/metadata/ADR_INTERNAL.mif] [0]
ORA-27040: file create error, unable to create file
Linux-x86_64 Error: 22: Invalid argument
Additional information: 2
ERROR: Check if the directory is readable and check if the OS version is supported for ADR.
ERROR: The process will switch back to the pre-ADR method of tracing and logging.

I ran the command on following environment. Especially differences between with common environment is that this docker host use ZFS storage driver and Unbreakable Enterprise Kernel on Oracle Linux.

>  docker info
Containers: 15
 Running: 9
 Paused: 0
 Stopped: 6
Images: 98
Server Version: 1.12.3
Storage Driver: zfs
 Zpool: error while getting pool information strconv.ParseUint: parsing "": invalid syntax
 Zpool Health: not available
 Parent Dataset: storage/docker
 Space Used By Parent: 13221888
 Space Available: 366278565888
 Parent Quota: no
 Compression: off
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
 Volume: local
 Network: bridge overlay null host
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Security Options: seccomp
Kernel Version: 4.1.12-61.1.19.el7uek.x86_64
Operating System: Oracle Linux Server 7.3
OSType: linux
Architecture: x86_64
CPUs: 8
Total Memory: 31.11 GiB
Name: home
ID: 5N6W:2EGL:XOSR:U3IY:5RHG:T2MG:YCCR:4LP7:PSLX:ERRT:QJ4M:EK6O
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
WARNING: bridge-nf-call-iptables is disabled
WARNING: bridge-nf-call-ip6tables is disabled
Labels:
 provider=generic
Insecure Registries:
 127.0.0.0/8
chiroito commented 7 years ago

Database instance seems to write to /opt/oracle/diag directory using O_DIRECT. However any file system such as NFS and ZFS can not use O_DIRECT. If docker host use these file system as /var/lib/docker , Database instance can not create file to /opt/oracle/diag. Docker container need to mount /opt/oracle/diag onto other file system such as ext4 on docker host.

Djelibeybi commented 7 years ago

We don't support ZFS on Oracle Linux at all, so this is a completely unsupported environment.