14 Replies Latest reply: Mar 27, 2014 11:10 PM by r_g_financials_dba RSS

    unable to connect with listener from client

    r_g_financials_dba

      [oracle@rac31 ~]$ lsnrctl status

       

       

      LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 21-MAR-2014 03:33:30

       

       

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

       

       

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

      STATUS of the LISTENER

      ------------------------

      Alias                     LISTENER

      Version                   TNSLSNR for Linux: Version 11.2.0.1.0 - Production

      Start Date                20-MAR-2014 13:33:30

      Uptime                    0 days 13 hr. 59 min. 59 sec

      Trace Level               off

      Security                  ON: Local OS Authentication

      SNMP                      OFF

      Listener Parameter File   /u01/app/11.2.0/grid/network/admin/listener.ora

      Listener Log File         /u01/app/oracle/diag/tnslsnr/rac31/listener/alert/log.xml

      Listening Endpoints Summary...

        (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER)))

        (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.1.101)(PORT=1521)))

        (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.1.111)(PORT=1521)))

      Services Summary...

      Service "+ASM" has 1 instance(s).

        Instance "+ASM1", status READY, has 1 handler(s) for this service...

      Service "rac" has 1 instance(s).

        Instance "rac1", status READY, has 1 handler(s) for this service...

      Service "racXDB" has 1 instance(s).

        Instance "rac1", status READY, has 1 handler(s) for this service...

      The command completed successfully

       

       

       

       

      In my server in Oracle_HOME/network/admin

      This is my entry in tnsnames.ora

       

       

      RAC =

        (DESCRIPTION =

          (ADDRESS = (PROTOCOL = TCP)(HOST = rac-scan)(PORT = 1521))

          (CONNECT_DATA =

            (SERVER = DEDICATED)

            (SERVICE_NAME = rac)

          )

        )

       

       

       

       

      I am able to connect with the command

      sqlplus system/password@rac

       

       

      However when I give the same  entry on the client machine

      this does not work

      I am able to ping the host rac-scan successfully

       

       

      C:\Users\rgehi>ping rac-scan

       

       

      Pinging rac-scan.oracle.com [192.168.1.113] with 32 bytes of data:

      Reply from 192.168.1.113: bytes=32 time<1ms TTL=64

      Reply from 192.168.1.113: bytes=32 time<1ms TTL=64

      Reply from 192.168.1.113: bytes=32 time<1ms TTL=64

      Reply from 192.168.1.113: bytes=32 time<1ms TTL=64

       

       

      Ping statistics for 192.168.1.113:

          Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),

      Approximate round trip times in milli-seconds:

          Minimum = 0ms, Maximum = 0ms, Average = 0ms

       

       

       

       

       

       

      C:\Users\rgehi>sqlplus system/password@rac

       

       

      SQL*Plus: Release 12.1.0.1.0 Production on Fri Mar 21 03:40:53 2014

       

       

      Copyright (c) 1982, 2013, Oracle.  All rights reserved.

       

       

      ERROR:

      ORA-12545: Connect failed because target host or object does not exist

        • 1. Re: unable to connect with listener from client
          1809668

          Try with tnsping rac from your client machine and let me know the results.

           

          Also provide the result of nslookup rac-scan

          • 2. Re: unable to connect with listener from client
            Vandana B -Oracle

            Hi,

             

            Do you have multiple entries for rac-scan in /etc/hosts? If yes then remove all and just have the entry for IP 192.168.1.113 in /etc/hosts, if using /etc/hosts for scan

             

            Regards,

            Vandana - Oracle

            • 3. Re: unable to connect with listener from client
              deepak_kumar19

              Hi,

               

              Whats your Oracle Client version from where you are connecting?
              You also need to ensure that your /etc/hosts in UNIX or system32/drivers/etc/hosts in Windows has proper host entries and you are able to ping it through name and not by IP. Alternatively, use IP Address in tns entries instead of hostname.

               

              Thanks

              • 4. Re: unable to connect with listener from client
                r_g_financials_dba

                Hi Deepak

                 

                I am not pinging the host with ip address

                I am pinging host with the name and this is resolving to the correct ip address

                as seen below

                 

                 

                C:\Users\rgehi>ping rac-scan

                 

                 

                Pinging rac-scan.oracle.com [192.168.1.113] with 32 bytes of data:

                Reply from 192.168.1.113: bytes=32 time<1ms TTL=64

                Reply from 192.168.1.113: bytes=32 time<1ms TTL=64

                Reply from 192.168.1.113: bytes=32 time<1ms TTL=64

                Reply from 192.168.1.113: bytes=32 time<1ms TTL=64

                 

                 

                Ping statistics for 192.168.1.113:

                    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),

                Approximate round trip times in milli-seconds:

                    Minimum = 0ms, Maximum = 0ms, Average = 0ms

                • 5. Re: unable to connect with listener from client
                  r_g_financials_dba

                  Hi Deepak

                   

                  Here is the screen

                  SQL*Plus: Release 12.1.0.1.0 Production on Fri Mar 21 03:40:53 2014

                   

                  My server has Oracle version 11.2 and the client on the desktop has version 12.1.0.1.0

                  • 6. Re: unable to connect with listener from client
                    r_g_financials_dba

                    Hi Vandana

                     

                    No I do not have multiple entries in the /etc/hosts file on the server for rac-scan

                    and yes...I am not using DNS I am using the host file on the server

                    • 7. Re: unable to connect with listener from client
                      r_g_financials_dba

                      tnsping rac works fine

                      however nslookup rac-scan does not work

                      I guess this is because I am not using DNS server

                      but ping rac-scan does work fine.

                       

                      The desktop is a windows 7 machine and the system32/drivers/etc has the entry in this

                      192.168.1.113  rac-scan

                      • 8. Re: unable to connect with listener from client
                        BPeaslandDBA

                        Listening Endpoints Summary...

                          (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER)))

                          (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.1.101)(PORT=1521)))

                          (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.1.111)(PORT=1521)))


                        and


                        C:\Users\rgehi>ping rac-scan

                         

                        Pinging rac-scan.oracle.com [192.168.1.113] with 32 bytes of data:

                        Reply from 192.168.1.113: bytes=32 time<1ms TTL=64


                        Notice that your listener only has endpoitns on 192.168.1.101 and 111, not 113 as you are trying to ping. That is why you are getting the error. DNS is resolving a VIP that does not have the listener running.



                        Cheers,
                        Brian

                        • 9. Re: unable to connect with listener from client
                          r_g_financials_dba

                          Hi Brian...Thanks for helping

                           

                          The RAC installation is 11.2

                           

                          on the server I do the same thing

                           

                          ping rac-scan ...this resolves to 192.168.1.113

                           

                          tnsping rac

                          the entries are Host-name = rac-scan

                          service name = rac

                          tnsping is successfull

                           

                          next

                          sqlplus  system/password@rac

                           

                          I am connected.

                           

                           

                          what I am saying is that I do the exact same thing from the server and the desktop

                          but when I try this from the desktop...it fails at the stage of connecting thru sqlplus with  a message

                           

                          SQL*Plus: Release 12.1.0.1.0 Production on Fri Mar 21 03:40:53 2014

                           

                           

                          Copyright (c) 1982, 2013, Oracle.  All rights reserved.

                           

                           

                          ERROR:

                          ORA-12545: Connect failed because target host or object does not exist

                           


                          • 10. Re: unable to connect with listener from client
                            r_g_financials_dba

                            on server

                             

                             

                            cat tnsnames.ora

                             

                             

                            RAC =

                              (DESCRIPTION =

                                (ADDRESS = (PROTOCOL = TCP)(HOST = rac-scan)(PORT = 1521))

                                (CONNECT_DATA =

                                  (SERVER = DEDICATED)

                                  (SERVICE_NAME = rac)

                                )

                              )

                             

                             

                            ping rac-scan

                            PING rac-scan.oracle.com (192.168.1.113) 56(84) bytes of data.

                            64 bytes from rac-scan.oracle.com (192.168.1.113): icmp_seq=1 ttl=64 time=0.030 ms

                             

                             

                             

                             

                             

                             

                            tnsping rac

                             

                             

                            TNS Ping Utility for Linux: Version 11.2.0.1.0 - Production on 21-MAR-2014 17:24:43

                             

                             

                            Copyright (c) 1997, 2009, Oracle.  All rights reserved.

                             

                             

                            Used parameter files:

                             

                             

                             

                             

                            Used TNSNAMES adapter to resolve the alias

                            Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = rac-scan)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = rac)))

                            OK (0 msec)

                             

                             

                            sqlplus system/password@rac

                             

                             

                            SQL*Plus: Release 11.2.0.1.0 Production on Fri Mar 21 17:25:35 2014

                             

                             

                            Copyright (c) 1982, 2009, Oracle.  All rights reserved.

                             

                             

                             

                             

                            Connected to:

                            Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production

                            With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,

                            Data Mining and Real Application Testing options

                             

                             

                            SQL> select count(*) from dba_objects;

                             

                             

                              COUNT(*)

                            ----------

                                 72677

                             

                             

                             

                             

                             

                             

                            From client desktop

                            ====================

                             

                             

                            C:\Users\rgehi>ping rac-scan

                             

                             

                            Pinging rac-scan.oracle.com [192.168.1.113] with 32 bytes of data:

                            Reply from 192.168.1.113: bytes=32 time<1ms TTL=64

                            Reply from 192.168.1.113: bytes=32 time<1ms TTL=64

                            Reply from 192.168.1.113: bytes=32 time<1ms TTL=64

                            Reply from 192.168.1.113: bytes=32 time<1ms TTL=64

                             

                             

                            Ping statistics for 192.168.1.113:

                                Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),

                            Approximate round trip times in milli-seconds:

                                Minimum = 0ms, Maximum = 0ms, Average = 0ms

                             

                             

                            C:\Users\rgehi>tnsping rac

                             

                             

                            TNS Ping Utility for 64-bit Windows: Version 12.1.0.1.0 - Production on 21-MAR-2

                            014 17:26:53

                             

                             

                            Copyright (c) 1997, 2013, Oracle.  All rights reserved.

                             

                             

                            Used parameter files:

                            F:\app\client\rgehi\product\12.1.0\client_1\network\admin\sqlnet.ora

                             

                             

                             

                             

                            Used TNSNAMES adapter to resolve the alias

                            Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)

                            (HOST = rac-scan.oracle.com)(PORT = 1521))) (CONNECT_DATA = (SERVICE_NAME = rac)

                            ))

                            OK (10 msec)

                             

                             

                            C:\Users\rgehi>sqlplus system/password@rac

                             

                             

                            SQL*Plus: Release 12.1.0.1.0 Production on Fri Mar 21 17:27:10 2014

                             

                             

                            Copyright (c) 1982, 2013, Oracle.  All rights reserved.

                             

                             

                            ERROR:

                            ORA-12545: Connect failed because target host or object does not exist

                             

                             

                             

                             

                            Enter user-name:

                            • 11. Re: unable to connect with listener from client
                              Vandana B -Oracle

                              Hi,

                               

                              Try the following and check if all are working fine from client side

                               

                              sqlplus system/password@192.168.1.113:1521/rac

                              sqlplus system/password@192.168.1.101:1521/rac

                              sqlplus system/password@192.168.1.111:1521/rac


                              Regards,

                              Vandana - Oracle

                              • 12. Re: unable to connect with listener from client
                                r_g_financials_dba

                                Hi Vandana,

                                 

                                This is a setup at home.

                                This has got messed up and I am in the process of re-installing.

                                I shall reply to this posting in a few days.

                                • 13. Re: unable to connect with listener from client
                                  r_g_financials_dba

                                  Hi Vandana

                                   

                                   

                                  I have completed the reconfiguration of my rac system

                                  This system is at home for learning purposes.

                                  The rac has two nodes and does not use a DNS server

                                  It depends on the host file to resolve the rac-scan IP

                                   

                                   

                                  Your suggestion to use EZConnect to do the following

                                  a) test with Public IP of node 1....This worked fine

                                  b) test with VIP of node 1 ...This worked fine

                                  c) test with SCAN IP of the cluster....This works intermittently...

                                   

                                   

                                  Conclusion...Since we do not have a DNS server in our home environment...we are facing this issue.

                                   

                                   

                                  I think we shall not face similar issue on a production system.

                                  So let us consider this Question  as resolved

                                  • 14. Re: unable to connect with listener from client
                                    r_g_financials_dba

                                    I installed oracle client on my desktop

                                     

                                    and I made entries in the tnsnames file

                                     

                                    However when I connect to rac database with scan it works sometimes...

                                    not always....

                                     

                                    so I got into research mode and finally after many many moons and light years I found the following

                                     

                                    here is what I did

                                     

                                    #--scan

                                     

                                    192.168.0.127   rac31-scan.oracle.com   rac31-scan

                                    192.168.0.128   rac31-scan.oracle.com   rac31-scan

                                    192.168.0.129   rac31-scan.oracle.com   rac31-scan

                                    I put three ip addreses in the host file with the same name rac31-scan

                                    then I put the same ip addresses in my windows hosts file

                                    here are the entries

                                     

                                    192.168.0.127 rac31-scan.oracle.comrac31-scan

                                     

                                    192.168.0.128 rac31-scan.oracle.com rac31-scan

                                    192.168.0.129 rac31-scan.oracle.com rac31-scan

                                    but the tnsnames file in the client (windows 7 pc) has just one entry

                                    here it is

                                     

                                    rac1=

                                     

                                      (DESCRIPTION =

                                             (ADDRESS = (PROTOCOL = TCP)(HOST = rac31-scan)(PORT = 1521))

                                           (CONNECT_DATA =

                                    (SERVER = DEDICATED)

                                          (SERVICE_NAME = RAC)

                                         

                                        )

                                      )

                                    and now when I connect from the client...it connects without any issues.

                                     

                                    I have tried more than 10 attempts without problem

                                     

                                    BINGO !!!