7 Replies Latest reply: Mar 6, 2013 12:20 PM by Levi Pereira RSS

    tnsping on one of the RAC instance gives ERROR: ORA-12541: TNS:no listener

    990636
      Oracle RAC 2 node

      OS: solaris

      Version:11.2..0.3

      lsnrctl status shows everything is up and lsnrctl services shows everthing is up.

      when i try to connect to spotlight or from my local machine to one instance it throws TNS:no listener,but the other node is up and running.

      the tnsnames.ora file am using

      ORCL1 =
      (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST =hostname )(PORT = 1524))
      (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = ORCL)
      )
      )

      ORCL2=
      (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST =hostname )(PORT = 1524))
      (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = ORCL)
      )
      )
        • 1. Re: tnsping on one of the RAC instance gives ERROR: ORA-12541: TNS:no listener
          asahide
          Hi,

          Show us your lsnrctl services and lsnrctl status result.
          Rgd,
          • 2. Re: tnsping on one of the RAC instance gives ERROR: ORA-12541: TNS:no listener
            990636
            LSNRCTL for Solaris: Version 11.2.0.3.0 - Production on 22-FEB-2013 15:29:51

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

            Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1524))
            STATUS of the LISTENER
            ------------------------
            Alias LISTENER
            Version TNSLSNR for Solaris: Version 11.2.0.3.0 - Production
            Start Date 11-JAN-2013 11:25:54
            Uptime 43days 4 hr. 3 min. 57 sec
            Trace Level off
            Security ON: Local OS Authentication
            SNMP OFF
            Listener Parameter File /u04/app/11.2.0/grid/network/admin/listener.ora
            Listener Log File /u04/app/grid/diag/tnslsnr/08-w-70/listener/alert/log.xml
            Listening Endpoints Summary...
            (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER)))
            (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=xx.xx.xx.XXX)(PORT=1524)))
            (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=xx.xx.xx.XXX)(PORT=1524)))
            Services Summary...
            Service "+ASM" has 1 instance(s).
            Instance "+ASM1", status READY, has 1 handler(s) for this service...
            Service "ORCL" has 1 instance(s).
            Instance "ORCL1", status READY, has 1 handler(s) for this service...
            Service "ORCLXDB" has 1 instance(s).
            Instance "ORCL1", status READY, has 1 handler(s) for this service...
            • 3. Re: tnsping on one of the RAC instance gives ERROR: ORA-12541: TNS:no listener
              asahide
              Hi,

              You can access ORCL2, but cannot access ORCL1, right?
              ORCL2 's output pls?

              rgd,

              Edited by: asahideO on 2013/02/23 10:37
              • 4. Re: tnsping on one of the RAC instance gives ERROR: ORA-12541: TNS:no listener
                onedbguru
                Google search ORACLE SCAN PDF. Configure SCAN and SERVICES correctly and you will not need to even use a tnsnames.ora file.

                I have not used a tnsnames.ora file since I upgraded to 11gR2.

                That being said, make sure your local/remote_listener parameters are set correctly.

                When using RAC - especially 11gR2 - do NOT rely soley on lsnrctl stuff. The running listener should be in the GRID_HOME listener.

                Next give us the output of the following:

                srvctl config listener
                srvctl status listener
                srvctl config scan{_listener}
                srvctl status scan{_listener}

                sqlplus / as sysdba
                show parameter listener (from both nodes)


                Using "services" in your RAC cluster will be much more flexible than manually managing a tnsnames file. I have one cluster that does not even have a tnsnames file and all connections are via jdbc or using the new and improved "EasyConnect" syntax.

                (on Linux)
                sqlplus user@\"hostname:port/servicename\"
                password:

                or
                sqlplus user/password@hostname:port/servicename

                Hmmm. looks remarkably like a jdbc connect string.

                Using SCAN, you really don't care to which node your session connects. If your "SERVICE" defined to exist on only one node, then when that node crashes, the service will become available on remaining nodes.

                Remember for security purposes when posting here you should obfuscate any hostname/ipaddress/portnumbers before submitting.
                • 5. Re: tnsping on one of the RAC instance gives ERROR: ORA-12541: TNS:no listener
                  990636
                  LSNRCTL for Solaris: Version 11.2.0.3.0 - Production on 25-FEB-2013 08:38:43

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

                  Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1524))
                  STATUS of the LISTENER
                  ------------------------
                  Alias LISTENER
                  Version TNSLSNR for Solaris: Version 11.2.0.3.0 - Production
                  Start Date 06-DEC-2012 10:30:07
                  Uptime 60 days 22 hr. 8 min. 36 sec
                  Trace Level off
                  Security ON: Local OS Authentication
                  SNMP OFF
                  Listener Parameter File /u04/app/11.2.0/grid/network/admin/listener.ora
                  Listener Log File /u04/app/grid/diag/tnslsnr/08-w-71/listener/alert/log.xml
                  Listening Endpoints Summary...
                  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER)))
                  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=xx.xx.xx.xx)(PORT=1524)))
                  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=xx.xx.xx.xxx)(PORT=1524)))
                  Services Summary...
                  Service "+ASM" has 1 instance(s).
                  Instance "+ASM12", status READY, has 1 handler(s) for this service...
                  Service "ORCL" has 1 instance(s).
                  Instance "ORCL2", status READY, has 1 handler(s) for this service...
                  Service "ORCLDB" has 1 instance(s).
                  Instance "ORCL2", status READY, has 1 handler(s) for this service...
                  • 6. Re: tnsping on one of the RAC instance gives ERROR: ORA-12541: TNS:no listener
                    Eddie Essex
                    Can you connect locally from the server itself?

                    ie - Can you run a tnsping on node 2 to ORCL2?

                    If this succeeds it may possibly be a firewall/network issue.

                    When you run the following from your local machine what do you get:

                    telnet hostname 1521

                    wheer hostname is the hostname for node 2.
                    • 7. Re: tnsping on one of the RAC instance gives ERROR: ORA-12541: TNS:no listener
                      Levi Pereira
                      Try it :
                      ORCL1 =
                        (DESCRIPTION =
                          (ADDRESS_LIST =
                            (ADDRESS = (PROTOCOL = TCP)(HOST = <hostname_node1>)(PORT = 1524))
                          )
                          (CONNECT_DATA =
                            (SERVER = DEDICATED)
                            (SERVICE_NAME = ORCL)
                            (INSTANCE_NAME = ORCL1)
                          )
                        )
                      ORCL2 =
                        (DESCRIPTION =
                          (ADDRESS_LIST =
                            (ADDRESS = (PROTOCOL = TCP)(HOST = <hostname_node2>)(PORT = 1524))
                          )
                          (CONNECT_DATA =
                            (SERVER = DEDICATED)
                            (SERVICE_NAME = ORCL)
                            (INSTANCE_NAME = ORCL2)
                          )
                        )