cancel
Showing results for 
Search instead for 
Did you mean: 

JCoIDocServer timeout

Former Member
0 Kudos

Hi

I have a problem with JCoIDocServer.

I have java application to sending and reciving documents from sap system.

Is's use com.sap.conn.idoc.jco.JCoIDocServer to reciving.

Everything work fine but after few hours application stop working.

We can still send documents but we can't recive them.

I think it's a configuration problem but I can't find way to resolve it.

I sap I got "program TEST_Z02 not registered".

Thanks for any help.

Edited by: InfSyzrk on Oct 19, 2010 8:45 AM

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

The problem you describe happens sometimes in landscapes where the RFC server program is "far" from the SAP gateway where it's registered: Here the connection might get terminated (e.g. by firewall in between) and depending on how that's done the RFC server program might be unaware that the TCP/IP connection is no longer present (otherwise the automatic restart mechanism would kick in, where the JCo server program would try to re-register).

Please have a look at [OSS note 1494757 - Improving stability of registered RFC server connections|https://service.sap.com/sap/support/notes/1494757], which describes the scenario in more detail and what can be done - it might be applicable in your case.

Former Member
0 Kudos

Thank you Harald. Now I know what is going on at least.

Now I know that the "control info" I have written about in my last post is PING from SAP to my java server. SAP send it every 5min (default). Bad information is that I still don't know how to catch this PING in my java server application.

I have set:

jco.cpic_keep_alive_period=60

jco.cpic_keep_alive_timeout=5

but I'm still not able to catch information that SAP stop sending PING.

Do anyone know how to catch PING from SAP in java JCo server ?

Former Member
0 Kudos

I can't quite follow what you're trying to accomplish (why you'd want to <em>catch PING from SAP in java JCo server</em>). Maybe I've misunderstood your problem, so let me try to summarize it: You have a JCo server program that seems to suffer from stale connections after some time. On JCo server side the program thinks it's still registered in SAP and everything is fine, whereas the SAP system knows that the connection is broken.

As far as restarting the server is concerned, this is already an existing automated feature in the JCo server. If the connection is lost (note though that the JCo server needs to know/notice this) it will automatically try to restart after one second. If this is not successful (e.g. SAP gateway cannot be reached), it will try again after two seconds and double the wait time on each following unsuccessful connection attempt (see comments on static final field JCO_MAX_STARTUP_DELAY in interface ServerDataProvider or for a more generic description [OSS note 1125101 - JCo RFC Provider Service startup sequence failure|https://service.sap.com/sap/support/notes/1125101]).

Per parameter jco.server.max_startup_delay (or jco.middleware.max_startup_delay if you didn't specify one for your server, default is 3600s) you limit the maximum wait time between restart attempts. The server will keep trying to restart until it was successful, but the time between two restart attempts is limited by those parameters. [OSS note 1467969 - SAP Java Connector Release 3.0.6|https://service.sap.com/sap/support/notes/1467969] indicates though that there were issues with those configuration parameters before 3.0.6 (see point 7.).

So usually there's no point in trying to program automated server restart logic, because it's already a built-in JCo feature.

Now [OSS note 1494757 - Improving stability of registered RFC server connections|https://service.sap.com/sap/support/notes/1494757] described how you can set the parameter jco.cpic_keep_alive_period to initiate regular pings. [Note 1332022 - Periodic pings of an external program to the gateway|https://service.sap.com/sap/support/notes/1332022] describes some prerequisites. Basically the regular pings are supposed to keep the network connection alive and thus to prevent the server from having to restart (which would also recognize that the server knows that the connection is actually broken and no longer exists). Alternatively you could also consider installing a standalone SAP gateway on your server running the JCo server program as pointed out in [OSS note 1494757|https://service.sap.com/sap/support/notes/1494757]...

Former Member
0 Kudos

I have changed my lib. Now I'm using:

JCo API: 3.0.6

IDoc API: 3.0.4

Problem is still there.

Former Member
0 Kudos

Post moved to [;

Former Member
0 Kudos

Hi,

Because I cant find solution I have another question.

I have check on my firewall that every 5min SAP send somethink to my java JCO server (mabey some "control info") but when I get "program TEST_Z02 unregistered" error in sap, nothing happen on firewall also.

I tried to catch this "control info" in my java program using JCoIDocServer.getMonitor().getConnectionsData().get(0).getLastActivityTimestamp() but this value only change when I receive some idok from sap. Do anyone know how to get information about this "control info" ? If I could get it would be able to checking last activity time and restart connection if need.

Former Member
0 Kudos

Any others idea about JCoIDocServer timeout ?

Former Member
0 Kudos

Mabey anyone know how to check if program is registered in sap. How to check it using java com.sap.conn...

Former Member
0 Kudos

Tcode SMGW>Goto>Logged on clients will give you the list of registered programs in SAP and you will find an entry of yours Idocserver there in.

Java side,you have to check it in Visual admin >services>JCO RFC provider -->right side you will find the list of programs id's registered and they have an icon of Man running,which means that it is started.

Hope this helps

Former Member
0 Kudos

But have to check it using com.sap.conn.idoc.jco.JCoIDocServer or others java class ?

Former Member
0 Kudos

Hi,

Please make sure SLD is in active state & SLD connection is in Green status.

Go to visual adminitrator>server>services-->Jco Destination and check whether the program is registered. if not, add it manually

Transaction code SLDCHECK gives you the connection status.

Below linke might help you.

http://help.sap.com/saphelp_nw04s/helpdata/en/9b/da0f41026df223e10000000a155106/frameset.htm

Regards

Nagaraju

Edited by: MYLAVARAPUNAGARAJU on Oct 19, 2010 4:40 PM

Former Member
0 Kudos

Hi,

After Java Connector restart program TEST_Z02 is register is SAP but after few hours it's not.

In Java Connector I don't have any exceptions.

Any others idea ?

Here is my server config params. Hope it help.

jco.client.client=001

jco.client.user=TEST

jco.client.passwd=TEST

jco.client.lang=EN

jco.client.ashost=sapTest

jco.client.sysnr=01

jco.destination.pool_capacity=3

jco.destination.peak_limit=10

jco.server.unicode=1

jco.server.gwhost=sapTest

jco.server.gwserv=3301

jco.server.progid=TEST_Z02

jco.server.connection_count=2

Former Member
0 Kudos

I suppose the communication is breaking down b/w the sap and idocserver and if the target system is down then also the program shows as not registered in SAP.

Check if there's any communication problem b/w the two.

Former Member
0 Kudos

Hi,

I have checked connection between sap and idocserver and it's ok.

Connection to Java Connector is ok too.

When program have unregistered status in sap (after 1 to 7 hours), connection between sap and my JavaConnector is still established (check by netstat command).