Home » Server Options » Data Guard » PING[ARCX]: Heartbeat failed to connect to standby 'XXX'. Error is 1034 (Oracle 11g)
PING[ARCX]: Heartbeat failed to connect to standby 'XXX'. Error is 1034 [message #655513] Thu, 01 September 2016 02:40 Go to next message
RenataS
Messages: 7
Registered: September 2016
Junior Member
Hello,

I'm new to oracle and for now i'm trying to configure data guard physical standby.
Seems my primary and standby databases cannot communicate properly (there are two servers in the same network)

I found the following error in alert logs on Primary database:
Thu Sep 01 03:14:25 2016
Error 1034 received logging on to the standby
PING[ARC3]: Heartbeat failed to connect to standby 'Standby'. Error is 1034.

tpsping is OK to both sides
I can connect from standby db to primary as sysdba, but cannot connect to standby from primary
ERROR:
ORA-01017: invalid username/password; logon denied

Do I understand correctly that if i can connect from standby to primary with the same account/password that i use when connection from primary to standby, the error is not related to password file?
Or please correct me
And if password file is not he reason, what can be checked/modified in my configuration?

Could please anyone advise me what to check or the direction where i can find the answer?
Re: PING[ARCX]: Heartbeat failed to connect to standby 'XXX'. Error is 1034 [message #655515 is a reply to message #655513] Thu, 01 September 2016 02:45 Go to previous messageGo to next message
John Watson
Messages: 8962
Registered: January 2010
Location: Global Village
Senior Member
Welcome to the forum. Please read our OraFAQ Forum Guide and How to use [code] tags and make your code easier to read

Can you show what you are doing to get this error? Use copy/paste, and [code] tags.
Usually this error is to do with the password file. In many releases/platforms, it is not good enough to set the same SYS password: you need to copy the password file from one machine to the other. Did you do that?
Re: PING[ARCX]: Heartbeat failed to connect to standby 'XXX'. Error is 1034 [message #655518 is a reply to message #655515] Thu, 01 September 2016 02:56 Go to previous messageGo to next message
RenataS
Messages: 7
Registered: September 2016
Junior Member
Hello,
Yes, i have created the password file on primary (orapwd file=$ORACLE_HOME/dbs/orapwPrimary password=mypassword force=y) and copied it to standby ($ORACLE_HOME/dbs).
remote_login_passwordfile was set to EXCLUSIVE
Re: PING[ARCX]: Heartbeat failed to connect to standby 'XXX'. Error is 1034 [message #655519 is a reply to message #655518] Thu, 01 September 2016 02:59 Go to previous messageGo to next message
John Watson
Messages: 8962
Registered: January 2010
Location: Global Village
Senior Member
Renata, clearly you made a mistake. If you don't show what you did, no-one can hep you to find it. You need to show how you created the password file, how you copied it, how you are connecting (or not Smile ) and (since you mentioned it) the tnspings.
Re: PING[ARCX]: Heartbeat failed to connect to standby 'XXX'. Error is 1034 [message #655520 is a reply to message #655519] Thu, 01 September 2016 03:19 Go to previous messageGo to next message
RenataS
Messages: 7
Registered: September 2016
Junior Member
Sorry, will provide everything I have done

I created password file with the use of command orapwd file=$ORACLE_HOME/dbs/orapwPrimary password=oracle_4U force=y
I copied it using the following:
scp orapwPrimary oracle@10.10.111.125:/u01/app/oracle/product/11.2.0.4/dbhome_1/dbs
oracle@10.10.111.125's password:
orapwPrimary 100% 1536 1.5KB/s 00:00

Then set the remote_login_passwordfile to EXCLUSIVE on both primary and standby

tnsping from Primary to standby:
tnsping Standby

TNS Ping Utility for Linux: Version 11.2.0.4.0 - Production on 01-SEP-2016 04:10:28

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

Used parameter files:


Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 10.10.111.125)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (UR = A) (SID = Primary)))
OK (0 msec)

tnsping from Standby to Primary:
tnsping Primary

TNS Ping Utility for Linux: Version 11.2.0.4.0 - Production on 01-SEP-2016 04:11:29

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

Used parameter files:


Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 10.10.111.132)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (UR = A) (SID = Primary)))
OK (0 msec)

When I try to connect to Primary from Standby:
SQL> connect sys/oracle_4U@Primary as sysdba
Connected.

When i try to connect to Standby:
SQL> connect sys/oracle_4U@Standby as sysdba
ERROR:
ORA-01017: invalid username/password; logon denied
Warning: You are no longer connected to ORACLE.

my TNSNAMES.ora:
PRIMARY =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.10.111.132)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(UR = A)
(SID = Primary)
# (SERVICE_NAME=primary)
)
)
STANDBY =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.10.111.125)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(UR = A)
(SID = Primary)
# (SERVICE_NAME=standby)
)
)

Is the same om Primary and Standby
Re: PING[ARCX]: Heartbeat failed to connect to standby 'XXX'. Error is 1034 [message #655521 is a reply to message #655520] Thu, 01 September 2016 03:23 Go to previous messageGo to next message
John Watson
Messages: 8962
Registered: January 2010
Location: Global Village
Senior Member
PLease use copy/paste to show what you are actually doing. And please use [code] tags to format the text correctly. Also, please run this query on both databases,
select * from v$pwfile_users

Re: PING[ARCX]: Heartbeat failed to connect to standby 'XXX'. Error is 1034 [message #655524 is a reply to message #655521] Thu, 01 September 2016 03:44 Go to previous messageGo to next message
RenataS
Messages: 7
Registered: September 2016
Junior Member
Sorry again
My bad
Embarassed
I've copied and pasted all commands that were done exactly with that syntax.
Also i modified the text to make it more comfortable for reading

I created password file with the use of command
 orapwd file=$ORACLE_HOME/dbs/orapwPrimary password=oracle_4U force=y 
I copied it using the following:
 scp orapwPrimary oracle@10.10.111.125:/u01/app/oracle/product/11.2.0.4/dbhome_1/dbs
oracle@10.10.111.125's password:
orapwPrimary 100% 1536 1.5KB/s 00:00
Then set the remote_login_passwordfile to EXCLUSIVE on both primary and standby

tnsping from Primary to standby:
 tnsping Standby

TNS Ping Utility for Linux: Version 11.2.0.4.0 - Production on 01-SEP-2016 04:10:28

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

Used parameter files:


Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 10.10.111.125)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (UR = A) (SID = Primary)))
OK (0 msec)
tnsping from Standby to Primary:
 tnsping Primary

TNS Ping Utility for Linux: Version 11.2.0.4.0 - Production on 01-SEP-2016 04:11:29

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

Used parameter files:


Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 10.10.111.132)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (UR = A) (SID = Primary)))
OK (0 msec)
When I try to connect to Primary from Standby:
 SQL> connect sys/oracle_4U@Primary as sysdba
Connected.
When i try to connect to Standby:
 SQL> connect sys/oracle_4U@Standby as sysdba
ERROR:
ORA-01017: invalid username/password; logon denied
Warning: You are no longer connected to ORACLE.
my TNSNAMES.ora:
PRIMARY =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.10.111.132)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(UR = A)
(SID = Primary)
# (SERVICE_NAME=primary)
)
)
STANDBY =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.10.111.125)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(UR = A)
(SID = Primary)
# (SERVICE_NAME=standby)
)
)
Is the same om Primary and Standby

query
 select * from v$pwfile_users; 
on both Primary and Standby:

 SQL> select * from v$pwfile_users;

USERNAME                       SYSDB SYSOP SYSAS
------------------------------ ----- ----- -----
SYS                            TRUE  TRUE  FALSE
Re: PING[ARCX]: Heartbeat failed to connect to standby 'XXX'. Error is 1034 [message #655526 is a reply to message #655524] Thu, 01 September 2016 04:02 Go to previous messageGo to next message
John Watson
Messages: 8962
Registered: January 2010
Location: Global Village
Senior Member
I realize that you are probably getting irritated by repeated requests for information. However, you need to show what you actually did, and what happened. For example:
$
$ orapwd file=$ORACLE_HOME/dbs/orapwPrimary password=oracle_4U force=y
$ ls -l $ORACLE_HOME/dbs/orapwPrimary
-rw-r----- 1 oracle oinstall 7680 Sep  1 04:59 /u01/app/oracle/product/12.1.0/dbhome_2/dbs/orapwPrimary
$
I'm off out now, perhaps someone else can assist.
Re: PING[ARCX]: Heartbeat failed to connect to standby 'XXX'. Error is 1034 [message #655532 is a reply to message #655526] Thu, 01 September 2016 04:45 Go to previous messageGo to next message
RenataS
Messages: 7
Registered: September 2016
Junior Member
OK, I undesrstand
Thank you John!
[oracle@primary dbs]$ orapwd file=orapwPrimary password=oracle entries=10 force=Y
[oracle@primary dbs]$ scp orapwPrimary oracle@10.10.111.125:/u01/app/oracle/product/11.2.0.4/dbhome_1/dbs
oracle@10.10.111.125's password:
orapwPrimary                                                                                 100% 2560     2.5KB/s   00:00
[oracle@primary dbs]$ ll
total 9544
-rw-rw----. 1 oracle oinstall    1544 Aug 31 09:09 hc_Primary.dat
-rw-r--r--. 1 oracle oinstall    2851 May 15  2009 init.ora
-rw-r-----. 1 oracle oinstall      24 Aug 30 05:30 lkPRIMARY
-rw-r-----. 1 oracle oinstall    2560 Aug 31 09:50 orapwPrimary
-rw-r-----. 1 oracle oinstall 9748480 Aug 30 06:56 snapcf_Primary.f
-rw-r-----. 1 oracle oinstall    4608 Aug 31 09:10 spfilePrimary.ora

SQL> ALTER SYSTEM SET REMOTE_LOGIN_PASSWORDFILE=EXCLUSIVE SCOPE=SPFILE;

System altered.

SQL> sho parameter remote_login_passwordfile

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
remote_login_passwordfile            string      EXCLUSIVE

[oracle@primary dbs]$ tnsping Standby

TNS Ping Utility for Linux: Version 11.2.0.4.0 - Production on 31-AUG-2016 10:20:39

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

Used parameter files:


Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 10.10.111.125)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (UR = A) (SID = Primary)))
OK (0 msec)

[oracle@standby admin]$ tnsping Primary

TNS Ping Utility for Linux: Version 11.2.0.4.0 - Production on 01-SEP-2016 05:45:00

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

Used parameter files:


Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 10.10.111.132)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (UR = A) (SID = Primary)))
OK (0 msec)

All other information is exactly from commandline
Re: PING[ARCX]: Heartbeat failed to connect to standby 'XXX'. Error is 1034 [message #655542 is a reply to message #655532] Thu, 01 September 2016 11:31 Go to previous messageGo to next message
John Watson
Messages: 8962
Registered: January 2010
Location: Global Village
Senior Member
Can you show your db_name, db_unique_name, and instance_name parameters at both sites? Having a mixed-case instance name, Primary, is a bit odd.
Then run lsnrctl status at each site, to see what service names and instance names are being registered.

Then delete the password files, and confirm by querying v$pwfile_users that the databases can no longer see their password files. That should prove that you are using the pw files that you think you are using.

Lastly, create a new one like this:
orapwd file=$ORACLE_HOME/dbs/orapwNAME_OF_THE_INSTANCE password=oracle entries=10 ignorecase=y
there have been problems reported with case sensitive passwords in release 11. And check that the files are visible is v$pwfile_users. And try again.




Re: PING[ARCX]: Heartbeat failed to connect to standby 'XXX'. Error is 1034 [message #655558 is a reply to message #655542] Fri, 02 September 2016 01:14 Go to previous messageGo to next message
RenataS
Messages: 7
Registered: September 2016
Junior Member
Hello John,
Parameters on my Primary:
SQL> sho parameter db_name

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
db_name                              string      Primary
SQL> sho parameter db_unique_name

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
db_unique_name                       string      Primary
SQL> sho parameter instance_name

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
instance_name                        string      Primary
Parameters on my standby:
SQL> sho parameter db_name

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
db_name                              string      Primary
SQL> sho parameter db_unique_name

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
db_unique_name                       string      Standby
SQL> sho parameter instance_name

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
instance_name                        string      Primary

Listener on Primary
[oracle@primary ~]$ lsnrctl status

LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 02-SEP-2016 01:47:48

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=10.10.111.132)(PORT=1521                                       )))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.4.0 - Production
Start Date                31-AUG-2016 05:05:12
Uptime                    1 days 20 hr. 42 min. 44 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/oracle/product/11.2.0.4/dbhome_1/network/admi                                       n/listener.ora
Listener Log File         /u01/app/oracle/diag/tnslsnr/primary/listener/alert/lo                                       g.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.10.111.132)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Services Summary...
Service "PRIMARY.WORLD" has 1 instance(s).
  Instance "Primary", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
Listener on Standby:
[oracle@standby ~]$ lsnrctl status

LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 02-SEP-2016 01:48:58

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=10.10.111.125)(PORT=1521          )))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.4.0 - Production
Start Date                30-AUG-2016 07:51:29
Uptime                    2 days 17 hr. 57 min. 40 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/oracle/product/11.2.0.4/dbhome_1/network/admi          n/listener.ora
Listener Log File         /u01/app/oracle/diag/tnslsnr/standby/listener/alert/lo          g.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.10.111.125)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Services Summary...
Service "PRIMARY.WORLD" has 1 instance(s).
  Instance "PRIMARY", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
On primary:
SQL> select * from v$pwfile_users;

USERNAME                       SYSDB SYSOP SYSAS
------------------------------ ----- ----- -----
SYS                            TRUE  TRUE  FALSE
on standby:
SQL> select * from v$pwfile_users;

USERNAME                       SYSDB SYSOP SYSAS
------------------------------ ----- ----- -----
SYS                            TRUE  TRUE  FALSE

I've deleted the password file on both sites and got the following output on Primary and Standby:
SQL> select * from v$pwfile_users;

no rows selected


Then created the password file again and copied it to standby:
[oracle@primary dbs]$ orapwd file=$ORACLE_HOME/dbs/orapwPrimary password=oracle entries=10 ignorecase=y
[oracle@primary dbs]$ ll
total 9544
-rw-rw----. 1 oracle oinstall    1544 Aug 31 09:09 hc_Primary.dat
-rw-r--r--. 1 oracle oinstall    2851 May 15  2009 init.ora
-rw-r-----. 1 oracle oinstall      24 Aug 30 05:30 lkPRIMARY
-rw-r-----. 1 oracle oinstall    2560 Sep  2 01:57 orapwPrimary
-rw-r-----. 1 oracle oinstall 9748480 Aug 30 06:56 snapcf_Primary.f
-rw-r-----. 1 oracle oinstall    4608 Aug 31 10:36 spfilePrimary.ora
[oracle@primary dbs]$ scp orapwPrimary oracle@10.10.111.125:/u01/app/oracle/product/11.2.0.4/dbhome_1/dbs
oracle@10.10.111.125's password:
orapwPrimary                                                                         100% 2560     2.5KB/s   00:00
[oracle@primary dbs]$
And now on both sites:
SQL> select * from v$pwfile_users;

USERNAME                       SYSDB SYSOP SYSAS
------------------------------ ----- ----- -----
SYS                            TRUE  TRUE  FALSE

The same issue
On Primary:
SQL> connect sys/oracle@Standby as sysdba
ERROR:
ORA-01017: invalid username/password; logon denied

on Standby:
SQL> connect sys/oracle@Primary as sysdba
Connected.
Re: PING[ARCX]: Heartbeat failed to connect to standby 'XXX'. Error is 1034 [message #655565 is a reply to message #655558] Fri, 02 September 2016 03:22 Go to previous messageGo to next message
John Watson
Messages: 8962
Registered: January 2010
Location: Global Village
Senior Member
I see some anomalies.
First, it appears that you have not configured your local_listener parameters correctly: the instances are not dynamically registering with their listeners. That needs to be corrected. On the primary, this:
alter system set local_listener='10.10.111.132:1521'
and the other address on the standby.

Second, your static registrations in the listeners' SID_LISTs are for services with a .world suffix. That was an old release 9 default. Get rid of it, and then adjust your tnsnames entries to connect to the service_name, not the SID. Eventually you'll need to add entries for the DGMGRL services too, so that you can use the Data Guard Broker.

Third, you need to check whether that .world domain is anywhere else, such as the db_domain parameter or the database global name or any database links, and if so get rid of it.

Possibly this will fix it. Possibly....

Re: PING[ARCX]: Heartbeat failed to connect to standby 'XXX'. Error is 1034 [message #655567 is a reply to message #655565] Fri, 02 September 2016 03:47 Go to previous messageGo to next message
RenataS
Messages: 7
Registered: September 2016
Junior Member
Thank you very much!!

After entering on primary
alter system set local_listener='10.10.111.132:1521';
And on standby
alter system set local_listener='10.10.111.125:1521';

connection between sites works fine!
SQL> connect sys/oracle@Standby as sysdba
Connected.

icon14.gif  Re: PING[ARCX]: Heartbeat failed to connect to standby 'XXX'. Error is 1034 [message #674154 is a reply to message #655567] Mon, 07 January 2019 06:34 Go to previous message
akbardba
Messages: 3
Registered: January 2019
Junior Member
Thanks a lot i was also facing the same problem after one week now i am able to sync my primary database to standby database. Shocked
Previous Topic: how to get sql plan in standby database
Next Topic: DATAGUARD SWITCHOVER_STATUS -------------------- NOT ALLOWED
Goto Forum:
  


Current Time: Sun Dec 22 22:50:42 CST 2024