Registration

Dear SAP Community Member,
In order to fully benefit from what the SAP Community has to offer, please register at:
http://scn.sap.com
Thank you,
The SAP Community team.
Skip to end of metadata
Go to start of metadata

 

When analyse RFC connection issue, the first thing we need to be clear is, what is RFC client, what is RFC server, what is communication type between RFC client and RFC server.

For SAPXPG_DBDEST_<SAPDBHOST>  RFC:

RFC client is the application server(the AP server where calling the RFC destination) gateway.
RFC server is SAPXPG.
Depends on configurations, there are two communication types between RFC client and RFC server and the communication process are as below:

1) The OS rsh or ssh (<SID>adm user or SAPService<SID>) 
     => client(AP server gateway) <=> OS rsh or ssh under <SID>adm user or SAPService<SID> <=> SAPXPG on target DB server
2) Gateway connect to remote Gateway
     => client(AP server gateway) <=> remote connect to DB server standalone gateway <=> SAPXPG on target DB server

if there is no "Gateway Options" settings in the RFC destination, the communication between RFC client and RFC server is "OS rsh or ssh".
if you set standalone gateway in "Gateway Options" of the RFC destination, then the communication between RFC client and RFC server is "Gateway connect to remote Gateway".

 

Basically, The root cause could be at RFC client - AP server gateway side, RFC server - SAPXPG on target DB server, communication type and network issue.
So, for SAPXPG_DBDEST_<SAPDBHOST> RFC is not working issue, normally, depending on configuration, you could troubleshooting it as below.

if the communication type between RFC client and RFC server is OS rsh or ssh(default setting):
Check if the communication between RFC client and RFC server is ok:

You can verify the communication by executing: 
SAPGUI logon the AP server -> SE38 -> RSBDCOS0 and execute following command for testing.
/usr/bin/ssh <target DB server which you defined in SAPXPG_DBDEST_<SAPDBHOST>> -l <SID>ADM hostname

The command means, connecting to target DB server by using ssh under <SID>ADM and executing hostname command.
if the command runs successfully(you got hostname of target DB server), you can come to the conclusion that OS rsh or ssh from RFC client to RFC server is OK.
otherwise, You need to involve your OS admin, make sure that the rsh or ssh for <SID>adm user or SAPService<SID> is working between local host and target executed host. You can also check out 2312909 - How to setup SSH for DB13 in standalone Oracle database KBA to setup SSH for Linux OS.

Check if the RFC server SAPXPG on target DB server is ok:

You can verify if there is any problem of SAPXPG on target DB server by executing:
SAPGUI logon the AP server -> SE38 -> RSBDCOS0 and execute following command for testing
/usr/bin/ssh <target DB server which you defined in SAPXPG_DBDEST_<SAPDBHOST>> -l <SID>ADM sapxpg -s -stdout n hostname

The command means, connecting to target DB server by using ssh under <SID>ADM and executing hostname command via sapxpg program.
if the command runs successfully(you got hostname of target DB server), you can come to the conclusion that OS rsh or ssh from RFC client to RFC server is OK and RFC server sapxpg itself has no problem..

if the command runs failed, you should check if sapxpg can be found from anyway under sidadm user on target DB server. In rare cases, sapxpg itself has problem, then you can try to replace sapxpg.

Check if the RFC client(the AP server where calling the RFC destination) is OK:

If the SM59 SAPXPG_DBDEST_<SAPDBHOST> RFC connection test fails with "ERROR: No storage allocation available", the root cause is secinfo settings on the application server where the SAPXPG_DBDEST_<SAPDBHOST> destination does not work. You need to adjust the secinfo rules or just disable it by setting parameter gw/acl_mode=0 in the instance profile if you do not need gateway security features at all to fix the error. See SAP Notes 1408081 for more info.

Another possibility is, your kernel >= 7.40 and the gateway service(sapgwXX) is unknown at operating system level on the target host.

you can check it by SAPGUI logging on the AP server -> SE38 -> RSBDCOS0 and executing following command:
/usr/bin/ssh <target DB server which you defined in SAPXPG_DBDEST_<SAPDBHOST>> -l <SID>ADM niping -v -H <target DB server which you defined in SAPXPG_DBDEST_<SAPDBHOST>> -S sapgwXX
for details, please refer to 2052365 - RFC destination SAPXPG_DBDEST_<DB-HOST> no longer works

Check if the network is ok:

In many cases, this RFC test fails because of incorrect hostname resolution between the application server and the target database server.
Since network connection is a two-ways communication, That means, the connection from local AP server to target DB server is OK AND the connection from target DB server to AP server must be also OK.

Basically, you can verify the network settings by executing:

SAPGUI logon the AP server -> SE38 -> RSBDCOS0 and execute following command for testing
niping -v -H <target DB server which you defined in SAPXPG_DBDEST_<SAPDBHOST>>

logon <target DB server which you defined in SAPXPG_DBDEST_<SAPDBHOST>> OS level and execute following command:
niping -v -H <RFC client AP server host >

Both of the two commands above should be OK. otherwise, you should involve your network admin, make sure that the network connection from local AP server to target DB server is OK AND the connection from target DB server to AP server is OK too.


if the communication type between RFC client and RFC server is "Gateway connect to remote Gateway"(a standalone gateway is installed on target DB host and you configure in "Gateway Options" of the RFC destination):
We recommend you to install a standalone gateway on target DB host and configure it in "Gateway Options" of the RFC destination, because "Gateway connect to remote Gateway" is implemented in SAP software, it is secure and there should be no problem in the communication. the problem is less, basically, you can troubleshooting it as below:
Check if the RFC server SAPXPG on target DB server is ok:

logon <target DB server which you defined in SAPXPG_DBDEST_<SAPDBHOST>> OS level by <SID>ADM user and execute following command:
sapxpg -s -stdout n hostname

Check if the root cause is at standalone gateway side:

basically, you should logon <target DB server which you defined in SAPXPG_DBDEST_<SAPDBHOST>> OS level(standalone gateway host) and check standalone gateway trace log(dev_rd).

 

 

Related SAP notes:
980266 - RFC destination SAPXPG_DBDEST_<DB-HOST> does not work
2052365 - RFC destination SAPXPG_DBDEST_<DB-HOST> no longer works
2132535 - RFC Destination fails #No storage allocation available#
2137321 - DB13 jobs  failed due to connected to wrong SAPXPG_DBDEST_<SAPDBHOST> or DB hos