11 Replies Latest reply: Mar 21, 2014 6:26 AM by Vandana B -Oracle RSS

    problems with listener in 10g + 11gR2 RAC

    User511360-OC

      Hello, I keep on fighting with common use of 10g and 11g on my 2-node RAC, (RHEL Linux 5.10). I had 10g (10.2.0.5), now clusterware is upgraded to 11gR2 grid and then installed 11gR2 (11.2.0.4) in separate home. Now I could not connect to any of the database with error ORA-12514 ("TNS:listener does not currently know of service requested..."). Here is some output:

       

      $srvctl status listener

      Listener LISTENER is enabled

      Listener LISTENER is running on node(s): rac-1,rac-2

       

      $srvctl status scan_listener

      SCAN Listener LISTENER_SCAN1 is enabled

      SCAN listener LISTENER_SCAN1 is running on node rac-1

      SCAN Listener LISTENER_SCAN2 is enabled

      SCAN listener LISTENER_SCAN2 is running on node rac-2

      SCAN Listener LISTENER_SCAN3 is enabled

      SCAN listener LISTENER_SCAN3 is running on node rac-2

       

      $lsnrctl status

      LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 17-FEB-2014 18:02:13

      STATUS of the LISTENER
      ------------------------
      Alias                     LISTENER
      Version                   TNSLSNR for Linux: Version 11.2.0.4.0 - Production
      ...
      Listener Parameter File   /u02/grid/network/admin/listener.ora
      Listening Endpoints Summary...
        (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER)))
        (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC)))
        (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.1.223)(PORT=1521)))
        (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.1.225)(PORT=1521)))
      Services Summary...
      Service "+ASM" has 1 instance(s).
        Instance "+ASM1", status READY, has 1 handler(s) for this service...
      Service "10G" has 2 instance(s).
        Instance "10G1", status READY, has 2 handler(s) for this service...
        Instance "10G2", status READY, has 1 handler(s) for this service...
      Service "10GXDB" has 2 instance(s).
        Instance "10G1", status READY, has 1 handler(s) for this service...
        Instance "10G2", status READY, has 1 handler(s) for this service...
      Service "10G_XPT" has 2 instance(s).
        Instance "10G1", status READY, has 2 handler(s) for this service...
        Instance "10G2", status READY, has 1 handler(s) for this service...
      Service "11G" has 1 instance(s).
        Instance "11G1", status READY, has 1 handler(s) for this service...
      Service "11GXDB" has 1 instance(s).
        Instance "11G1", status READY, has 1 handler(s) for this service...

       


        • 1. Re: problems with listener in 10g + 11gR2 RAC
          Vandana B -Oracle

          Hi,

           

          How are you trying to connect to the databases? Is it via scan or node listener?

          Is your remote_listener and local_listener parameter set correctly in all your databases?

           

          Check if the following document is helpful if trying to connect via scan

           

          Ref: How to Troubleshoot Connectivity Issue with 11gR2 SCAN Name (Doc ID 975457.1)

           

          Regards,

          Vandana - Oracle

          • 2. Re: problems with listener in 10g + 11gR2 RAC
            User2121 - -Oracle

            please update the connect descriptor that you are using to connect

            • 3. Re: problems with listener in 10g + 11gR2 RAC
              User511360-OC

              Thank you for help. I don't understand, how must I connect, from my understanding when I connect to 10G db, I must use old tnsnames.ora record (so, does it mean "node listener"?) and when I connect to 11G db, I must use scan.

              So, I must add scan to tnsnames.ora? like this?:

              11G =

                (DESCRIPTION =

                  (ADDRESS = (PROTOCOL = TCP)(HOST = ora11.scan)(PORT = 1521))

                  (CONNECT_DATA =

                    (SERVICE_NAME = 11G)

               

              Or may I use scan for both 10G and 11G dbs ?

               

              Here is my local_ and remote_ listener config. For 10G db:

              ------------------------------------  ------------------------------
              remote_listener                      LISTENERS_10G
              ------------------------------------  ------------------------------
              local_listener                          LISTENER_10G1

               

              For 11G db:

              -----------------------------
              remote_listener                   ora11.scan:1521

              ------------------------------
              local_listener                       (ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1.225)(PORT=1521))

               

              Where 192.168.1.225 is a node's VIP address.

              • 4. Re: problems with listener in 10g + 11gR2 RAC
                cleavitt

                You don't HAVE to use scan to connect to 11G.  The old connect descriptors still work.  You might want to try the old method to narrow down the list of potential issues.

                 

                Are you able to ping "ora11.scan"?  What IP address do you get when you ping it?

                 

                Note that only one of your 11G instances has registered with the listener...

                 

                Service "11G" has 1 instance(s). 

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

                • 5. Re: problems with listener in 10g + 11gR2 RAC
                  User2121 - -Oracle

                  Hi,

                  I understood your issue

                  IN 10g code is not smart enough to understand scanname, you might have to give scan ip directly

                   

                  use the below doc to configure How to integrate a 10g/11gR1 RAC database with 11gR2 clusterware (SCAN) (Doc ID 1058646.1)

                  • 6. Re: problems with listener in 10g + 11gR2 RAC
                    User511360-OC

                    Thanks again for replies. I found a syntax error in client's tnsnames.ora - now could connect to 10G db "the old way" and also add my SCAN to the same tnsnames.ora - and now could connect to 11G.

                    Yes, I could ping ora11.scan, but it pings always only first address (I have three). I checked with Wireshark, when I use SCAN it also always connects to this first address, is it DNS problem or client problem?

                    I also re-read an Oracle Doc "How to integrate.. ( (Doc ID 1058646.1), is it for cases when there are only 10g/11gR1 db and 11gR2 grid ? My case is 10g db + 11gR2 db and 11gR2 grid.

                    In this case how must be a right listener's config ?

                    Is it generally something depends on client's version ? I probably have a client version 10 (Win 7)...

                    • 7. Re: problems with listener in 10g + 11gR2 RAC
                      User2121 - -Oracle

                      Hi,

                      You need not do anything with the listener configuration. just run the default node listener and scan listener that is installed

                      You have to do the changes at the db level for 10g DB(for remote and local_listener parameter) other than t his no change is required

                       

                      If you get any error while connecting paste the error. We will be happy to help you out

                      • 8. Re: problems with listener in 10g + 11gR2 RAC
                        User511360-OC

                        Well, OK. So, followed Doc ID 1058646.1, "How to integrate a 10g/11gR1 RAC database with 11gR2 clusterware":

                        1). Added LISTENERS_GRID to tnsnames.ora with my SCAN ip addresses

                         

                        2). Set remote_listener (local already exists):

                        alter system set remote_listener='LISTENERS_GRID' scope=spfile sid='*';

                         

                        3). "There should be a CRS service configured in the OCR for clients to connect this db", so, I did:

                        $srvctl add service -d 10G -s DB10G_SCAN -r 10G1,10G2           -then started it.

                        output:

                        $srvctl status service -d 10G

                        Service DB10G_SCAN is running on instance(s) 10G1, 10G2

                         

                        4). Added corresponding client connect string:

                        DB10G_VIA_SCAN =

                        ...my three scan adresses here...

                        (SERVICE_NAME = DB10G_SCAN)

                         

                        Result: when trying to connect to DB10G_VIA_SCAN, got an error: ORA-12545 Connect failed because target host or object does not exist

                         

                        Some outputs:

                        sqlplus scott/tiger@rac-1-vip:1521/DB10G_SCAN -OK

                        sqlplus scott/tiger@rac-2-vip:1521/DB10G_SCAN -OK

                        $srvctl status scan_listener - OK (3 listeners, LISTENER_SCAN1 -3)

                        $lsnrctl service  LISTENER_SCAN2

                        ...

                        Services Summary...

                        Service "DB10G_SCAN" has 2 instance(s).

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

                            Handler(s):

                              "DEDICATED" established:3 refused:0 state:ready

                                 REMOTE SERVER

                                 (ADDRESS=(PROTOCOL=TCP)(HOST=rac-1-vip)(PORT=1521))

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

                            Handler(s):

                              "DEDICATED" established:3 refused:0 state:ready

                                 REMOTE SERVER

                                 (ADDRESS=(PROTOCOL=TCP)(HOST=rac-2-vip)(PORT=1521))

                        ...

                         

                        ...

                         

                        Message was edited by: User511360-OC

                        • 9. Re: problems with listener in 10g + 11gR2 RAC
                          User2121 - -Oracle

                          Hi,

                          Please paste the entire connect string definition of DB10G_VIA_SCAN

                          Also paste the sqlplus command that you used

                          Also does lnsrctl status <scanlistener> shows the service on all the nodes for all the scan listener..?


                          ORA-12545 - means that the ip specified in the connect string is invalid or doesnot exists.

                          Make sure that ping of all the 3 scan ips and tnsping of scan connect descriptor works(for 3 consecutive times)



                          • 10. Re: problems with listener in 10g + 11gR2 RAC
                            User511360-OC

                            Hi, here is client's tnsnames.ora:

                            DB10G_VIA_SCAN =

                            (DESCRIPTION =

                                 (ADDRESS_LIST =

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

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

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

                                )

                                (LOAD_BALANCE = yes)

                                (CONNECT_DATA =

                                  (SERVER = DEDICATED)

                                  (SERVICE_NAME = DB10G_SCAN)

                                )

                             

                            Pings ant tnspings to these three addresses are OK.

                            I understood the nature of error ORA-12545: after connect to DB10G_VIA_SCAN it "resolves" to "rac-1-vip", but my workstation don't know this name (it isn't in /etc/hosts or anywhere).

                            By the way, I still could connect 'normal (old) way' without problem: scott/tiger@10G -ok.

                            • 11. Re: problems with listener in 10g + 11gR2 RAC
                              Vandana B -Oracle

                              Hi,

                               

                              Could you do the following and check to what all hostnames is the IP resolving to?

                               

                              nslookup 192.168.1.223

                              nslookup 192.168.1.225

                              nslookup rac-1-vip

                               

                              Regards,

                              Vandana - Oracle