cancel
Showing results for 
Search instead for 
Did you mean: 

Caught an Exception while processing a JCO request. Connection reset

0 Kudos

Dear all,

I got this error when I execute SLDAPICUST for creating ABAP API between Abap and SLD SAP PI.

Caught an Exception while processing a JCO request. com.sap.conn.jco.AbapException: (126) SLD_CLIENT_EXCEPTION: AbapSLDRequestHandler.getObjectServer(): CIM_ERR_FAILED: IO error: Connection reset

Can see more log => jco20230713-104145933.txt

Anybody can help ?

Best Regard,

Parinya

Accepted Solutions (1)

Accepted Solutions (1)

Ulrich_Schmidt
Product and Topic Expert
Product and Topic Expert

Hi Parinya,

I think there is no problem with JCo here. According to the trace, the problem rather seems to be:

  • ABAP system is calling function module SLDJAVA_ACCESSOR_REQUEST in the JCo Server
  • The Java implementation of this FM then seems to be trying to open a network connection to an SLD system(?)
  • Opening this network connection fails with "IO error: Connection reset"
  • The Java implementation of SLDJAVA_ACCESSOR_REQUEST then throws an Exception of type com.sap.conn.jco.AbapException.
  • JCo catches this exception and then returns that error message back to the ABAP system. (So the connection between ABAP system and JCo server is still intact at that point, but might get closed, if the ABAP exception "SLD_CLIENT_EXCEPTION" is not defined in the interface of SLDJAVA_ACCESSOR_REQUEST! In that case JCo would convert the ABAP Exception into a SYSTEM_FAILRE exeception, which then aborts the RFC connection.)

So for solving this problem, you will need to take a closer look at the Java code that implements the FM SLD_CLIENT_EXCEPTION. Looks like the error happens in class "AbapSLDRequestHandler" in a method named "getObjectServer()". But this is speculation on my part. All we can see about the error on JCo level, is this:

JCoServerThread-80 [13:46:26:686]: [JCoRFC] dispatchRequest caught an application ABAP exception: Caught an Exception while processing a JCO request.
com.sap.conn.jco.AbapException: (126) SLD_CLIENT_EXCEPTION: AbapSLDRequestHandler.getObjectServer(): CIM_ERR_FAILED: IO error: Connection reset
0 Kudos

Hi Ulrich,

Thanks for your investigate but I just change configured port from https 44380 to http 8080.

The connection is done!.

Best Regard,

Parinya


Ulrich_Schmidt
Product and Topic Expert
Product and Topic Expert

Well, as I said: has nothing to do with JCo... 🙂

Probably this "AbapSLDRequestHandler" is using plain HTTP, so when it tried to connect to an HTTPS port on the SLD, that port was expecting an SSL handshake and not plain-text data and was therefore simply aborting the HTTP connection... "Connection reset":

0 Kudos

Hi Ulrich,

Today, I try change port the connection is all work fine.

but it's funny to say that I stuck this issue for a week to find solution.

I overlooked this port and the Jco log connection reset, don't show any error detail about port - -*.

Best Regard,

Parinya

Ulrich_Schmidt
Product and Topic Expert
Product and Topic Expert
0 Kudos

Well, JCo doesn't know anything about this port and about the HTTP connection which this "AbapSLDRequestHandler" is trying to open. The only reason we see anything about this in the JCo log, is because AbapSLDRequestHandler is throwing an exception from within a JCo dispatchRequest() method...

So basically you were looking at the wrong logs. More details about the true reason of the error would (hopefully) be available in the logs of the SLD system (showing some errors that someone is trying to connect to an SSL port with a plain-text connection) and/or in the logs of this AbapSLDRequestHandler application (which is started by an RFC request via JCo). But I'm not familiar with this application, so I don't know, whether it writes any logs.

Answers (1)

Answers (1)

MarkusTolksdorf
Product and Topic Expert
Product and Topic Expert

Hi Parinya,

connection reset means that the network connection was interrupted by either the communication partner or by some intermediate component. You need to check traces/logs of network components between JCo and the target ABAP system

Best regards,
Markus

0 Kudos

Hi Markus,

Thank you for answering.

I attached JCo log => jco20230713-104145933.txt

Can you see something wrong?

Best Regard,

Parinya

MarkusTolksdorf
Product and Topic Expert
Product and Topic Expert
0 Kudos

The interesting part is not really covered, one does not see the detail message for the connection reset.

Best regards,
Markus

Ulrich_Schmidt
Product and Topic Expert
Product and Topic Expert
0 Kudos

I think, this analysis is wrong: the connection between ABAP system and JCo is fine! I'll describe an alternative explanation in a separate answer.