12 Replies Latest reply: Jul 2, 2012 3:31 AM by Osama_Mustafa RSS

    Cannot connect service by SCAN listener on 11gR2 RAC

    Ted xu
      Hi experts,

      I have oracle 11gR2 RAC installed on two VirtualBox linux nodes, there is only one SCAN vip configured via the hosts file. After the RAC is up,
      there is a local listener named LISTENER running on each node and the SCAN listener named LISTENER_SCAN1 is started on one random node.
      Under LISTENER service, there is only one instance of that node registered while both instances are registered under LISTENER_SCAN1. So i think
      it is a better manner to connect the RAC through LISTENER_SCAN1.

      My problem now is i can connect the RAC through LISTENER, but I can't through LISTENER_SCAN1 with a connect timeout error is prompted.
      Looking forward to your reply, thanks.

      Ted
        • 1. Re: Cannot connect service by SCAN listener on 11gR2 RAC
          944700
          My problem now is i can connect the RAC through LISTENER, but I can't through LISTENER_SCAN1 with a connect timeout error is prompted.
          Looking forward to your reply, thanks.
          • 2. Re: Cannot connect service by SCAN listener on 11gR2 RAC
            hitgon
            please share the contents of below command from both the rac nodes

            srvctl status listener

            srvctl status scan_listener

            tnsnames.ora

            sqlplus username/password@rac-orcl-scan:1521/orcl
            Note: here rac-orcl-scan is the scan name
            • 3. Re: Cannot connect service by SCAN listener on 11gR2 RAC
              Ted xu
              Hi hitgon,

              Thanks first.

              The commands output are as the following:
              Command: srvctl status listener
              Output:
              # Listener LISTENER is enabled
              # Listener LISTENER is running on node(s): rac1,rac2

              Command: srvctl status scan_listener
              Output:
              # SCAN Listener LISTENER_SCAN1 is enabled
              # SCAN listener LISTENER_SCAN1 is running on node rac2

              # TNSNAMES.ORA
              RAC =
              (DESCRIPTION =
              (ADDRESS = (PROTOCOL = TCP)(HOST = rac-scan)(PORT = 1521))
              (CONNECT_DATA =
              (SERVER = DEDICATED)
              (SERVICE_NAME = rac.localdomain)
              )
              )

              Command: sqlplus username/passwd@rac-scan:1521/rac.localdomain
              Output:
              # ERROR:
              # ORA-12520: TNS:listener could not find available handler for requested type of server
              # Enter user-name:
              By the way, rac-scan is the host where the SCAN listener is running and rac.localdomain is the service name. I've also tried the following commands
              with the same error output:
              sqlplus username/passwd@RAC

              At last, i think the output of "lsnrctl status LISTENER_SCAN1" might help:
              Service "rac.localdomain" has 2 instance(s).
              Instance "rac1", status READY, has 1 handler(s) for this service...
              Instance "rac2", status READY, has 1 handler(s) for this service...
              Service "racXDB.localdomain" has 2 instance(s).
              Instance "rac1", status READY, has 1 handler(s) for this service...
              Instance "rac2", status READY, has 1 handler(s) for this service...
              • 4. Re: Cannot connect service by SCAN listener on 11gR2 RAC
                Ted xu
                Could anybody help? Appreciated much.
                • 5. Re: Cannot connect service by SCAN listener on 11gR2 RAC
                  onedbguru
                  How are the parameters local_listener and remote_listener configured.

                  Go through this document step-by-step to configure and connect to SCAN

                  http://www.google.com/url?sa=t&rct=j&q=oracle%20scan.pdf&source=web&cd=1&ved=0CFMQFjAA&url=http%3A%2F%2Fwww.oracle.com%2Ftechnetwork%2Fproducts%2Fclustering%2Foverview%2Fscan-129069.pdf&ei=4kjsT7TTC6uK6gHO3qiuBQ&usg=AFQjCNHqVYBvKaNIYfyeNHZAk4fYAu5I-Q&cad=rja

                  or google search for "oracle scan.pdf"

                  With SCAN, you can really screw up your environment when you try to mix the "old" way of configuring listener.ora, sqlnet.ora or tnsnames.ora. On most of my RAC clusters > 11.2. I do not even have a tnsnames.ora file. I also do not use a db_domain parameter and I make certain that the services parameter is empty on all nodes.

                  from the command line (sqlplus)

                  If you want an non-secure connect string use:

                  sqlplus username/password@rac-scan:1521/rac.localdomain

                  A more secure connect string:

                  sqlplus username@\"rac-scan:1521/rac.localdomain\"
                  password:
                  • 6. Re: Cannot connect service by SCAN listener on 11gR2 RAC
                    Ted xu
                    Hi onedbguru,

                    Thanks for your reply, it's a bit long waiting for me.

                    Regarding the DB listener parameter, local_listener is configured as the node-public/vip LISTENER while remote_listener
                    is configured as the scan listener. Is this ok?

                    I am reading the document in your post, hoping to find a clue there.

                    Ted
                    • 7. Re: Cannot connect service by SCAN listener on 11gR2 RAC
                      Ted xu
                      Hi onedbguru,

                      My RAC parameter listener is configured like this:
                      local_listener                       string      (DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER))))
                      remote_listener                      string      rac-scan:1521

                      According to scan.pdf, I checked my sqlnet.ora file whose configuration is list the following, is it fine?
                      NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)
                      ADR_BASE = /u01/app/oracle

                      And more, "tnsping RAC" succeeds on the node rac1, but "sqlplus demo02/demo02@RAC" failed with(RAC is an tnsname for the SCAN listener):
                      ORA-12520: TNS:listener could not find available handler for requested type of server

                      Thanks,
                      Ted

                      Edited by: Ted xu on 2012-6-28 下午7:49
                      • 8. Re: Cannot connect service by SCAN listener on 11gR2 RAC
                        940535
                        why not define the hostname, port number on "local_listener" parameter?

                        Edited by: 937532 on 2012/06/28 21:46
                        • 9. Re: Cannot connect service by SCAN listener on 11gR2 RAC
                          Ted xu
                          hi,

                          The configuration part "KEY=LISTENER" works here, hostname and port could both be figured out from it.

                          Thanks,
                          Ted
                          • 10. Re: Cannot connect service by SCAN listener on 11gR2 RAC
                            Osama_Mustafa
                            Did you try to connect via Application Or other tools ?
                            • 11. Re: Cannot connect service by SCAN listener on 11gR2 RAC
                              Ted xu
                              Yes, I tried to connect using PLSQL Developer. NO difference.
                              • 12. Re: Cannot connect service by SCAN listener on 11gR2 RAC
                                Osama_Mustafa
                                11gR2 Grid Infrastructure Single Client Access Name (SCAN) Explained [ID 887522.1]

                                Br
                                Osama ...