7 Replies Latest reply: Nov 4, 2013 6:32 AM by EdStevens RSS

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

    504701
      Hey Guys,

      I know this particular query has been pinging around for ages now, but i cannot seem to get a good answer from anywhere :)

      Oracle 10g Database RAC installation- installed/ and running

      Oracle 10g Client on different box.
      -------------------------------------------------------------------------------------------------------
      Problem:
      -------------------------------------------------------------------------------------------------------
      [user@myserver ~]$ sqlplus

      SQL*Plus: Release 10.2.0.3.0 - Production on Fri Apr 4 16:14:11 2008

      Copyright (c) 1982, 2006, Oracle. All Rights Reserved.

      Enter user-name: user
      Enter password:
      ERROR:
      ORA-12545: Connect failed because target host or object does not exist
      -------------------------------------------------------------------------------------------------------
      All env variables are set in user .profile:
      -------------------------------------------------------------------------------------------------------
      export ORACLE_HOME=/space/oracle/oracle/product/10.2.0/client_1
      export ORACLE_SID=MSRAC

      PATH=$PATH:$ORACLE_HOME/bin:$JAVA_HOME/bin
      export PATH
      -------------------------------------------------------------------------------------------------------
      Full contents of tnsnames.ora on client machine:
      -------------------------------------------------------------------------------------------------------
      LISTENER_ORCLTELE =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 172.16.3.9)(PORT = 1521))


      ORCLTELE =
      (DESCRIPTION =
      (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 172.16.3.9)(PORT = 1521))
      )
      (CONNECT_DATA =
      (SERVICE_NAME = orcltele)
      )
      )

      EXTPROC_CONNECTION_DATA =
      (DESCRIPTION =
      (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC2))
      )
      (CONNECT_DATA =
      (SID = PLSExtProc)
      (PRESENTATION = RO)
      )
      )

      MSRAC =
      (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 172.16.3.12)(PORT = 1521))
      (ADDRESS = (PROTOCOL = TCP)(HOST = 172.16.3.13)(PORT = 1521))
      (LOAD_BALANCE = yes)
      (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = MSRAC)
      (failover_mode =
      (type=select)
      (method=basic)
      (retries=180)
      (delay=5))
      )
      )
      -------------------------------------------------------------------------------------------------------
      I am not sure if the first 3 connection entries are even needed in here, are they?
      The last entry is the connect info for the live database.
      -------------------------------------------------------------------------------------------------------

      What buggs me is that this works:

      [user@myserver ~]$ sqlplus 'user/user@msrac'

      SQL*Plus: Release 10.2.0.3.0 - Production on Fri Apr 4 16:19:40 2008

      Copyright (c) 1982, 2006, Oracle. All Rights Reserved.


      Connected to:
      Oracle Database 10g Release 10.2.0.3.0 - 64bit Production
      With the Real Application Clusters option

      SQL>quit
      -------------------------------------------------------------------------------------------------------



      BTW: This is the error catpured in sqlnet.log

      ***********************************************************************
      Fatal NI connect error 12545, connecting to:
      (DESCRIPTION=(ADDRESS=(PROTOCOL=beq)(PROGRAM=/space/oracle/oracle/product/10.2.0/client_1/bin/oracle)(ARGV0=oracleMSRAC)(ARGS='(DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))')(DETACH=NO))(CONNECT_DATA=(CID=(PROGRAM=sqlplus)(HOST=myserver.me.com)(USER=user))))

      VERSION INFORMATION:
      TNS for Linux: Version 10.2.0.3.0 - Production
      Oracle Bequeath NT Protocol Adapter for Linux: Version 10.2.0.3.0 - Production
      TCP/IP NT Protocol Adapter for Linux: Version 10.2.0.3.0 - Production
      Time: 04-APR-2008 16:14:16
      Tracing not turned on.
      Tns error struct:
      ns main err code: 12545
      TNS-12545: Connect failed because target host or object does not exist
      ns secondary err code: 12560
      nt main err code: 515
      TNS-00515: Connect failed because target host or object does not exist
      nt secondary err code: 2
      nt OS err code: 0


      I have a funny feeling that the problem lies with either:

      PROTOCOL=beq
      and/or
      ARGV0=oracleMSRAC

      I have tried everything to remedy this, this is why i am now turning to you guys.

      Any and all help is always greatly appreciated.

      Robert
        • 1. Re: ORA-12545: Connect failed because target host or object does not exist
          Madrid
          Verbatim from the error code manual:

          ORA-12545:     Connect failed because target host or object does not exist
          Cause:     The address specified is not valid, or the program being connected to does not exist.
          Action:     Ensure the ADDRESS parameters have been entered correctly; the most likely incorrect parameter is the node name. Ensure that the executable for the server exists (perhaps "oracle" is missing.) If the protocol is TCP/IP, edit the TNSNAMES.ORA file to change the host name to a numeric IP address and try again.

          In your case you have typed HOST=myserver.me.com, so make sure this myserver.me.com is reachable from your client where you attempted the connection and make sure this hostname exists. Since you are talking about a rac environment, make sure the tns entry is correctly spelled. In RAC environments the IP Address refers to the VIP, and the hostname which holds the VIP should be resolved by your local name resolution mechanism, just the same as a regular hostname. Or you can directly type the VIP address instead in your TNSNAMES entry.



          ~ Madrid

          http://hrivera99.blogspot.com/
          • 2. Re: ORA-12545: Connect failed because target host or object does not exist
            598389
            Robert,

            This is quite regular for RAC enabled databases ( Load balancing). You will encounter ORA-12545 very often when your load balancing is not setup properly.

            To do load balancing please refer to load balancing document.

            I can brief you here.

            1) You have to create LOCAL_LISTENER and REMOTE_LISTENER entries in your local tnsnames.ora for each node.

            2) update LOCAL_LISTENER and REMOTE_LISTENER parameters in your database.

            3) make sure your listener picks both services while doing

            lsnrctl services <Listener Name>

            Service1
            service2

            Hope it helps. Give me a shout back if you need anymore..
            • 3. Re: ORA-12545: Connect failed because target host or object does not exist
              504701
              Hi Guys,

              Thank you both for your responses, my findings are as follows:

              1. HOST=X.X.COM, ensure host is reachable : PING works and host(s) are reachable.
              2. In RAC Env, ensure TNS Name is correctly spelled, spelling fine, i can connect with the tns name (is TNS name same as SERVICE_NAME?) by: sqlplus 'user/user@racenv'; but my efforts still will not allow me to use:

              sqlplus 'user/user' it tells me that the host or object is does not exist, does this refer to the actual physical machine or the service name, or the instance name?


              All host entries in my tnsnames.ora file refer to the vip addresses of both servers holding the rac installation, and both are resolved just fine, testing with ping; any other way to test this?


              tnsnames file contains CONNECTION strings in the following order (does the listener entry need to be in the file? on the machine that i am trying to connect from?):

              LISTENER_ORCLTELE =
              (ADDRESS = (PROTOCOL = TCP)(HOST = 172.16.3.9)(PORT = 1521))


              ORCLTELE =
              (DESCRIPTION =
              (ADDRESS_LIST =
              (ADDRESS = (PROTOCOL = TCP)(HOST = 172.16.3.9)(PORT = 1521))
              )
              (CONNECT_DATA =
              (SERVICE_NAME = orcltele)
              )
              )

              EXTPROC_CONNECTION_DATA =
              (DESCRIPTION =
              (ADDRESS_LIST =
              (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC2))
              )
              (CONNECT_DATA =
              (SID = PLSExtProc)
              (PRESENTATION = RO)
              )
              )

              I tried removing all entries but the entry for MSRAC, but still no joy:

              MSRAC =
              (DESCRIPTION =
              (ADDRESS = (PROTOCOL = TCP)(HOST = 172.16.3.12)(PORT = 1521))
              (ADDRESS = (PROTOCOL = TCP)(HOST = 172.16.3.13)(PORT = 1521))
              (LOAD_BALANCE = yes)
              (CONNECT_DATA =
              (SERVER = DEDICATED)
              (SERVICE_NAME = MSRAC)
              (failover_mode =
              (type=select)
              (method=basic)
              (retries=180)
              (delay=5))
              )
              )


              Thanks again,
              Robert..



              In the sqlnet.log file the error is as follows:

              Fatal NI connect error 12545, connecting to:
              (DESCRIPTION=(ADDRESS=(PROTOCOL=beq)(PROGRAM=/space/oracle/oracle/product/10.2.0/client_1//bin/oracle)(ARGV0=oracleMSRAC)(ARGS='(DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))')(DETACH=NO))(CONNECT_DATA=(CID=(PROGRAM=sqlplus)(HOST=x.x.com)(USER=oracle))))

              VERSION INFORMATION:
              TNS for Linux: Version 10.2.0.3.0 - Production
              Oracle Bequeath NT Protocol Adapter for Linux: Version 10.2.0.3.0 - Production
              TCP/IP NT Protocol Adapter for Linux: Version 10.2.0.3.0 - Production
              Time: 07-APR-2008 11:03:12
              Tracing not turned on.
              Tns error struct:
              ns main err code: 12545
              TNS-12545: Connect failed because target host or object does not exist
              ns secondary err code: 12560
              nt main err code: 515
              TNS-00515: Connect failed because target host or object does not exist
              nt secondary err code: 2
              nt OS err code: 0


              It mentions PROTOCOL=BEQ, this should be TCP, is there a way to enforce TCP or disable BEQ??

              Rob

              Message was edited by:
              DobSun
              • 4. Re: ORA-12545: Connect failed because target host or object does not exist
                19426
                You see this error,while trying a bequeath connection (local connection bypassing the listener). But obviously
                (export ORACLE_HOME=/space/oracle/oracle/product/10.2.0/client_1
                export ORACLE_SID=MSRAC
                ) you don't invoke sqlplus from the SERVER home. When ORACLE_HOMEs are different, bequeath connection does not work. You have to use a listener connection, even when client and server homes are on the same machine.

                Werner
                • 5. Re: ORA-12545: Connect failed because target host or object does not exist
                  504701
                  Werner, your reply put us on the right track,

                  There is an enviroment variable that we did not set in the user profile:

                  TWO_TASK

                  http://www.idevelopment.info/data/Oracle/DBA_tips/Unix/UNIX_4.shtml


                  You must set this the the instance you want to connect to!

                  export TWO_TASK=XRAC

                  sqlplus 'user/user'

                  Works fine now.


                  Thanks to all who for your help and guidence,
                  As always it is greatly appreciated.

                  Robert
                  • 6. Re: ORA-12545: Connect failed because target host or object does not exist
                    user13151029

                    Thanks all

                    You were of great help for us!!!

                     

                    -Praveen

                    • 7. Re: ORA-12545: Connect failed because target host or object does not exist
                      EdStevens

                      user13151029 wrote:

                       

                      Thanks all

                      You were of great help for us!!!

                       

                      -Praveen

                      In the future please note the DATE of the message to which you are responding.  There is no value to the either the forum as a whole nor to the participants of a thread when you revive a thread that is over five years old, just to say 'thanks'.