This discussion is archived
8 Replies Latest reply: Aug 10, 2012 9:40 AM by 954876 RSS

Listener not staying up on port 1521

954876 Newbie
Currently Being Moderated
When I try and start the listener "lsnrctl start" I get Linux Error: 111: Connection refused If I type lsnrctl start enough times it will eventually connect but only for a second before it drops it.

The host file has the loopback in it, and I have removed the log file.

[oracle@cic-adm-50290 admin]$ lsnrctl status

LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 09-AUG-2012 09:19:44

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=extproc)))
TNS-12541: TNS:no listener
TNS-12560: TNS:protocol adapter error
TNS-00511: No listener
Linux Error: 111: Connection refused
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC0)))
TNS-12541: TNS:no listener
TNS-12560: TNS:protocol adapter error
TNS-00511: No listener
Linux Error: 111: Connection refused
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=<IP Address>)(PORT=1521)))
TNS-12541: TNS:no listener
TNS-12560: TNS:protocol adapter error
TNS-00511: No listener
Linux Error: 111: Connection refused


Listener.ora
# listener.ora Network Configuration File: /opt/oracle/product/11.2.3/mvp/network/admin/listener.ora
# Generated by Oracle configuration tools.

SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = mvp)
(ORACLE_HOME = /opt/oracle/product/11.2.3/mvp)
)
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /opt/oracle/product/11.2.3/mvp)
(PROGRAM = extproc)
)
)

LOGGING_LISTENER = OFF

LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = extproc))
)
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
)
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = <IP Address>)(PORT = 1521))
)
)
)

TRACE_LEVEL_LISTENER = OFF


tnsnames.ora
MVP =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = <Server-Name>)(PORT = 1521))
(CONNECT_DATA =
(SID = MVP)
)
)


ps -ef | grep smon
ora_smon_MVP

telnet localhost 1521
Trying 127.0.0.1...
telnet: connect to address 127.0.0.1: Connection refused
telnet: Unable to connect to remote host: Connection refused

*$PATH*
/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/home/oracle/bin:/opt/oracle/product/11.2.3/mvp/bin

*$ORACLE_HOME*
/opt/oracle/product/11.2.3/mvp


Anyone have any ideas or tips?
  • 1. Re: Listener not staying up on port 1521
    Khayyam Explorer
    Currently Being Moderated
    Did you try to recreate the listener ? Run netca and remove then create again the listener.. Then run netmgr and configure the listener... Also maybe 1521 port is busy, used by another application...
  • 2. Re: Listener not staying up on port 1521
    954876 Newbie
    Currently Being Moderated
    If I do a netstat there is no port 1521 Listening or Connected. Well great I cant get xprograms to work..

    SSH -X oracle@localhost netca gives me the error:
    Oracle Net Services Configuration:
    _X11TransSocketINETConnect() can't get address for localhost:6010: Name or service not known
    Error: null

    I tried set DISPLAY 127.0.0.1:10.0 and still no luck..

    I ran xhost to install oracle so really not sure why all of this stuff is all of a sudden not working?

    From the log file trying to run netca:
    [main] [ 2012-08-09 11:14:11.297 PDT ] [NetCALogger.initTrace:203] Oracle Net Configuration Assistant: 12080911AM1411
    [main] [ 2012-08-09 11:14:11.298 PDT ] [NetCALogger.initTrace:204] Oracle Home: /opt/oracle/product/11.2.3/mvp
    [main] [ 2012-08-09 11:14:11.298 PDT ] [NetCALogger.initTrace:205] Oracle Base: /opt/oracle
    [main] [ 2012-08-09 11:14:11.298 PDT ] [NetCALogger.initTrace:206] Oracle Home Name: OraDb11g_home2
    [main] [ 2012-08-09 11:14:11.326 PDT ] [InventoryUtil.getOUIInvSession:347] setting OUI READ level to ACCESSLEVEL_READ_LOCKLESS
    [main] [ 2012-08-09 11:14:11.326 PDT ] [HAUtils.<init>:239] oui location /opt/oraInventory/ContentsXML
    [main] [ 2012-08-09 11:14:11.337 PDT ] [Version.isPre:528] version to be checked 11.2.0.3.0 major version to check against10
    [main] [ 2012-08-09 11:14:11.337 PDT ] [Version.isPre:539] isPre.java: Returning FALSE
    [main] [ 2012-08-09 11:14:11.340 PDT ] [OCR.loadLibrary:312]
    Inside constructor of OCR
    [main] [ 2012-08-09 11:14:11.354 PDT ] [OCR.loadLibrary:320] Going to load the ocr library
    [main] [ 2012-08-09 11:14:11.355 PDT ] [Library.load:188] library.load
    [main] [ 2012-08-09 11:14:11.356 PDT ] [sPlatform.isHybrid:66] osName=Linux osArch=amd64 JVM=64 rc=false
    [main] [ 2012-08-09 11:14:11.356 PDT ] [sPlatform.isHybrid:66] osName=Linux osArch=amd64 JVM=64 rc=false
    [main] [ 2012-08-09 11:14:11.356 PDT ] [Library.load:264] Loading library /opt/oracle/product/11.2.3/mvp/lib/libsrvmocr11.so
    [main] [ 2012-08-09 11:14:11.359 PDT ] [OCR.loadLibrary:322] loaded ocr libraries
    [main] [ 2012-08-09 11:14:11.359 PDT ] [OCR.isCluster:952] Calling OCRNative for isCluster()
    [main] [ 2012-08-09 11:14:11.362 PDT ] [OCR.isCluster:956] OCR Result status = true
    [main] [ 2012-08-09 11:14:11.363 PDT ] [OCR.isCluster:968] Bolean result = false
    [main] [ 2012-08-09 11:14:11.366 PDT ] [CmdlineArgs.<init>:114] Initializing variables array...
    [main] [ 2012-08-09 11:14:11.366 PDT ] [CmdlineArgs.<init>:120] Initializing NetProperties...
    [main] [ 2012-08-09 11:14:11.367 PDT ] [CmdlineArgs.initArgs:137] Initializing command line arguments...
    [main] [ 2012-08-09 11:14:11.367 PDT ] [CmdlineArgs.setOraArgs:242] Setting Oracle arguments...
    [main] [ 2012-08-09 11:14:11.367 PDT ] [CmdlineArgs.setOraArgs:246] Passed Oracle Home = NO_VALUE
    [main] [ 2012-08-09 11:14:11.367 PDT ] [CmdlineArgs.setOraArgs:249] Read Oracle Home = /opt/oracle/product/11.2.3/mvp
    [main] [ 2012-08-09 11:14:11.368 PDT ] [CmdlineArgs.setOraArgs:252] Read Oracle Home ID =
    [main] [ 2012-08-09 11:14:11.368 PDT ] [CmdlineArgs.setOraArgs:255] Read Oracle Home Name = null
    [main] [ 2012-08-09 11:14:11.368 PDT ] [CmdlineArgs.setOraArgs:263] Setting Oracle Home = /opt/oracle/product/11.2.3/mvp
    [main] [ 2012-08-09 11:14:11.368 PDT ] [InitialSetup.configureOPS:4539] Cluster mode is OFF
    [main] [ 2012-08-09 11:14:11.369 PDT ] [InitialSetup.<init>:4058] TNS_ADMIN is: null
    [main] [ 2012-08-09 11:14:11.372 PDT ] [OPSUtil.getHomeVersion:446] Inside getHomeVersion...
    [main] [ 2012-08-09 11:14:11.372 PDT ] [OPSUtil.getHomeVersion:447] oracleHome = /opt/oracle/product/11.2.3/mvp
    [main] [ 2012-08-09 11:14:11.373 PDT ] [OPSUtil.getHomeVersion:451] oracle.sysman.assistants.util.OracleHome Object = /opt/oracle/product/11.2.3/mvp
    [main] [ 2012-08-09 11:14:11.373 PDT ] [OracleHome.getVersion:889] OracleHome.getVersion called. Current Version: null
    [main] [ 2012-08-09 11:14:11.375 PDT ] [InventoryUtil.getOUIInvSession:347] setting OUI READ level to ACCESSLEVEL_READ_LOCKLESS
    [main] [ 2012-08-09 11:14:11.375 PDT ] [OracleHome.getVersion:908] Homeinfo /opt/oracle/product/11.2.3/mvp,2
    [main] [ 2012-08-09 11:14:11.880 PDT ] [OracleHome.getVersion:936] OracleHome.server.getVersion Version: 11.2.0.3.0
    [main] [ 2012-08-09 11:14:11.880 PDT ] [OracleHome.getVersion:957] Current Version From Inventory: 11.2.0.3.0
    [main] [ 2012-08-09 11:14:11.881 PDT ] [InitialSetup.<init>:4071] Admin location is: /opt/oracle/product/11.2.3/mvp/network/admin
    [main] [ 2012-08-09 11:14:12.157 PDT ] [ConfigureProfile.setDefaultProfileParams:109] Not setting ADR_BASE: sqlnet.ora already exist!
    java.lang.NullPointerException
    at oracle.ewt.lwAWT.BufferedApplet.<init>(Unknown Source)
    at oracle.net.ca.NetCA.<init>(NetCA.java:443)
    at oracle.net.ca.NetCA.main(NetCA.java:429)
  • 3. Re: Listener not staying up on port 1521
    Khayyam Explorer
    Currently Being Moderated
    First of all show me your .bash_profile file...

    And are you trying to connect to database from Windows machine?

    Second, run
    DISPLAY=<machine-name>:0.0; export DISPLAY
    <machine-name> = your local IP address(windows machine)
    Then install/run Xmanager on windows machine in passive mode(Xmanager - Passive).

    Then netca should work...
  • 4. Re: Listener not staying up on port 1521
    Helios-GunesEROL Oracle ACE
    Currently Being Moderated
    Hi;

    What ps -ef|grep inherit return? Do you have valid entery at /etc/hosts file?

    Regard
    Helios
  • 5. Re: Listener not staying up on port 1521
    954876 Newbie
    Currently Being Moderated
    I was trying to run netca from the vmserver on my localbox. You where right after changing the display to match my local pc ip address netca worked! =)

    In netca I deleted the listener and re-added it but get the same connection refused errors with lsnrctl start. So I deleted it again and tried remaking it with port 1522 and get the same errors as post 1.


    *.bash_profile*
    # .bash_profile

    # Get the aliases and functions
    if [ -f ~/.bashrc ]; then
    . ~/.bashrc
    fi

    # User specific environment and startup programs
    ORACLE_HOME=/opt/oracle/product/11.2.3/mvp
    ORACLE_SID=MVP

    PATH=$PATH:$HOME/bin:$ORACLE_HOME/bin

    export ORACLE_HOME
    export ORACLE_SID
    export PATH

    Helios- Gunes EROL wrote:
    Hi;

    What ps -ef|grep inherit return? Do you have valid entery at /etc/hosts file?

    Regard
    Helios
    It does not return anything.


    I apologize if these are n00b issues that I should already know. I start my first Oracle admin 1 class in 2 weeks. Thank you for the help! =)
  • 6. Re: Listener not staying up on port 1521
    Khayyam Explorer
    Currently Being Moderated
    Quinc wrote:
    I was trying to run netca from the vmserver on my localbox. You where right after changing the display to match my local pc ip address netca worked! =)

    In netca I deleted the listener and re-added it but get the same connection refused errors with lsnrctl start. So I deleted it again and tried remaking it with port 1522 and get the same errors as post 1.


    *.bash_profile*
    # .bash_profile

    # Get the aliases and functions
    if [ -f ~/.bashrc ]; then
    . ~/.bashrc
    fi

    # User specific environment and startup programs
    ORACLE_HOME=/opt/oracle/product/11.2.3/mvp
    ORACLE_SID=MVP

    PATH=$PATH:$HOME/bin:$ORACLE_HOME/bin

    export ORACLE_HOME
    export ORACLE_SID
    export PATH
    Please change oracle related info in bash_profile to the following
    # Oracle Settings
    TMP=/tmp; export TMP
    TMPDIR=$TMP; export TMPDIR
    
    ORACLE_UNQNAME=MVP; export ORACLE_UNQNAME
    ORACLE_BASE=/opt/oracle; export ORACLE_BASE
    ORACLE_HOME=$ORACLE_BASE/product/11.2.3/mvp; export ORACLE_HOME
    ORACLE_SID=MVP; export ORACLE_SID
    
    PATH=/usr/sbin:$PATH; export PATH
    PATH=$ORACLE_HOME/bin:$PATH; export PATH
    
    LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH
    CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH
    And try again..
  • 7. Re: Listener not staying up on port 1521
    sb92075 Guru
    Currently Being Moderated
    listener.ora is NOT required to start the listener

    move, remove, delete, rename listener.ora to new, different name then do as below

    lsnrctl start

    COPY command & results then PASTE it all back here.
  • 8. Re: Listener not staying up on port 1521
    954876 Newbie
    Currently Being Moderated
    Thank you guys for the help! It looks like one of the updates changed the permissions on /etc/nsswitch.conf. Permissions where changed to -rw----------

    chmod 664 brought them back to -rw-r--r--

    We couldn't ping localhost as oracle and after trying damn near everything we figured out the perms on nsswitch.conf where wrong.


    I believe it was caused by one of these updates on Centos.
    sudo-1.7.2p1-14.el5_8.2.x86_64
    12:dhclient-3.0.5-31.el5_8.1.x86_64
    EDIT: I re-installed these and the perms didn't change so I am not sure which update did it?


    Thank you for the help!
    -Quinc

    Edited by: Quinc on Aug 10, 2012 9:40 AM

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points