Open
Description
Same as #2397.
When using the following config (from a docker-compose
yml file) using the enterprise image:
oracle:
image: container-registry.oracle.com/database/enterprise:21.3.0.0
container_name: oracle_db
environment:
- ORACLE_PWD=AvErYsEcUrEPaSsW0rD
ports:
- "1521:1521"
- "5500:5500"
After running the docker-compose up oracle
command the logs shows:
oracle_db | [2022:11:07 22:02:33]: Acquiring lock .ORCLCDB.create_lck with heartbeat 30 secs
oracle_db | [2022:11:07 22:02:33]: Lock acquired
oracle_db | [2022:11:07 22:02:33]: Starting heartbeat
oracle_db | [2022:11:07 22:02:33]: Lock held .ORCLCDB.create_lck
oracle_db | ORACLE EDITION: ENTERPRISE
oracle_db |
oracle_db | LSNRCTL for Linux: Version 21.0.0.0.0 - Production on 07-NOV-2022 22:02:34
oracle_db |
oracle_db | Copyright (c) 1991, 2021, Oracle. All rights reserved.
oracle_db |
oracle_db | Starting /opt/oracle/product/21c/dbhome_1/bin/tnslsnr: please wait...
oracle_db |
oracle_db | TNSLSNR for Linux: Version 21.0.0.0.0 - Production
oracle_db | System parameter file is /opt/oracle/homes/OraDB21Home1/network/admin/listener.ora
oracle_db | Log messages written to /opt/oracle/diag/tnslsnr/39faef2359d1/listener/alert/log.xml
oracle_db | Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1)))
oracle_db | Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=0.0.0.0)(PORT=1521)))
oracle_db |
oracle_db | Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1)))
oracle_db | STATUS of the LISTENER
oracle_db | ------------------------
oracle_db | Alias LISTENER
oracle_db | Version TNSLSNR for Linux: Version 21.0.0.0.0 - Production
oracle_db | Start Date 07-NOV-2022 22:02:34
oracle_db | Uptime 0 days 0 hr. 0 min. 0 sec
oracle_db | Trace Level off
oracle_db | Security ON: Local OS Authentication
oracle_db | SNMP OFF
oracle_db | Listener Parameter File /opt/oracle/homes/OraDB21Home1/network/admin/listener.ora
oracle_db | Listener Log File /opt/oracle/diag/tnslsnr/39faef2359d1/listener/alert/log.xml
oracle_db | Listening Endpoints Summary...
oracle_db | (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1)))
oracle_db | (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=0.0.0.0)(PORT=1521)))
oracle_db | The listener supports no services
oracle_db | The command completed successfully
Then did
$ docker exec -ti oracle_db bash
And from the container:
bash-4.2$ lsnrctl status
Outputs
LSNRCTL for Linux: Version 21.0.0.0.0 - Production on 07-NOV-2022 22:26:09
Copyright (c) 1991, 2021, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 21.0.0.0.0 - Production
Start Date 07-NOV-2022 22:02:34
Uptime 0 days 0 hr. 23 min. 35 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /opt/oracle/homes/OraDB21Home1/network/admin/listener.ora
Listener Log File /opt/oracle/diag/tnslsnr/39faef2359d1/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
Seeing the same behavior with the express image.
From the container, when trying to login as sysdba with
$ bash-4.2$ sqlplus sys/AvErYsEcUrEPaSsW0rD@localhost/ORCLPDB1 as sysdba
It produces the corresponding output:
SQL*Plus: Release 21.0.0.0.0 - Production on Tue Nov 8 16:52:39 2022
Version 21.3.0.0.0
Copyright (c) 1982, 2021, Oracle. All rights reserved.
ERROR:
ORA-12514: TNS:listener does not currently know of service requested in connect
descriptor
Enter user-name:
Same with
bash-4.2$ sqlplus /nolog
and then
SQL*Plus: Release 21.0.0.0.0 - Production on Tue Nov 8 17:02:49 2022
Version 21.3.0.0.0
Copyright (c) 1982, 2021, Oracle. All rights reserved.
SQL> CONNECT SYS
Enter password:
ERROR:
ORA-12547: TNS:lost contact
How can I get a database to run in this container ?