13 Replies Latest reply: Sep 8, 2013 5:01 AM by user6990211 RSS

    TNS-12541: TNS:no listener

    user6990211

      Hello All,

       

      I am facing a problem TNS-12541: TNS:no listener despite all the things in place. kindly help if i am doing anything wrong. the details of my files and various commands are below.

      The sqlnet ,listener and tnsnames details are below:

      sqlnet.ora

      SQLNET.AUTHENTICATION_SERVICES= (NTS)

       

      NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)

       

      tnsname.ora:

      ORCL =

      (DESCRIPTION =

      (ADDRESS = (PROTOCOL = TCP)(HOST = 10.10.1.1 )(PORT = 1521))

      (CONNECT_DATA =

      (SERVER = DEDICATED)

      (SERVICE_NAME = orcl)

      )

      )

       

      listener.ora:

      LISTENER =

      (DESCRIPTION_LIST =

      (DESCRIPTION =

      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))

      (ADDRESS = (PROTOCOL = TCP)(HOST = 10.10.1.1)(PORT = 1521))

      )

      )

      ADR_BASE_LISTENER = d:\app\Administrator

       

      When i do a tnsping <service_name> it gives , Used TNSNAMES adapter to resolve the alias Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 10.10.1.1)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl))) TNS-12541: TNS:no listener.

       

      when i try to do lsnrctl start it gives me:

      Starting tnslsnr: please wait...

       

      Service OracleOraDb11g_home1TNSListener already running.

      TNS-12560: TNS:protocol adapter error

      TNS-00530: Protocol adapter error

       

      I am able to telnet on 1521. But while trying to connect with Java code i am getting error java.sql.SQLRecoverableException: IO Error: The Network Adapter could not establish the connection. Please help me to figure our the problem. I had tried many things. I had deleted the listener and recreated with net assistant still no success.

       

      ashutosh

        • 1. Re: TNS-12541: TNS:no listener
          EdStevens

          user6990211 wrote:

           

          Hello All,

           

          I am facing a problem TNS-12541: TNS:no listener despite all the things in place. kindly help if i am doing anything wrong. the details of my files and various commands are below.

          The sqlnet ,listener and tnsnames details are below:

          sqlnet.ora

          SQLNET.AUTHENTICATION_SERVICES= (NTS)

           

          NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)

           

          tnsname.ora:

          ORCL =

          (DESCRIPTION =

          (ADDRESS = (PROTOCOL = TCP)(HOST = 10.10.1.1 )(PORT = 1521))

          (CONNECT_DATA =

          (SERVER = DEDICATED)

          (SERVICE_NAME = orcl)

          )

          )

           

          listener.ora:

          LISTENER =

          (DESCRIPTION_LIST =

          (DESCRIPTION =

          (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))

          (ADDRESS = (PROTOCOL = TCP)(HOST = 10.10.1.1)(PORT = 1521))

          )

          )

          ADR_BASE_LISTENER = d:\app\Administrator

           

          When i do a tnsping <service_name> it gives , Used TNSNAMES adapter to resolve the alias Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 10.10.1.1)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl))) TNS-12541: TNS:no listener.

           

          when i try to do lsnrctl start it gives me:

          Starting tnslsnr: please wait...

           

          Service OracleOraDb11g_home1TNSListener already running.

          TNS-12560: TNS:protocol adapter error

          TNS-00530: Protocol adapter error

           

          I am able to telnet on 1521. But while trying to connect with Java code i am getting error java.sql.SQLRecoverableException: IO Error: The Network Adapter could not establish the connection. Please help me to figure our the problem. I had tried many things. I had deleted the listener and recreated with net assistant still no success.

           

          ashutosh

           

          What is the ip address of the machine the database and listener on?   x.x.x.1  is usually a router,not a server.  I suspect you've configured your listener with the wrong IP address.  How did you arrive at using that address to configure your listener?

           

          What OS is the database and listener on?  if it is Linux (or any variant of unix) you can check for the ip address with 'ifconfig'.  you will probably need to be logged on as root to have permissions on ifconfig.  If Windows you check it with 'ipconfig'.

           

          Also, listener.ora is not needed.  Without it your listener will start up and run with all default values and that is usually sufficient for 99.9% of all installations.  Try it, then show us the output of 'lsnrctl status'.  Please do not transcribe it.  Copy the command and output from your command prompt and paste it into your posting.

          • 2. Re: TNS-12541: TNS:no listener
            sb92075

            Oracle accurately reports reality, because no listener exists.

             

            Move, remove, delete or eliminate the listener.ora since it is NOT required to start or use the listener.

            Then do as below

             

             

            lsnrctl start

             

            COPY the results then PASTE all back here

            • 3. Re: TNS-12541: TNS:no listener
              user6990211

              Sorry, I missed the OS details. It windows 2k8 with Oracle 11g ent. The ip address is a dummy one. Thanks for your reply. I will try to remove the listener.ora file and try restarting it.

              • 4. Re: TNS-12541: TNS:no listener
                Alvaro

                Please post output of command:

                 

                lsnrctl stat

                • 5. Re: TNS-12541: TNS:no listener
                  1012457

                  First the stop the old listener process then start the listener again.

                  If  you r using windows platform then set the local_listener parameter

                  • 6. Re: TNS-12541: TNS:no listener
                    user6990211

                    C:\Users\Administrator>lsnrctl stat

                     

                     

                    LSNRCTL for 64-bit Windows: Version 11.2.0.1.0 - Production on 08-SEP-2013 00:25

                    :53

                     

                     

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

                     

                     

                    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))

                    TNS-12541: TNS:no listener

                    TNS-12560: TNS:protocol adapter error

                      TNS-00511: No listener

                       64-bit Windows Error: 2: No such file or directory

                    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=IGNEWDATABASE)(PORT=1521

                    )))

                    TNS-12541: TNS:no listener

                    TNS-12560: TNS:protocol adapter error

                      TNS-00511: No listener

                       64-bit Windows Error: 61: Unknown error

                     

                     

                    C:\Users\Administrator>

                    • 7. Re: TNS-12541: TNS:no listener
                      sb92075

                      Since are unwilling or incapable to do as requested, Your'e On Your Own (YOYO)!

                      • 8. Re: TNS-12541: TNS:no listener
                        user6990211

                        Thanks. After removind the listener.ora the outputs of the commands are below.

                        C:\Users\Administrator>lsnrctl stat

                         

                         

                        LSNRCTL for 64-bit Windows: Version 11.2.0.1.0 - Production on 08-SEP-2013 00:28

                        :05

                         

                         

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

                         

                         

                        Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))

                        TNS-12541: TNS:no listener

                        TNS-12560: TNS:protocol adapter error

                          TNS-00511: No listener

                           64-bit Windows Error: 61: Unknown error

                         

                         

                        C:\Users\Administrator>

                         

                         

                         

                         

                        C:\Users\Administrator>lsnrctl start

                         

                         

                        LSNRCTL for 64-bit Windows: Version 11.2.0.1.0 - Production on 08-SEP-2013 00:28

                        :51

                         

                         

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

                         

                         

                        TNS-01106: Listener using listener name LISTENER has already been started

                         

                         

                        C:\Users\Administrator>

                        • 9. Re: TNS-12541: TNS:no listener
                          sb92075

                          GOOGLE the keywords below

                           

                          TNS-00511: No listener    64-bit Windows Error: 61: Unknown error

                          • 10. Re: TNS-12541: TNS:no listener
                            user6990211

                            Is this is what required.

                             

                            C:\Users\Administrator>lsnrctl stat

                             

                             

                            LSNRCTL for 64-bit Windows: Version 11.2.0.1.0 - Production on 08-SEP-2013 00:28

                            :05

                             

                             

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

                             

                             

                            Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))

                            TNS-12541: TNS:no listener

                            TNS-12560: TNS:protocol adapter error

                              TNS-00511: No listener

                               64-bit Windows Error: 61: Unknown error

                             

                             

                            C:\Users\Administrator>

                             

                             

                             

                             

                            C:\Users\Administrator>lsnrctl start

                             

                             

                            LSNRCTL for 64-bit Windows: Version 11.2.0.1.0 - Production on 08-SEP-2013 00:28

                            :51

                             

                             

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

                             

                             

                            TNS-01106: Listener using listener name LISTENER has already been started

                             

                             

                            C:\Users\Administrator>

                            • 11. Re: TNS-12541: TNS:no listener
                              sb92075

                              GOOGLE the keywords below

                               

                              TNS-00511: No listener    64-bit Windows Error: 61: Unknown error

                              • 12. Re: TNS-12541: TNS:no listener
                                EdStevens

                                user6990211 wrote:

                                 

                                Sorry, I missed the OS details. It windows 2k8 with Oracle 11g ent. The ip address is a dummy one. Thanks for your reply. I will try to remove the listener.ora file and try restarting it.

                                Is "11g ent" mean 11.2.0.1 Enterprise Edition?

                                 

                                I find it interesting that without a listener.ora file the listener is reporting "HOST="  uh, host = nulls.  I'm guessing that means there is some basic network setup on the host that is incorrect or incomplete .. like maybe the hosts file?

                                • 13. Re: TNS-12541: TNS:no listener
                                  user6990211

                                  Thanks to all of you. Finally i couldnt figure out a solution.  I relocated it to a different machine. Somewhere the hostname played the part due to which it created a problem.

                                  Thanks again to all of you for your time and comments.

                                  ashutosh