SAP Knowledge Base Article - Preview

1852017 - Error rc=10061 when connecting SAP Instances to failed over SAP HANA nodes

Symptom

After a failover of the master node was done, SAP application servers are no longer able to connect to the database. The trace files of the work processes contain the following error:

C  Loading SQLDBC client runtime ...
C  SQLDBC Module  : D:\usr\sap\TST\hdbclient\libSQLDBCHDB.dll
C  SQLDBC Runtime : libSQLDBCHDB 1.00.52 Build 0374886-1510
C  SQLDBC client runtime is 1.00.52.0374886

C  Try to connect via secure store (DEFAULT) on connection 0 ...

C Mon Apr 18 12:08:02 2013
C  *** ERROR => Connect to database failed, rc=1, rcSQL=-10709 (Connection failed (RTE:[89006] System call 'connect' failed, rc=10061:No connection could be made because the target machine actively refused it))
 [dbhdbsql.cpp 353]
B  ***LOG BV3=> severe db error -10709    ; work process is stopped [dbsh         1241]
B  ***LOG BY2=> sql error -10709 performing CON [dblink       544]
B  ***LOG BY0=> Connection failed (RTE:[89006] System call 'connect' failed, rc=10061:No connection could be made because the target machine actively refused it) [dblink       544]
M  ***LOG R19=> ThInit, db_connect ( DB-Connect 000256) [thxxhead.c   1483]
M  in_ThErrHandle: 1
M  *** ERROR => ThInit: db_connect (step 1, th_errno 13, action 3, level 1) [thxxhead.c   11334]

An SQLDBC trace would show the same error, but additionally also the hostname to which the workprocess tried to connect is displayed:

HOST LIST: node1:33315,
CONNECT TO: node1:33315
>PhysicalConnection::open
>PhysicalConnection::getConnectionURL
FIRST CONNECTION TO SERVER node1:33315
TCP/IP CONNECT DONE TO: node1:33315
tmpurl=ngdb:remote://node1:33315/?APPLICATION=CPC&COMPLETEARRAYEXECUTION=1&CONNECTTYPE=OLTP&
       DATAFORMATSUPPORT=1&DISTRIBUTION=STATEMENT&ISOLATIONLEVEL=0&KEY=DEFAULT&LARGENUMBEROFPARAMETERSUPPORT=1&
    OPTIMIZEDSTREAMS=1&PACKETSIZE=1048576&RECONNECT=1&SQLMODE=SAPR3&STATEMENTCACHESIZE=0&TIMEOUT=0&
    UNICODE=1&VARCHARMODE=ABAP
<=SQLDBC_OK
>Error::setRuntimeError
error=43
SQL ERROR  :
  SQLCODE  : -10709
  MESSAGE  : Connection failed (RTE:[89006] System call 'connect' failed, rc=10061:No connection could be made because the target machine actively refused it)

Hostname node1 is the former master node that is no longer running but has failed over to node2. An SQLDBC trace can be activated using the following commands:

hdbsqldbc_cons config trace filename C:\temp\SQLDBC_%p.log
hdbsqldbc_cons trace sql on
hdbsqldbc_cons trace packet on
hdbsqldbc_cons trace debug on

Command 'hdbsqldbc_cons trace off' can be used to switch off the trace again. In case of Windows systems, the following steps have to be taken into consideration:

  1. The SAP workprocesses are running under the account of the SAPService<SID> user. In many installations, explicit logon with this user has been disabled. In order to nevertheless trace what the workprocesses are doing, the username of this service user has to be passed to hdbsqldbc_cons:

         hdbuserstore -u <domain>\SAPService<SID>
     
  2. The SAPService<SiD> user might not have the authorization to write into all directories the <sid>adm has access to. Consequently, whenever the trace has been activated for the SAPService<SID> user and no trace files have been created, this user is most likely missing the required authorizations. In order to avoid this, the work directory of the SAP instance can be specified as trace directory:
     
         hdbsqldbc_cons -u <domain>\SAPService<SID> config trace filename<DRIVE>:\usr\sap\<SID>\DVEBMGS<xx>\work\SQLDBC_%p.log


Read more...

Environment

SAP HANA, platform edition

Product

SAP HANA, platform edition all versions

Keywords

Scale Out; Failover; master node; userstore; hostnames; standby nodes; user <sid>adm; SAPService<SID>; 10061; No connection could be made because the target machine actively refused it; hdbuserstore; hdbuserstore SET DEFAULT; , KBA , HAN-DB-CLI , SAP HANA Clients (JDBC, ODBC) , HAN-DB-SEC , SAP HANA Security & User Management , HAN-DB-HA , SAP HANA High Availability (System Replication, DR, etc.) , Problem

About this page

This is a preview of a SAP Knowledge Base Article. Click more to access the full version on SAP for Me (Login required).

Search for additional results

Visit SAP Support Portal's SAP Notes and KBA Search.