I am trying to run a docker image created using the dockerfile for XE.
Host machine : Centos
docker run --name oracle --shm-size=1g -p 1521:1521 -p 8080:8080 -e ORACLE_PWD=password -v /var/log/oracle:/u01/app/oracle/oradata 559f7b3993cd
ORACLE PASSWORD FOR SYS AND SYSTEM: password
Oracle Database 11g Express Edition Configuration
-------------------------------------------------
This will configure on-boot properties of Oracle Database 11g Express
Edition. The following questions will determine whether the database should
be starting upon system boot, the ports it will use, and the passwords that
will be used for database accounts. Press <Enter> to accept the defaults.
Ctrl-C will abort.
Specify the HTTP port that will be used for Oracle Application Express [8080]:
Specify a port that will be used for the database listener [1521]:
Specify a password to be used for database accounts. Note that the same
password will be used for SYS and SYSTEM. Oracle recommends the use of
different passwords for each database account. This can be done after
initial configuration:
Confirm the password:
Do you want Oracle Database 11g Express Edition to be started on boot (y/n) [y]:
Starting Oracle Net Listener...Done
Configuring database...Done
/bin/chmod: changing permissions of '/u01/app/oracle/oradata': Permission denied
Starting Oracle Database 11g Express Edition instance...Done
Installation completed successfully.
SQL*Plus: Release 11.2.0.2.0 Production on Tue Aug 7 10:21:40 2018
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Express Edition Release 11.2.0.2.0 - 64bit Production
SQL> BEGIN DBMS_XDB.SETLISTENERLOCALACCESS(FALSE); END;
*
ERROR at line 1:
ORA-06550: line 1, column 7:
PLS-00201: identifier 'DBMS_XDB.SETLISTENERLOCALACCESS' must be declared
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
SQL> SQL> ALTER DATABASE ADD LOGFILE GROUP 4 ('/u01/app/oracle/oradata/XE/redo04.log') SIZE 50m
*
ERROR at line 1:
ORA-01507: database not mounted
SQL> ALTER DATABASE ADD LOGFILE GROUP 5 ('/u01/app/oracle/oradata/XE/redo05.log') SIZE 50m
*
ERROR at line 1:
ORA-01507: database not mounted
SQL> ALTER DATABASE ADD LOGFILE GROUP 6 ('/u01/app/oracle/oradata/XE/redo06.log') SIZE 50m
*
ERROR at line 1:
ORA-01507: database not mounted
SQL> ALTER SYSTEM SWITCH LOGFILE
*
ERROR at line 1:
ORA-01109: database not open
SQL> ALTER SYSTEM SWITCH LOGFILE
*
ERROR at line 1:
ORA-01109: database not open
SQL> ALTER SYSTEM CHECKPOINT
*
ERROR at line 1:
ORA-01109: database not open
SQL> ALTER DATABASE DROP LOGFILE GROUP 1
*
ERROR at line 1:
ORA-01507: database not mounted
SQL> ALTER DATABASE DROP LOGFILE GROUP 2
*
ERROR at line 1:
ORA-01507: database not mounted
SQL> SQL>
System altered.
SQL> Disconnected from Oracle Database 11g Express Edition Release 11.2.0.2.0 - 64bit Production
mkdir: cannot create directory '/u01/app/oracle/oradata/dbconfig': Permission denied
mv: cannot move '/u01/app/oracle/product/11.2.0/xe/dbs/spfileXE.ora' to '/u01/app/oracle/oradata/dbconfig/XE/': No such file or directory
mv: cannot move '/u01/app/oracle/product/11.2.0/xe/dbs/orapwXE' to '/u01/app/oracle/oradata/dbconfig/XE/': No such file or directory
mv: cannot move '/u01/app/oracle/product/11.2.0/xe/network/admin/listener.ora' to '/u01/app/oracle/oradata/dbconfig/XE/': No such file or directory
mv: cannot move '/u01/app/oracle/product/11.2.0/xe/network/admin/tnsnames.ora' to '/u01/app/oracle/oradata/dbconfig/XE/': No such file or directory
mv: cannot move '/etc/sysconfig/oracle-xe' to '/u01/app/oracle/oradata/dbconfig/XE/': No such file or directory
cp: cannot create regular file '/u01/app/oracle/oradata/dbconfig/XE/': No such file or directory
ln: failed to create symbolic link '/u01/app/oracle/product/11.2.0/xe/dbs/spfileXE.ora': File exists
ln: failed to create symbolic link '/u01/app/oracle/product/11.2.0/xe/dbs/orapwXE': File exists
ln: failed to create symbolic link '/etc/sysconfig/oracle-xe': File exists
cp: cannot stat '/u01/app/oracle/oradata/dbconfig/XE/oratab': No such file or directory
#####################################
########### E R R O R ###############
DATABASE SETUP WAS NOT SUCCESSFUL!
Please check output for further info!
########### E R R O R ###############
#####################################
The following output is now a tail of the alert.log:
ORA-1507 signalled during: ALTER DATABASE ADD LOGFILE GROUP 5 ('/u01/app/oracle/oradata/XE/redo05.log') SIZE 50m...
ALTER DATABASE ADD LOGFILE GROUP 6 ('/u01/app/oracle/oradata/XE/redo06.log') SIZE 50m
ORA-1507 signalled during: ALTER DATABASE ADD LOGFILE GROUP 6 ('/u01/app/oracle/oradata/XE/redo06.log') SIZE 50m...
ALTER DATABASE DROP LOGFILE GROUP 1
ORA-1507 signalled during: ALTER DATABASE DROP LOGFILE GROUP 1...
ALTER DATABASE DROP LOGFILE GROUP 2
ORA-1507 signalled during: ALTER DATABASE DROP LOGFILE GROUP 2...
Cleared LOG_ARCHIVE_DEST_1 parameter default value
Using LOG_ARCHIVE_DEST_1 parameter default value as /u01/app/oracle/product/11.2.0/xe/dbs/arch
ALTER SYSTEM SET db_recovery_file_dest='' SCOPE=BOTH;
Not sure why I am getting _permission denied_.
Is there anything I am missing?
Hi @shashank-k,
Not sure either but it could either be because SELinux is preventing you from access (I would put SELinux into permissive mode, or because you don't have the right permissions sets on the directory for the oracle user to write into /var/log/oracle/.
I've faced a similar issue. Not sure why this is related but if you run:
docker volume prune
The the container will start working again. Hope this can help.
@shashank-k, did you manage to solve this issue?
@shashank-k, did you manage to solve this issue?
I have not yet tested it again after the error. Will be picking up this week and will respond soon.
Closing due to lack of response.
I've faced a similar issue. Not sure why this is related but if you run:
docker volume pruneThe the container will start working again. Hope this can help.
Solved it for me too. I have no clue why.... since I deleted old containers - but thank you.
I麓m running on docker-machine without mounts and had the same error.
We encountered the same error as mentioned before. The suggested solution using docker volume prune works just fine.
The other thing is that we run our docker images inside a virtual maschine with fixed disk space. Inside the virtual maschine only 400 MB of free disk space were remaining. So maybe this issue occures if there is not enought free disk space available.
docker volume prune worked for me too
Most helpful comment
I've faced a similar issue. Not sure why this is related but if you run:
docker volume pruneThe the container will start working again. Hope this can help.