1

I have Centos 6.5, and installed Oracle 12c. As dbca utility says after configuring new db, EM Express should be available on https://hostname:5500/em In fact, it is not. Neither on localhost nor by ip. I also did SQL> EXEC dbms_xdb_config.sethttpport(5501); because DBMS_XDB.GETHTTPPORT() showed "0", and set 5500 was impossible due to the error - 5500 seemed busy. After that I tried both ports and different host names - nothing works.

DB is up and working, here is output of the lsnrctl status(I removed listener.ora to be sure that it's not wrong, but the output is the same):

 LSNRCTL for Linux: Version 12.1.0.2.0 - Production on 18-JAN-2015
 10:27:42

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

 Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521)) STATUS of the
 LISTENER
 ------------------------ Alias                     LISTENER Version                   TNSLSNR for Linux: Version 12.1.0.2.0 - Production Start Date         
 18-JAN-2015 10:27:20 Uptime                    0 days 0 hr. 0 min. 21
 sec Trace Level               off Security                  ON: Local
 OS Authentication SNMP                      OFF Listener Log File     
 /u01/app/oracle/diag/tnslsnr/hpsa/listener/alert/log.xml Listening
 Endpoints Summary...  
 (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=hpsa)(PORT=1521)))  
 (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=hpsa)(PORT=5501))(Presentation=HTTP)(Session=RAW))
 (DESCRIPTION=(ADDRESS=(PROTOCOL=tcps)(HOST=hpsa)(PORT=5500))(Security=(my_wallet_directory=/u01/app/oracle/admin/main/xdb_wallet))(Presentation=HTTP)(Session=RAW))
 Services Summary... Service "main" has 1 instance(s).   Instance
 "main", status READY, has 1 handler(s) for this service... Service
 "mainXDB" has 1 instance(s).   Instance "main", status READY, has 1
 handler(s) for this service... The command completed successfully

Also, here is my /etc/hosts:

 127.0.0.1  localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1     localhost localhost.localdomain
 localhost6 localhost6.localdomain6
 192.168.56.101 hpsa hpsa.hpsa hpsa.localdomain node1

hostname:

 [root@hpsa ~]# hostname 

hpsa.hpsa

All that I have now for https://192.168.56.101:5501/em : browsers show that they are connected to the host and trying to retrieve data, but in few long minutes I am getting connection reset. Firefox also showed ssl_error_rx_record_too_long

What am I doing wrong?

3
  • I tried both 5500 and 5501 ports, both https:// and http:// , It doesn't work. – Battle_Slug Jan 18 '15 at 15:39
  • Does your server have multiple network adaptors? Check listener.log at the time you try to connect to the webpage. Does it contain a TNS-12518 error? Is the IP address mentioned in this error the same as the IP address your hostname maps to? Or is it the IP address of one of the other adaptors? Is the problem solved if you disable the other adaptors? – Wouter Dec 18 '15 at 14:20
  • @Wouter When I lsndrctl start, I get: Listener Log File /u01/app/oracle/diag/tnslsnr/myinstance/listener/alert/log.xml. So I did grep -n 'TNS-12518' /u01/app/oracle/diag/tnslsnr/myinstance/listener/alert/log.xml and got nothing. I also tried the same with ...listener/trace/listener.log and also nothing. But! I saw there that while hitting http://192.168.56.101:5501/em : 18-DEC-2015 05:07:33 * http * (ADDRESS=(PROTOCOL=tcps)(HOST=192.168.56.200)(PORT=53077)) * handoff * http * 0. I suppose it's the address not of eth0, but of my browser.After disabling eth0, nothing logged. – Battle_Slug Dec 18 '15 at 17:35
2

0> "and set 5500 was impossible due to the error - 5500 seemed busy"

This means that the port 5500 is already "in use". Well, I bet it is not in use but Oracle thinks that. There are a lot of ports reserved in /etc/services.

Open the file and change the following lines:

fcp-addr-srvr1  5500/tcp                # fcp-addr-srvr1
fcp-addr-srvr1  5500/udp                # fcp-addr-srvr1

Change them into:

#fcp-addr-srvr1  5500/tcp                # fcp-addr-srvr1
#fcp-addr-srvr1  5500/udp                # fcp-addr-srvr1

Retry to set the port with SQL> EXEC dbms_xdb_config.sethttpport(5500);.


EDIT 1:

Your listener shows that it's listening on port 5500 for https requests. So maybe you already did what I just posted. Could you please share the output of the following command?

service iptables status

EDIT 2:

I just activated EM Express on one of my 12c databases. Here is what I did:

  • OS: Oracle Linux 6.5
  • DB: Oracle Database 12.1.0.2.0
  • service iptables status --> OFF

Action log:

$ sqlplus / as sysdba
SQL> SELECT DBMS_XDB_CONFIG.gethttpport FROM dual;

GETHTTPSPORT
------------
        5500

SQL> SELECT DBMS_XDB_CONFIG.gethttpsport FROM dual;

GETHTTPPORT
-----------
          0

I'm going to set https port to 5501 and overwrite the http port with 5500.

SQL> EXEC DBMS_XDB_CONFIG.sethttpport(5500);
PL/SQL procedure successfully completed.

SQL> EXEC DBMS_XDB_CONFIG.sethttpsport(5501);
PL/SQL procedure successfully completed.

Afterwards the listener shows that I's listening on these ports (before the 5500 record was there already but it was not working)

$ lsnrctl status | grep PORT
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=***)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcps)(HOST=***)(PORT=5501))(Security=(my_wallet_directory=/opt/oracle/admin/orcl/xdb_wallet))(Presentation=HTTP)(Session=RAW))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=***)(PORT=5500))(Presentation=HTTP)(Session=RAW))

I did the test in a browser:

  • Browse to http://***:5500/em --> login screen appears
  • Browse to https://***:5500/em --> login screen appears

Note the tailing "/em" is important.

1
  • My lsnrctl status|grep PORT looks exactly like yours now. And still I am getting Internal Server Error while trying to browse to mentioned urls. At least it is not 404. – Battle_Slug Jan 22 '15 at 18:34
0

You need to check the enterprise manager express manager and configure it if its not configured:

SELECT DBMS_XDB_CONFIG.gethttpport FROM dual;   -- check the HTTP port number

    GETHTTPPORT
------------------
    port number

SELECT DBMS_XDB_CONFIG.gethttpsport FROM dual;  -- check the HTTPS port number
  GETHTTPSPORT
  ------------
        5500

EXEC DBMS_XDB_CONFIG.sethttpsport(5500);

PL/SQL procedure successfully completed.  --the expected result

After that you need to make sure the port is enabled (opened via iptables as well as external firewall if exist), then try to use the URL like the following:

https://<hostname>:<port>/em/

If that did not fix it, then try to reload the listener and try again

1
  • Yes, this is correct but I would say that this is exactly what Battle_Slug did. The configuration must be messed up at some point. – o0x258 Jan 20 '15 at 10:49
0

centos7 has almost all ports closed, review ports closed by firewall, for example try:

firewall-cmd --get-active-zones

If your dmz it´s "public" try this:

firewall-cmd --zone=public --add-port=5500/tcp --permanent

To me works making 5500 port open in firewall rules.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.