SHIFT

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

User Tools

Site Tools


oraclelistener
Differences

This shows you the differences between two versions of the page.

Link to this comparison view

oraclelistener [2013/03/08 05:08] (current)
sjoerd created
Line 1: Line 1:
 += 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:
 +<​code>​
 +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
 +</​code>​
 +And indeed, when trying to do a '​telnet localhost 1521' we got an connection refused error.
 +
 += Solution =
 +Turns out, after reading [[http://​books.google.com/​books?​id=Go3QBdT-qysC&​pg=PA321&​lpg=PA321&​dq=1521+not+listening+on+localhost&​source=bl&​ots=J3_RaPwG3q&​sig=UChTKy9yjErmwo5BXfa0iA3v0VM&​hl=en&​ei=Fy7gStGmJIGL-QbfweGsCw&​sa=X&​oi=book_result&​ct=result&​resnum=2&​ved=0CAwQ6AEwAQ#​v=onepage&​q=1521%20not%20listening%20on%20localhost&​f=false|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
 +<​code>​
 +# 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)
 +    )
 +  )
 +</​code>​
 +\\
 +Modified oracle listener file:
 +  sudo cat /​opt/​oracle/​product/​10.2/​network/​admin/​listener.ora
 +<​code>​
 +# 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)
 +    )
 +  )
 +</​code>​
 +
 += 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
 +
 +{{tag>​aix oracle}}
oraclelistener.txt ยท Last modified: 2013/03/08 05:08 by sjoerd