cancel
Showing results for 
Search instead for 
Did you mean: 

How to catch information about incoming RFC_PING from sap to JCoServer

Former Member
0 Kudos

Hi,

I have a problem with stability of registered RFC server connections. Problem is know as [OSS note 1494757 - Improving stability of registered RFC server connections|https://websmp130.sap-ag.de/sap/support/notes/1494757].

In few words - Server working fine by some time and after that it stop receiving idok with no exception.

I have an idea how to resolve it.

I know that sap is sending ping to all registered program (default every 5 min), so if I can catch incoming ping I would be able to re-register program in case when ping won't income.

Problem is that I don't know how to catch infomation about those incomming ping in my java JCoServer.

Is it possible at all ? If yes, how to do this.

Thank for any help.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

If you use RfcInstallFunction to install "RFC_PING" you can catch it and do what you want with it in your server app. Assuming you're using RfcListen/RfcDispatch, at least.

Charles.

Former Member
0 Kudos

These pings are handled at a lower protocol layer and are not propagated to the appliaction. So this won't work.

I recommend to use JCo3 which is capable of pinging the SAP gateway. If there would be a connection problem, it would recognize this with a communication error at doing the ping and then reconnect to the gateway automatically.

Former Member
0 Kudos

Thx Stefan.

About JCo3. I use it. Exacly: IDoc API 3.0.4 and JCo API 3.0.5.

Can you show some example have to make this ?

Former Member
0 Kudos

I can only give the advice always to upgrade to the latest patch levels, which currently is JCo 3.0.6 and IDocLib 3.0.5.

If the issue persists with these patch levels I suggest to open an OSS-ticket at component BC-MID-CON-JCO for this.

Former Member
0 Kudos

<b>Stefan</b>, I gave my two cents on the problem in , but I'm kind of puzzled, when I tried a quick test. I've created a generic JCo server using JCo 3.0.6 64 bit (on Windows 7 64 bit) instance that registers one connection in SAP (PI 7.1 SP 😎 and set parameter <i>jco.cpic_keep_alive_period</i> to 60s. In SAP I have parameters gw/reg_keepalive as 300s (no parameter <em>gw/process_external_ping</em>, but I assumed per [OSS note 1332022 - Periodic pings of an external program to the gateway|https://service.sap.com/sap/support/notes/1332022] that this might not be required for 7.1?!).

I kind of expected per [OSS note 1494757 - Improving stability of registered RFC server connections|https://service.sap.com/sap/support/notes/1494757] that the JCo parameter jco.cpic_keep_alive_period results in pings from the external JCo server to the SAP gateway, whereas the SAP gateway parameter gw/reg_keepalive represents pings from the gateway to any registered RFC servers with the given frequencies.

However, with my simple JCo server example I see every two seconds network traffic between my (functionally complete idle) JCo server and the SAP gateway. I.e. on network level I see a TCP package going from my JCo server to the gateway (with PSH flag set, I guess to force the immediate acknowledgment) and a data package of 4 null bytes, followed by a NI_PONG and another null byte (so 12 bytes total).

The SAP gateway acknowledges those packages with a ACK TCP package without any data (and about 2s after the previous NIP_PONG went out the cycle starts again with a new NI_PONG).

Per SAP documentation I expected something along the line of a NI_PING/NI_PONG pair (e.g. see [NI keepalive|http://help.sap.com/saphelp_nw70/helpdata/en/6b/62efa1df4e4737a6914734a9e29bcb/frameset.htm]), but I didn't see any such request/response message. Furthermore, I don't understand why I see this constant activity every two seconds, per JCo and gateway parameters I thought the connection should be pretty much idle (as I'm just registering and not using the connection for sending any data from SAP to the JCo server and JCo 3.0.6 should honor the set frequency per [OSS note 1467969 - SAP Java Connector Release 3.0.6|https://service.sap.com/sap/support/notes/1467969]).

I tried varying the ping frequency set by JCo, but that didn't make any difference. Is my understanding of the functionality incorrect or am I making possibly some other silly mistake?