SHIFT

--- Sjoerd Hooft's InFormation Technology ---

User Tools

Site Tools


Sidebar

Recently Changed Pages:

View All Pages


View All Tags


LinkedIn




WIKI Disclaimer: As with most other things on the Internet, the content on this wiki is not supported. It was contributed by me and is published “as is”. It has worked for me, and might work for you.
Also note that any view or statement expressed anywhere on this site are strictly mine and not the opinions or views of my employer.


Pages with comments

View All Comments

oraclelistener

Oracle Listener Not Listening On Localhost

The oracle dba-er told me there was something wrong with the network on a new AIX box. The Oracle listener didn't listen on localhost which caused the oracle enterprise manager installation to fail.

This was shown using the netstat command:

sjoerd@oraclebox:/home/sjoerd>netstat -na | grep 1521
tcp4       0      0  10.10.10.100.1521         *.*                       LISTEN
tcp4       0      0  10.10.10.100.1521         10.10.10.1.1429           ESTABLISHED
tcp4       0      0  10.10.10.100.1521         10.10.10.100.32782        ESTABLISHED
tcp4       0      0  10.10.10.100.32782        10.10.10.100.1521         ESTABLISHED
tcp4       0      0  10.10.10.100.1521         10.10.10.100.32871        ESTABLISHED

And indeed, when trying to do a 'telnet localhost 1521' we got an connection refused error.

Solution

Turns out, after reading this book there were some undocumented issues regarding the Boot IP address, which was undocumented in releases prior to Oracle 11g. It comes down to the simple requirement that the oracle listener shouldn't listen on the long hostname or the host's IP-address but on the hosts short hostname:
Original oracle listener file:

sudo cat /opt/oracle/product/10.2/network/admin/listener.ora.old
# listener.ora Network Configuration File: /opt/oracle/product/10.2/network/admin/listener.ora
# Generated by Oracle configuration tools.

LISTENER =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 10.10.10.100)(PORT = 1521))
  )

SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (GLOBAL_DBNAME = comp01.company.local)
      (ORACLE_HOME = /opt/oracle/product/10.2)
      (SID_NAME = comp01)
    )
  )


Modified oracle listener file:

sudo cat /opt/oracle/product/10.2/network/admin/listener.ora
# listener.ora Network Configuration File: /opt/oracle/product/10.2/network/admin/listener.ora
# Generated by Oracle configuration tools.

LISTENER =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = oraclebox)(PORT = 1521))
  )

SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (GLOBAL_DBNAME = comp01.company.local)
      (ORACLE_HOME = /opt/oracle/product/10.2)
      (SID_NAME = comp01)
    )
  )

Restart Oracle Listener

Now to reload the oracle listener with the new settings:

lsnrctl stop
lsnrctl start

Of course, these commands should be issued by the oracle user.

Netstat

Now the netstat command gives this line:

tcp4       0      0  *.1521                 *.*                    LISTEN
You could leave a comment if you were logged in.
oraclelistener.txt · Last modified: 2021/09/24 00:25 (external edit)