Home » Server Options » RAC & Failsafe » ORA-12545: Connect failed because target host or object does not exist (oracle12c)
ORA-12545: Connect failed because target host or object does not exist [message #658913] Fri, 30 December 2016 13:27 Go to next message
shrinika
Messages: 283
Registered: April 2008
Senior Member
I am working on setting up two node RAC standby database. My primary database is two node RAC.

My primary database is up and running. As a first step, I am trying to connect the primary database
from standby first node through SCAN name.

[oracle@usbenhost03 admin]$ cat tnsnames.ora
usben1 =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = usbenpr-scan)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = usben.localdomain)
    )
  )
[oracle@usbenhost03 admin]$ sqlplus sys/passowrd@usben1 as sysdba

SQL*Plus: Release 12.1.0.2.0 Production on Fri Dec 30 14:17:53 2016

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

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


Enter user-name:



When i use public ip, i am able to connect.

[oracle@usbenhost03 admin]$ cat tnsnames.ora
usben1 =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.56.101)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = usben.localdomain)
    )
  )
[oracle@usbenhost03 admin]$ sqlplus sys/password@usben1 as sysdba

SQL*Plus: Release 12.1.0.2.0 Production on Fri Dec 30 14:19:53 2016

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


Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Advanced Analytics and Real Application Testing options

SQL>



What am i missing here?

I am not able to ping primary database scan name from standby node.

[oracle@usbenhost03 admin]$ ping usbenpr-scan
ping: unknown host usbenpr-scan
[oracle@usbenhost03 admin]$

I would be pleased if some one could provide some feedback. Thanks again!!!
Re: ORA-12545: Connect failed because target host or object does not exist [message #658914 is a reply to message #658913] Fri, 30 December 2016 13:34 Go to previous messageGo to next message
BlackSwan
Messages: 25719
Registered: January 2009
Location: SoCal
Senior Member
>I am not able to ping primary database scan name from standby node.
OS/Networking misconfiguration

issue OS command below

cat/ etc/hosts

COPY results from above then PASTE all back here
Re: ORA-12545: Connect failed because target host or object does not exist [message #658915 is a reply to message #658914] Fri, 30 December 2016 14:18 Go to previous messageGo to next message
shrinika
Messages: 283
Registered: April 2008
Senior Member
Thanks!

Standby first node :

[oracle@usbenhost03 admin]$ cat /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.56.201   usbenhost03.localdomain       usbenhost03
192.168.56.202   usbenhost04.localdomain       usbenhost04
192.168.1.201    usbenhost03-priv.localdomain  usbenhost03-priv
192.168.1.202    usbenhost04-priv.localdomain  usbenhost04-priv
192.168.56.203   usbenhost03-vip.localdomain   usbenhost03-vip
192.168.56.204   usbenhost04-vip.localdomain   usbenhost04-vip
192.168.56.205   usbendr-scan.localdomain  usbendr-scan
192.168.56.206   usbendr-scan.localdomain  usbendr-scan
192.168.56.207   usbendr-scan.localdomain  usbendr-scan
[oracle@usbenhost03 admin]$

standby second node :

[oracle@usbenhost04 ~]$ cat /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.56.201   usbenhost03.localdomain       usbenhost03
192.168.56.202   usbenhost04.localdomain       usbenhost04
192.168.1.201    usbenhost03-priv.localdomain  usbenhost03-priv
192.168.1.202    usbenhost04-priv.localdomain  usbenhost04-priv
192.168.56.203   usbenhost03-vip.localdomain   usbenhost03-vip
192.168.56.204   usbenhost04-vip.localdomain   usbenhost04-vip
192.168.56.205   usbendr-scan.localdomain  usbendr-scan
192.168.56.206   usbendr-scan.localdomain  usbendr-scan
192.168.56.207   usbendr-scan.localdomain  usbendr-scan
[oracle@usbenhost04 ~]$

Primary first node :

[oracle@usbenhost01 admin]$ cat /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.56.101   usbenhost01.localdomain         usbenhost01
192.168.56.102   usbenhost02.localdomain         usbenhost02
192.168.1.101    usbenhost01-priv.localdomain    usbenhost01-priv
192.168.1.102    usbenhost02-priv.localdomain    usbenhost02-priv
192.168.56.103   usbenhost01-vip.localdomain     usbenhost01-vip
192.168.56.104   usbenhost02-vip.localdomain     usbenhost02-vip
192.168.56.105   usbenpr-scan.localdomain    usbenpr-scan
192.168.56.106   usbenpr-scan.localdomain    usbenpr-scan
192.168.56.107   usbenpr-scan.localdomain    usbenpr-scan
[oracle@usbenhost01 admin]$

Primary second node :

[oracle@usbenhost02 ~]$ cat /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.56.101   usbenhost01.localdomain         usbenhost01
192.168.56.102   usbenhost02.localdomain         usbenhost02
192.168.1.101    usbenhost01-priv.localdomain    usbenhost01-priv
192.168.1.102    usbenhost02-priv.localdomain    usbenhost02-priv
192.168.56.103   usbenhost01-vip.localdomain     usbenhost01-vip
192.168.56.104   usbenhost02-vip.localdomain     usbenhost02-vip
192.168.56.105   usbenpr-scan.localdomain    usbenpr-scan
192.168.56.106   usbenpr-scan.localdomain    usbenpr-scan
192.168.56.107   usbenpr-scan.localdomain    usbenpr-scan
[oracle@usbenhost02 ~]$

Re: ORA-12545: Connect failed because target host or object does not exist [message #658918 is a reply to message #658915] Fri, 30 December 2016 15:28 Go to previous messageGo to next message
BlackSwan
Messages: 25719
Registered: January 2009
Location: SoCal
Senior Member
shrinika wrote on Fri, 30 December 2016 12:18
Thanks!

Standby first node :

[oracle@usbenhost03 admin]$ cat /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.56.201   usbenhost03.localdomain       usbenhost03
192.168.56.202   usbenhost04.localdomain       usbenhost04
192.168.1.201    usbenhost03-priv.localdomain  usbenhost03-priv
192.168.1.202    usbenhost04-priv.localdomain  usbenhost04-priv
192.168.56.203   usbenhost03-vip.localdomain   usbenhost03-vip
192.168.56.204   usbenhost04-vip.localdomain   usbenhost04-vip
192.168.56.205   usbendr-scan.localdomain  usbendr-scan
192.168.56.206   usbendr-scan.localdomain  usbendr-scan
192.168.56.207   usbendr-scan.localdomain  usbendr-scan
[oracle@usbenhost03 admin]$
using the above /etc/hosts file, to which IP# should hostname=usbenpr-scan resolve?

>[oracle@usbenhost03 admin]$ ping usbenpr-scan
Re: ORA-12545: Connect failed because target host or object does not exist [message #658923 is a reply to message #658915] Sat, 31 December 2016 01:08 Go to previous messageGo to next message
John Watson
Messages: 7150
Registered: January 2010
Location: Global Village
Senior Member
You need to sort out your name resolution. For example, this in your hosts file

192.168.56.205   usbendr-scan.localdomain  usbendr-scan
192.168.56.206   usbendr-scan.localdomain  usbendr-scan
192.168.56.207   usbendr-scan.localdomain  usbendr-scan

ain't gonna work: the hosts file cannot map one name to multiple addresses (if you don't believe me, read the RFC). If your sys admins have made a mistake like that, they have probably made several others. You should remove the node VIPs from the hosts files too, to be certain that you are using only DNS.

Then test your DNS name resolution. What do you get, on each node, from this:

dig usbendr-scan
dig usbenpr-scan
dig usbenhost01-vip
dig usbenhost02-vip
dig usbenhost03-vip
dig usbenhost04-vip

and repeat for the fully qualified names.

One more point that will make your life easier - use different host names. You have a bunch of names that differ by only one character. That is a recipe for confusion.

Re: ORA-12545: Connect failed because target host or object does not exist [message #658940 is a reply to message #658923] Sun, 01 January 2017 12:00 Go to previous messageGo to next message
shrinika
Messages: 283
Registered: April 2008
Senior Member
BlackSwan, Thanks for your response!

This is first time, i am configuring the RAC instance. Please help me here.

usbenpr-scan & usbendr-scan are scan name and it is using three ip address.

I checked my production database... scan name is not mapped in /etc/hosts file.

I think, i am missing some thing here..



Re: ORA-12545: Connect failed because target host or object does not exist [message #658942 is a reply to message #658940] Sun, 01 January 2017 12:13 Go to previous messageGo to next message
shrinika
Messages: 283
Registered: April 2008
Senior Member
John Watson, thanks for your response!

ok. i removed the below entry in /etc/hosts

192.168.56.205   usbendr-scan.localdomain  usbendr-scan
192.168.56.206   usbendr-scan.localdomain  usbendr-scan
192.168.56.207   usbendr-scan.localdomain  usbendr-scan

Here is the output...

[root@usbenhost03 etc]# dig usbendr-scan

; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.17.rc1.0.2.el6 <<>> usbendr-scan
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 65206
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 3, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;usbendr-scan.                  IN      A

;; ANSWER SECTION:
usbendr-scan.           0       IN      A       192.168.56.206
usbendr-scan.           0       IN      A       192.168.56.207
usbendr-scan.           0       IN      A       192.168.56.205

;; Query time: 3 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Sun Jan  1 13:10:21 2017
;; MSG SIZE  rcvd: 78

[root@usbenhost03 etc]#


[root@usbenhost03 etc]# dig usbenpr-scan

; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.17.rc1.0.2.el6 <<>> usbenpr-scan
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: REFUSED, id: 52264
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;usbenpr-scan.                  IN      A

;; Query time: 2 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Sun Jan  1 13:11:05 2017
;; MSG SIZE  rcvd: 30

[root@usbenhost03 etc]#



[root@usbenhost03 etc]# dig usbenhost01-vip

; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.17.rc1.0.2.el6 <<>> usbenhost01-vip
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: REFUSED, id: 37617
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;usbenhost01-vip.               IN      A

;; Query time: 1 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Sun Jan  1 13:11:26 2017
;; MSG SIZE  rcvd: 33

[root@usbenhost03 etc]#



[root@usbenhost03 etc]# dig usbenhost02-vip

; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.17.rc1.0.2.el6 <<>> usbenhost02-vip
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: REFUSED, id: 64050
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;usbenhost02-vip.               IN      A

;; Query time: 3 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Sun Jan  1 13:11:56 2017
;; MSG SIZE  rcvd: 33

[root@usbenhost03 etc]#


[root@usbenhost03 etc]# dig usbenhost03-vip

; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.17.rc1.0.2.el6 <<>> usbenhost03-vip
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 8813
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;usbenhost03-vip.               IN      A

;; ANSWER SECTION:
usbenhost03-vip.        0       IN      A       192.168.56.203

;; Query time: 5 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Sun Jan  1 13:12:20 2017
;; MSG SIZE  rcvd: 49

[root@usbenhost03 etc]#


[root@usbenhost03 etc]# dig usbenhost04-vip

; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.17.rc1.0.2.el6 <<>> usbenhost04-vip
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 31845
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;usbenhost04-vip.               IN      A

;; ANSWER SECTION:
usbenhost04-vip.        0       IN      A       192.168.56.204

;; Query time: 4 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Sun Jan  1 13:12:47 2017
;; MSG SIZE  rcvd: 49

[root@usbenhost03 etc]#



Re: ORA-12545: Connect failed because target host or object does not exist [message #658943 is a reply to message #658942] Sun, 01 January 2017 12:14 Go to previous messageGo to next message
shrinika
Messages: 283
Registered: April 2008
Senior Member
This is my home computer and these are virtual machine. I am the admin as well as DBA.. Smile

I guess i am missing some thing here..

In my production database, i am able to ping the scan name from standby database...

I am not sure what i am missing here.
Re: ORA-12545: Connect failed because target host or object does not exist [message #658947 is a reply to message #658943] Sun, 01 January 2017 14:04 Go to previous messageGo to next message
John Watson
Messages: 7150
Registered: January 2010
Location: Global Village
Senior Member
shrinika wrote on Sun, 01 January 2017 18:14
This is my home computer and these are virtual machine. I am the admin as well as DBA.. Smile

I guess i am missing some thing here..

In my production database, i am able to ping the scan name from standby database...

I am not sure what i am missing here.
Yes, you are missing something: you haven't configured your DNS correctly. The dig output is pretty clear, isn't it?
Re: ORA-12545: Connect failed because target host or object does not exist [message #658950 is a reply to message #658947] Sun, 01 January 2017 20:36 Go to previous messageGo to next message
shrinika
Messages: 283
Registered: April 2008
Senior Member
Yes.. John, Do you have any direction on this issue?

Re: ORA-12545: Connect failed because target host or object does not exist [message #658952 is a reply to message #658950] Mon, 02 January 2017 00:51 Go to previous messageGo to next message
John Watson
Messages: 7150
Registered: January 2010
Location: Global Village
Senior Member
It is beginning to look as though you are trolling: being deliberately stupid, in an attempt to make people angry.
However, I shall be charitable and assume that you are actually, not deliberately, stupid.

Your first post showed that the name usben-pr does not resolve. You then proved that this name does not exist in your DNS, and neither do usbenhost01-vip or usbenhost02-vip. I then told you that you need to configure your DNS correctly. The "direction" is clear: add those names and addresses to your DNS.



Re: ORA-12545: Connect failed because target host or object does not exist [message #659001 is a reply to message #658952] Tue, 03 January 2017 10:44 Go to previous message
shrinika
Messages: 283
Registered: April 2008
Senior Member
Thanks John. I will look at the DNS configuration.

It is beginning to look as though you are trolling: being deliberately stupid, in an attempt to make people angry.

I am not sure what you mean.. What am i making people angry?
Previous Topic: How to add RAC second instance in OCR?
Next Topic: Oracle 12.1.0.2.0 GI Installation for Cluster fails on 2nd Node
Goto Forum:
  


Current Time: Wed Nov 22 21:46:07 CST 2017

Total time taken to generate the page: 0.06569 seconds