Open mjdavies opened 5 years ago
Bit more information
Whenever I try to use --mount, when I exec into the container I can't access the database, constantly says it's shutting down or starting up
ORA-01033: ORACLE initialization or shutdown in progress
Here's the alert log
Enter user-name: root@d1956113a860:/# cat /u01/app/oracle/diag/rdbms/xe/XE/trace/alert_XE.log
/u01/app/oracle/diag/rdbms/xe/XE/trace/alert_XE.log: line 1: Tue: command not found
/u01/app/oracle/diag/rdbms/xe/XE/trace/alert_XE.log: line 2: syntax error near unexpected token (' /u01/app/oracle/diag/rdbms/xe/XE/trace/alert_XE.log: line 2:
Starting ORACLE instance (normal)'
Whenever I try to use the -v option, it will work first time, so I import some data, stop and remove the container, run it again mapping to the volume, and then I see similar errors, and the database always either shutting down or starting up making it unusable.
I've now tried this within a docker-compose context
version: '2'
services:
oracle-db:
build:
context: .
dockerfile: oracle.Dockerfile
container_name: oracle-db
environment:
- ORACLE_ALLOW_REMOTE=true
volumes:
- oracle:/u01/app/oracle/oradata/XE/
ports:
- 49161:1521
volumes:
oracle:
docker-compose up works beautifully, and I docker exec into the container, and import some data with imp.
Then I run docker-compose down, and docker-compose up again, and this error pops up in the output from the compose command
oracle-db | Starting Oracle Net Listener.
oracle-db | Starting Oracle Database 11g Express Edition instance.
oracle-db |
oracle-db | ERROR:
oracle-db | ORA-01033: ORACLE initialization or shutdown in progress
oracle-db | Process ID: 0
oracle-db | Session ID: 0 Serial number: 0
oracle-db |
oracle-db |
oracle-db | SP2-0306: Invalid option.
oracle-db | Usage: CONN[ECT] [{logon|/|proxy} [AS {SYSDBA|SYSOPER|SYSASM}] [edition=value]]
oracle-db | where <logon> ::= <username>[/<password>][@<connect_identifier>]
oracle-db | <proxy> ::= <proxyuser>[<username>][/<password>][@<connect_identifier>]
oracle-db | /usr/sbin/startup.sh: ignoring /docker-entrypoint-initdb.d/*
I've run into the same problem - adding a mounted volume over the oradata directory works first time but then after a restart Oracle won't start properly - any ideas @wnameless ?
Hi everyone i found a fix for this problem. Instead of setting the volume path to /u01/app/oracle/XE/oradata set it to /u01/app/oracle and will work. That solutions works for me.
Hi everyone i found a fix for this problem. Instead of setting the volume path to /u01/app/oracle/XE/oradata set it to /u01/app/oracle and will work. That solutions works for me.
It works for me as well. Thanks!!
Hi everyone i found a fix for this problem. Instead of setting the volume path to /u01/app/oracle/XE/oradata set it to /u01/app/oracle and will work. That solutions works for me.
It works for me as well. Thanks!!
how did you get this to work exactly? Im struggling. would rather data not stored in the container.
Hi, This is the command I wrote:
docker run -d -p 1521:1521 -e ORACLE_ALLOW_REMOTE=true -v oracle:/u01/app/oracle wnameless/oracle-xe-11g-r2
Hi, is there anyone fix this issue? I'd just like to share a work around using k8s environment:
cp -a /u01/app/oracle /tmp/app
okay, now will be the tricky part:
I know this is not a proper way to solve this issue, just a work around as I mentioned. I really keen to hear a final solution from you guys!
HI Everyone
I'm on mac, docker versions are
Server: Docker Engine - Community Engine: Version: 18.09.2
Client: Docker Engine - Community Version: 18.09.2
I've tried what seems to be every conceivable way of persisting data, using -v, or --mount, but nothing seems to be working. I think I must be getting the path to where the data exists inside the container wrong or something.
Is persisting data possible with my versions above and this image? I've got a saved image prior to the image being pulled from docker hub, which was very sad btw, not your fault I know. :-(
Thanks for any tips or suggestions.