I upgraded to Docker Desktop version 2.2.0.0 (42247) on Friday. Tried to recreate my Docker Oracle container with the following command, my Oracle database files are stored outside the container:
docker run --name oracle_SANDBOX -p 1521:1521 -p 5500:5500 -e DB_SID=fayzsand -e DB_PDB=sandpdb -e ORACLE_PWD=mypassword -e ORACLE_CHARACTERSET=AL32UTF8 -v ${PWD}/oradata:/ORCL -v ${PWD}/share:/mnt/share -v ${PWD}/setup:/opt/oracle/scripts/setup -e "TZ=America/Detroit" store/oracle/database-enterprise:12.2.0.1-slim
It seems that the PDB is not starting correctly. I have recreated the docker container in the past with no issues on an older version of Docker. Note the error pasted below, ORA-10997: another startup/shutdown operation of this instance inprogress.
docker run --name oracle_SANDBOX -p 1521:1521 -p 5500:5500 -e DB_SID=fayzsand -e DB_PDB=sandpdb -e ORACLE_PWD=mypassword -e ORACLE_CHARACTERSET=AL32UTF8 -v ${PWD}/oradata:/ORCL -v ${PWD}/share:/mnt/share -v ${PWD}/setup:/opt/oracle/scripts/setup -e "TZ=America/Detroit" store/oracle/database-enterprise:12.2.0.1-slim
Unable to find image 'store/oracle/database-enterprise:12.2.0.1-slim' locally
12.2.0.1-slim: Pulling from store/oracle/database-enterprise
4ce27fe12c04: Pull complete
9d3556e8e792: Pull complete
fc60a1a28025: Pull complete
0c32e4ed872e: Pull complete
be0a1f1e8dfd: Pull complete
Digest: sha256:dbd87ae4cc3425dea7ba3d3f34e062cbd0afa89aed2c3f3d47ceb5213cc0359a
Status: Downloaded newer image for store/oracle/database-enterprise:12.2.0.1-slim
Setup Oracle Database
Oracle Database 12.2.0.1 Setup
Sun Jan 26 10:26:53 EST 2020
Check parameters ......
log file is : /home/oracle/setup/log/paramChk.log
paramChk.sh is done at 1 sec
untar DB bits ......
log file is : /home/oracle/setup/log/untarDB.log
untarDB.sh is done at 24 sec
config DB ......
log file is : /home/oracle/setup/log/configDB.log
Sun Jan 26 10:27:16 EST 2020
Start Docker DB configuration
Call configDBora.sh to configure database
Sun Jan 26 10:27:16 EST 2020
Configure DB as oracle user
Setup Database directories ...
startup database instance
SQL*Plus: Release 12.2.0.1.0 Production on Sun Jan 26 10:27:16 2020
Copyright (c) 1982, 2016, Oracle. All rights reserved.
Connected to an idle instance.
**SQL> ORA-10997: another startup/shutdown operation of this instance inprogress
ORA-09969: unable to close or remove lock file
Linux-x86_64 Error: 16: Device or resource busy**
SQL> Disconnected
LSNRCTL for Linux: Version 12.2.0.1.0 - Production on 26-JAN-2020 10:27:24
Copyright (c) 1991, 2016, Oracle. All rights reserved.
Starting /u01/app/oracle/product/12.2.0/dbhome_1/bin/tnslsnr: please wait...
TNSLSNR for Linux: Version 12.2.0.1.0 - Production
System parameter file is /u01/app/oracle/product/12.2.0/dbhome_1/admin/fayzsand/listener.ora
Log messages written to /u01/app/oracle/diag/tnslsnr/818a997375aa/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=0.0.0.0)(PORT=1521)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=0.0.0.0)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 12.2.0.1.0 - Production
Start Date 26-JAN-2020 10:27:24
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/12.2.0/dbhome_1/admin/fayzsand/listener.ora
Listener Log File /u01/app/oracle/diag/tnslsnr/818a997375aa/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=0.0.0.0)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
The listener supports no services
The command completed successfully
DONE!
Remove password info
Docker DB configuration is complete !
ERROR : config DB failed, please check log /home/oracle/setup/log/configDB.log for details!
ERROR: create the ADR schema in the specified ADR Base directory [/u01/app/oracle]
ERROR: The ORA-48178 error is caused by the ORA-48122 error.
ORA-48122: error with opening the ADR block file [/u01/app/oracle/diag/rdbms/fayzsand/fayzsand/metadata/ADR_INTERNAL.mif] [0]
ORA-48191: user missing read or write permission on specified file
Linux-x86_64 Error: 13: Permission denied
Additional information: 6
Additional information: 438
Additional information: 33261
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.
Edited for formatting.
Can you try building a single instace Database image using the Dockerfile in this repo to see if it has the same issue?
I had someone else execute the same Docker Run command and it failed as well. This time I have more output info than before. I also re-ran the same command again and received more error output (ERROR MESSAGE BELOW). It seems that it is a Docker Desktop & Windows security issue. And before you ask, yes the target drive is checked off as a file sharing resource in Docker Desktop. Someone with a Mac machine was able to successfully execute the same Docker Run command.
DBNEWID: Release 12.2.0.1.0 - Production on Mon Jan 27 09:13:33 2020
Copyright (c) 1982, 2017, Oracle and/or its affiliates. All rights reserved.
NID-00115: Database should be mounted
Change of database name failed during validation - database is intact.
DBNEWID - Completed with validation errors.
mv: cannot move '/u01/app/oracle/diag/rdbms/orclcdb' to '/u01/app/oracle/diag/rdbms/fayzsand': Operation not permitted
mv: cannot move '/u02/app/oracle/audit/ORCLCDB' to '/u02/app/oracle/audit/fayzsand': Operation not permitted
FIXED: The issue was related to Docker Desktop Community ver. 2.2.0.0 which was released on 21-Jan-2020. They implemented a new way of File Sharing. This has been causing problems across the board. I downgraded to DDC ver 2.1.0.5 and problem solved. Maybe someday people will validate their code better.
"Inefficient code causes more CPU cycles which is the true reason for global warming."
My feeling is that either something is not right with the volume or there was some configuration change on the docker side that doesn't give you write permissions anymore.
All seems to come down to:
ORA-48191: user missing read or write permission on specified file
Linux-x86_64 Error: 13: Permission denied
If I were you, I would try to start a new container with a new volume, see whether the issue appears there as well or not.
I experiences the same problem as the OP.
"SQL> ORA-10997: another startup/shutdown operation of this instance inprogress
ORA-09969: unable to close or remove lock file
Linux-x86_64 Error: 16: Device or resource busy"
The solution for me was to reinstall an older version of docker desktop (2.1.0.5) and everythings working now.
"Connected to an idle instance.
SQL> ORACLE instance started.
Total System Global Area 1073741824 bytes
Fixed Size 8801008 bytes
Variable Size 281019664 bytes
Database Buffers 775946240 bytes
Redo Buffers 7974912 bytes
Database mounted.
Database opened."
I'm using the same volume, image and parameters. It strongly suggest a problem with the lastest docker desktop...
Regards
dc