Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot access Enterprise Manager #166

Closed
jcrben opened this issue Dec 8, 2022 · 2 comments
Closed

Cannot access Enterprise Manager #166

jcrben opened this issue Dec 8, 2022 · 2 comments

Comments

@jcrben
Copy link

jcrben commented Dec 8, 2022

UPDATE AGAIN: when building this locally:

[WARNING] [DBT-09251] The listener configuration is not selected for the database. EM DB Express URL will not be accessible.
   CAUSE: The database should be registered with a listener in order to access the EM DB Express URL.
   ACTION: Select a listener to be registered or created with the database.

UPDATE: I wonder if this phrase is a clue: The SID_LIST_listener_name parameter is required if you are using Oracle Enterprise Manager to manage the database. over at https://docs.oracle.com/cd/E11882_01/network.112/e41945/listenercfg.htm

I'm trying to access the Enterprise Manager from inside a WSL virtual machine and I can't access it - even from a simple curl command inside the container. I have a very simple docker-compose.yaml which looks like the example:

version: '2'

services:
  db:
    image: gvenzl/oracle-xe
    ports:
      - '1521:1521'
      - '5500:5500'
    expose:
      - '1521'
      - '5500'
    environment:
        ORACLE_PASSWORD: password

I also followed the instruction over at https://docs.oracle.com/en/database/oracle/oracle-database/21/xeinl/using-enterprise-manager-express.html#GUID-35C7E577-5FCF-4C5E-B7E7-91FA6DFB59C5 to allow remote access.

Inside the container, curl localhost:5500/em or curl localhost:5500/em/shell returns curl: (56) Recv failure: Connection reset by peer

I've also been looking at https://stackoverflow.com/questions/43557776/how-to-connect-localhost5500-em-after-the-first-installation/74736809#74736809 for advice

Tailing the log when I try to access:

<msg time='2022-12-08T22:52:39.895+00:00' org_id='oracle' comp_id='tnslsnr'
 type='UNKNOWN' level='16' host_id='0d77bf24b2fc'
 host_addr='172.21.0.2' pid='313'>
 <txt>08-DEC-2022 22:52:39 * http * (ADDRESS=(PROTOCOL=tcps)(HOST=127.0.0.1)(PORT=51384)) * handoff * http * 12519
 </txt>
</msg>
<msg time='2022-12-08T22:52:39.895+00:00' org_id='oracle' comp_id='tnslsnr'
 type='UNKNOWN' level='16' host_id='0d77bf24b2fc'
 host_addr='172.21.0.2' pid='313'>
 <txt>TNS-12519: TNS:no appropriate service handler found
 </txt>
</msg>

Log of lsnrctl status:

bash-4.4$ lsnrctl status

LSNRCTL for Linux: Version 21.0.0.0.0 - Production on 08-DEC-2022 22:30:36

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC_FOR_XE)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 21.0.0.0.0 - Production
Start Date                08-DEC-2022 22:14:36
Uptime                    0 days 0 hr. 16 min. 0 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Default Service           XE
Listener Parameter File   /opt/oracle/homes/OraDBHome21cXE/network/admin/listener.ora
Listener Log File         /opt/oracle/diag/tnslsnr/442248525a85/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC_FOR_XE)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=0.0.0.0)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcps)(HOST=442248525a85)(PORT=5500))(Security=(my_wallet_directory=/opt/oracle/admin/XE/xdb_wallet))(Presentation=HTTP)(Session=RAW))
Services Summary...
Service "XE" has 1 instance(s).
  Instance "XE", status READY, has 1 handler(s) for this service...
Service "ec38f86b95e60ab7e055000000000001" has 1 instance(s).
  Instance "XE", status READY, has 1 handler(s) for this service...
Service "xepdb1" has 1 instance(s).
  Instance "XE", status READY, has 1 handler(s) for this service...
The command completed successfully
bash-4.4$ lsnrctl start

LSNRCTL for Linux: Version 21.0.0.0.0 - Production on 08-DEC-2022 22:30:44

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

TNS-01106: Listener using listener name LISTENER has already been started

Another troubleshooting query suggested by Stackoverflow:

SQL> select dbms_xdb_config.gethttpsport () from dual;

DBMS_XDB_CONFIG.GETHTTPSPORT()
------------------------------
                          5500

SQL> select dbms_xdb_config.gethttspsport () from dual;
select dbms_xdb_config.gethttspsport () from dual
       *
ERROR at line 1:
ORA-00904: "DBMS_XDB_CONFIG"."GETHTTSPSPORT": invalid identifier


SQL> exec dbms_xdb_config.sethttpsport (5500);

PL/SQL procedure successfully completed.
@jcrben
Copy link
Author

jcrben commented Dec 10, 2022

I added a SID_LIST_listener but no dice

SID_LIST_listener=
(SID_LIST=
 (SID_DESC=
  (GLOBAL_DBNAME=XE)
  (SID_NAME=${ORACLE_SID})
  (ORACLE_HOME=${ORACLE_HOME})))" > "${ORACLE_BASE_HOME}"/network/admin/listener.ora

@jcrben
Copy link
Author

jcrben commented Dec 10, 2022

I fixed it by switching from this repo to the official docker image builder and using the setfacl command suggested at oracle/docker-images#1419 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant