cancel
Showing results for 
Search instead for 
Did you mean: 

connection to APC lost

former_member188843
Participant
0 Kudos

hello all expert,

we are using crm ic and apc. but we get 'connection to apc lost'  'connection tp apc was losed by peer' when we request go though web dispatcher.

when we access to server directly then we do not have such a problem.

any one faced the same problem before? any hints will be appriciated.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Wang

Can you send  the so Screenshot and error log file for the clarification.So we can try to troubleshoot the issue .

Pavan Kumar

former_member188843
Participant
0 Kudos

Below is screenshot from APC trace from client.

May u know anyway to check in web dispatcher side?  I think problem is there.

gregorw
Active Contributor
0 Kudos

Dear Joshua,

where you able to solve the issue? I'm facing the same error message. But we don't use a Web Dispatcher. We use DNS based Load Balancing. On our development system with a single server it works. But on Q2C with a central instance and an application server I get the:

"Connection to APC lost"

error.

Best regards

Gregor

isaias_freitas
Advisor
Advisor
0 Kudos

Hello Gregor,

You cannot rely on DNS based load balance.

That is because the browser might perform more than one DNS lookup, and this might result in the browser getting different IP addresses for the same host.

This will cause the requests to go to different application servers, resulting in errors.

Stateful requests (e.g., when there is a session open at the SAP system, transaction SM04) must be sent to the same application instance where the session exists, always. If it is sent to a different instance, this new instance will be unaware of the session and will raise an error.

Regards,

Isaías

gregorw
Active Contributor
0 Kudos

Hi Isaías,

we're using a load balancer that returns a given client always the same IP for a DNS query. So this should be OK.

Best regards

Gregor

gregorw
Active Contributor
0 Kudos

Hi Isaías,

I just found the root cause why the WebSocket connection could not be established in our environment in the SAP IC (Interaction Center).

With the Chrome Developer Tools I've traced the network traffic and found that the WebSocket URL is:

wss://crmonline/x2dtest.domain.com:8243/sap/bc/apc/sap/ic_sam_notify?sap-XSRF=Kb-bcLHFzBVikP_zZByczQ==

unfortunately that does not match the FQDN that sould be used. I.E. to start the CRM Web UI we use:

https://crmonline-test.domain.com:8243/sap/bc/bsp/sap/crm_ui_start

So I further investigated and with the help of How to search all loaded scripts in Chrome Developer Tools? I found that in the BSP Application crmcmp_ic_frame the Page mcmain_header.htm is responsible for the generation of the WS URL. In this page the page fragment notify_via_apc.htm was called where the actual URL generation happens. But the CRM developers have not used the

cl_apc_ws_utility=>get_access_url


method to generate the URL which successfully works in the demo application at


https://crmonline-test.domain.com:8243/sap/bc/abap/demo_apc

they created their own implementation. And this implementation adds the line:

  lv_apc_url = escape( val    = lv_apc_url
                    format = cl_abap_format=>e_xss_js  ).


which is not used in cl_apc_ws_utility=>get_access_url. I think that's where the incorrect url is created. I will raise an OSS Message to get that solved.


Best regards

Gregor

gregorw
Active Contributor
0 Kudos

Hi Isaías,

I've filed the issue 404267 2015. Perhaps you can direct it to the right people to fix the issue.


Best regards

Gregor

isaias_freitas
Advisor
Advisor
0 Kudos

Hello Gregor,

Very nice analysis!

I do not work with the CRM components, but I see that the ticket is already being handled.

Best regards,

Isaías

gregorw
Active Contributor
0 Kudos

Finally the issue is fixed by applying the Note:

2178412 - Double encoding in APC for Interaction Center