cancel
Showing results for 
Search instead for 
Did you mean: 

Intermittent Http_Communication_Failure Error in ABAP Using IF_HTTP_CLIENT->receive

04-10-2025 7:36 PM
Ravi_Bharti08 Explorer
1848 views 4 comments
SAP Managed Tags
Labels
Http_Communication_FailureNIECONN_REFUSED (-10)
Subscribe

Hello Experts,

I am intermittently encountering the exception Http_Communication_Failure in my ABAP code when using the method IF_HTTP_CLIENT->receive to send data to external systems (in my case, SAP CPI).

Upon analyzing the short dump, I noticed the following error message:
Connect to hostaddress:443 failed: NIECONN_REFUSED (-10),
and the system variable ME->M_ECODE has the value 411.

Has anyone experienced a similar issue or have any suggestions on how to resolve this?

Thanks in advance,
Ravi Bharti

Accepted Solutions (0)

Answers (3)

Answers (3)

ArunJacob
Active Participant
0 Likes

consider retry:-

DATA: lv_retry TYPE i VALUE 0,
      lv_success TYPE abap_bool.

WHILE lv_retry < 3 AND lv_success = abap_false.
  TRY.
      lo_http_client->send( ).
      lo_http_client->receive( ).
      lv_success = abap_true.
    CATCH cx_root INTO DATA(lx_error).
      lv_retry = lv_retry + 1.
      WAIT UP TO 1 SECONDS.
  ENDTRY.
ENDWHILE.

Thanks

MAVR
Product and Topic Expert
Product and Topic Expert
0 Likes

Hi @Ravi_Bharti08 
I have encountered this issue before; I recommend reviewing that all SAP app servers have the corresponding certificates. Additionally, if this is a hosted environment, I would raise this with your basis and network team to validate that all app servers have proper access to the BTP Cloud Integration host and port. In HA environments, we have found that some app servers have not been allowed access or are missing the corresponding SSL Identity or certificates depending on whether they are using Client Certificate Authentication, OAuth2.0, or Basic Auth.

Best regards 🖖🏻

Ricardo

 

 

MAVR
Product and Topic Expert
Product and Topic Expert
0 Likes
I would also like to point out that is extremely rare that your BTP Cloud Integration tenant to be down. But if you are having a huge volume of calls to the endpoint in short periods of time, then it would be a good idea to open a ticket to SAP operations so your tenant could be scaled up accordingly to your volume needs.
Ulrich_Schmidt1
Product and Topic Expert
Product and Topic Expert
0 Likes

Hi Ravi,

NIECONN_REFUSED means that no one on host "hostadress" is listening on port 443. (The TCP/IP layer of the operating system is then "refusing" to accept a connection on that port.) So there is nothing wrong with your ABAP code, the problem rather is on the other end (the CPI system).

If this is happening "intermittently", then this means that "once in a while" the CPI system is down. (Or has stopped listening on port 443.)
--> Needs to be checked on CPI side, what is going on there.