cancel
Showing results for 
Search instead for 
Did you mean: 

could not get a client from JCO.Pool error when calling external RFC server from PI

Former Member
0 Kudos

Hi,

Im developing RFC server using .Net connector 3.0. When the server starts , it registered on an ECC server getway using a program_ID .

To test my external server I'm using SE37 transaction , invoking STFC_CONNECTION function , and using RFC target sys parameter to point the external server destination defined at transaction SM59. All works as expected for this scenario , and my server get the call.

Next step for me is that my PI system gets a WS call from a client , and using an RFC adapter the PI should invoke my external server with the same STFC_CONNECTION function. In this scenario I get the folowing error :

Error While Sending Message: Additional error text from response: com.sap.engine.interfaces.messaging.api.exception.MessagingException: com.sap.aii.adapter.rfc.afcommunication.RfcAFWException: error while processing message to remote system:com.sap.aii.adapter.rfc.core.client.RfcClientException: could not get a client from JCO.Pool: com.sap.mw.jco.JCO$Exception: (102) RFC_ERROR_COMMUNICATION: CPIC-CALL: 'CMRCV' null

the strange thing about it is that I never see the call in my external server (It prints to the console whenever it is invoked) , but using a sniffer I can see that TCP/IP packets arrived to it.

To more strange thing is after that even that my server seem to be up , calling it using SE37 again will no get to it , and I need to restart it in order for it to listen again.

Anybody has any idea how to resolve it?  Any inputs will be welcomed ... Thanks!!


Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Additional info:

In the trace log of .Net connector of my external server I see the exception :

**** Trace file opened at 2012-05-28 14:52:38+03:00 (Jerusalem Standard Time)

          SAP .NET Connector: 3, 0, 3, 0, Working directory: C:\Users\alufer\Documents\Visual Studio 2010\Projects\SAPServerPOC\SAPServerPOC\bin\Debug, Program: C:\Users\alufer\Documents\Visual Studio 2010\Projects\SAPServerPOC\SAPServerPOC\bin\Debug\SAPServerPOC.vshost.exe

          Hardware: PC with Windows NT, Processor: 4x Intel 80686 (Mod 37 Step 5), Operating system: Microsoft Windows NT 6.1.7601 Service Pack 1, .NET CLR version: 4.0.30319.239

           SAP release: 720, Kernel release: 720, Kernel patch level: 101

          Hostname: YALUFER, IP address: 16.54.181.78, IP_v6 address:

          Default trace level: InternalAPI

>> Error entry 2012-05-28 14:52:38.293

SAP.Middleware.Connector.RfcCommunicationException: no SAP ErrInfo available

   at SAP.Middleware.Connector.CpicConnection.CpicReceive(Int32 timeout)

   at SAP.Middleware.Connector.CpicConnection.Read(Byte* buffer, Int32 offset, Int32 count)

   at SAP.Middleware.Connector.RfcConnection.SkipBytes(Int32 count)

   at SAP.Middleware.Connector.RfcConnection.ReadUpTo(RFCGET readState, RfcFunction function, RFCID toRid)

   at SAP.Middleware.Connector.RfcConnection.Dispatch()

   at SAP.Middleware.Connector.RfcConnection.RfcServerWorkerThreadProc(Object rfcConnObj)

I hope that helps .. Thanks

Former Member
0 Kudos

OK , I see the problem now : When routed from PI , the first function invoked on the external server is RFC_PING , that for some reason crashes the server.

Even from SAP GUI , when I invoke the RFC_PING on the external server destination , I can't get my external server to receive this call , but any other SAP function is OK.

Anyone encountered such a behaviour ?

Thanks

Former Member
0 Kudos

Thanks guys for the quick response !

Regarding the first suggestion : I tried rasing the nummber of max connections and it didn't help. Also , maybe I didn't mentioned but this is a R&D lab enviroment so basically I'm the only user of the system so it is not likely that this is the problem.

Regarding the second suggestion : The call never gets to my server , so there is no call to close ...

Any other suggestions or ways to debug this issue?

Thanks

baskar_gopalakrishnan2
Active Contributor
0 Kudos

> could not get a client from JCO.Pool:

The problem seems at the RFC server development using .net connector. Not at the pi side. Just few cents, are you handling logic to close the jco pool after finishing the call. Sometime the connections will be closed only after certain time during garbage recycle period. You can increase the connections still more and make sure the connection is properly closed after finishing the call.

former_member184681
Active Contributor
0 Kudos

Hi,

It looks like your PI system ran short of RFC connections. Have a look at this thread:

Regards,

Greg