SAP Knowledge Base Article - Public

3158133 - SAP Analytics Cloud Best Practice - How to analyze traces to help troubleshoot data acquisition issues?

Symptom

  • In SAP Analytics Cloud (SAC), you can create import connections to data source systems to allow data acquisition by SAC, where Data is imported (copied) to SAC, and changes made to the data in the source system do not affect the imported data (in SAC).
  • SAP Analytics Cloud requires the SAP Analytics Cloud Agent and the SAP Cloud Connector installed within your network to access resources / servers located in your network.
    Note: The SAP Analytics Cloud agent is required for all import data connections except SAP BPC NW, SAP BPC for BW/4HANA, OData Services and SAP S/4HANA.
  • As of SAP Analytics Cloud version 2019.15, setting up Data Acquisition between SAC and the SAP Cloud Connector is now fully self service, which can be completed by following the steps described in the following resources:
  • To troubleshoot any issue in this scenario (setting-up data acquisition & configuring SAC Agent), this article will help you understand:
    • Which trace is necessary for investigation and how to collect?
    • How to analyze important and useful information from the collected trace files?
    • What will be the expected result in trace files for successful case?
    • What will be observed in trace file for typical issues?
 

Environment

  • SAP Analytics Cloud (Enterprise)
  • SAP Cloud Connector (SCC)
  • SAP Analytics Cloud Agent (SAC Agent)

Resolution

Prerequisites

Please make sure you have followed all the steps to finish the configurations.

  1. The cloud connector must be installed. For more information, see Installing the SAPCP Cloud Connector.
  2. The SAP Analytics Cloud agent must be installed. For more information, see Installing SAP Analytics Cloud Agent.
  3. The cloud connector must be configured. For more information, see Configuring the SAPCP Cloud Connector.
  4. The SAP Analytics Cloud agent must be configured in SAP Analytics Cloud for more information, see Configuring SAP Analytics Cloud Agent.

Trace Type & collection methods

Trace TypeDescriptionFile extension/name/pathCollection MethodAnalysis Tool
HAR traceChrome developer tools network trace.har2280022 - How to collect a HTTP archive (HAR) file (Chrome developer tools network trace) in SAP Analytics CloudChrome developer tool/Http Watch
Console logChrome developer tools console log.logNotepad/Notepad++

ljs trace
  • Refer to the SAP Cloud Connector Java classes (SAP code) that are directly related to Cloud Connector functionality.
  • This is the one requested by SAP Support if not explicitly told.
  • Information is the default level.
ljs_trace.log2452568 - Log and Trace files for SAP Cloud Connector
traffic trace
  • Subaccount specific
  • All the HTTP and RFC traffic content crossing the tunnel for that subaccount going through this Cloud Connector
traffic_trace_<account id>_on_<landscapehost>.trc
tomcat log
  • Tomcat Access Logger can be used to determine if communication from the SAP CP Cloud Connector is reaching the SAP Analytics Cloud Agent

  • Tomcat Error Logger can be used to troubleshoot errors between SAP Analytics Cloud Agent and Data Source

<Tomcat_Install_Dir>/logs/tomcat-stderr.<DATE>.log

<Tomcat_Install_Dir>/logs/catalina.<DATE>.log

  • Enable Tomcat high level traces in one of these ways.
  • Restart Tomcat after applying one of the changes below.
    • Start the Apache Tomcat client tool. Go to the Logging tab. Change the Level to Debug.
    • Edit the \conf\logging.properties file under the Apache Tomcat folder. Refer to the Apache Tomcat documentation for details.
    • Add a logging.properties file under the Tomcat folder \webapps\C4A_AGENT\WEB-INF\classes, with this content:
      handlers = com.sap.fpa.logging.CoreLogger com.sap.fpa.logging.CoreLogger.level=WARNING

Steps to collect essential traces

  1. Enable SCC Debug-level trace & Payload trace by following KBA 2452568 - Log and Trace files for SAP Cloud Connector
  2. Enable Tomcat high level traces following either one of methods above and restart Tomcat after applying the changes.
  3. Reproduce the issue in SAC (i.e., Go to System > Administration > Data Source Configuration > Check Configuration on the selected Location). 
        => At the same time, collect the HAR trace as well as the console log by following KBA 2280022.


Observation in traces of Successful Workflow

HAR file:

ScenarioRequest URLMethodPayloadResponse
Start to Add/Edit locationhttps://<SAC Tenant URL> /sap/fpa/services/rest/v1/locations/%7BlocationId%7D?&tenant=<...>Get All the locations that have been added in the current SAC tenant.
Click Create button after adding or editing locationhttps://<SAC Tenant URL>/sap/fpa/services/rest/v1/locations/<LocationID>?&tenant=<...>

Note: If it is the default location, <Location ID> is something like ONPREMDEFAULT-XXXXXXXXXXXX
PutDetailed information of Cloud Agent{"message":"","stack":"","errorDetails":[],"status":200,"bUIMsg":false,"bWarning":false}

Click Create button after adding or editing location

OR

Click Check Configuration

https://<SAC Tenant URL> /sap/fpa/services/rest/v1/locations/<LocationID> /agent/version?&tenant=<...>

Note: If it is the default location, <Location ID> is something like ONPREMDEFAULT-XXXXXXXXXXXX

Get {"minSupportedVersion":"1.0.75",
"currentVersion":"1.0.257"}

    SCC ljs_trace.log:  

    Observation in trace fileComment
    • #TRACE#io.netty.handler.codec.http.websocketx.WebSocket08FrameDecoder#tunnel-client-34-2#          #Decoding WebSocket Frame opCode=2|
    • #TRACE#io.netty.handler.codec.http.websocketx.WebSocket08FrameDecoder#tunnel-client-34-2#          #Decoding WebSocket Frame length=543|
    • #TRACE#com.sap.core.connectivity.tunnel.core.handlers.MessagePacketHandler#tunnel-client-34-2#0x18976c24#Received message of type 1 over tunnel channel [id: 0x106a6896, L:/<currentMachine_ip>:<port> - R:<ConnectivityService_Hostname>/<ip>]. Tunnel id: "account:///<subaccount>/<LocationID>"|
    SCC received the requests from SAC and started to build a connection with BTP Connectivity Service.
    • #DEBUG#com.sap.core.connectivity.protocol.http.HttpProtocolProcessor#tunnel-client-34-2#0x18976c24#Opening connection to backend system <CloudAgentInternalHost>:<Port>|
    • #DEBUG#com.sap.core.connectivity.spi.processing.AbstractProtocolProcessor#tunnel-client-34-2#0x18976c24#Successfully opened backend connection [id: 0xea7f9781, L:/<SCChost>:<port> - R:<CloudAgentInternalHost>:<Port>]|
    SCC tried to connect to Cloud Agent now.
    • #TRACE#com.sap.core.connectivity.protocol.http.HttpProtocolProcessor#tunnel-client-34-2#0x18976c24#Report open connection connection 0x18976c24 to http://<CloudAgentInternalHost>:<Port>|
    • #TRACE#com.sap.core.connectivity.spi.processing.AbstractProtocolProcessor#tunnel-client-34-2#0x18976c24#Will send packet with size 498 to backend channel [id: 0xea7f9781, L:/<SCChost>:<port> - R:<CloudAgentInternalHost>:<Port>]|
    • #DEBUG#com.sap.core.connectivity.protocol.http.handlers.HttpRequestStateHandler#tunnel-client-34-2#0x18976c24#Starting, switching state to PROCESSING|
    • #DEBUG#com.sap.core.connectivity.protocol.http.handlers.HttpRequestStateHandler#tunnel-client-34-2#0x18976c24#Start sending http://<CloudAgentInternalHost>:<Port>/C4A_AGENT//deploymentInfo to backend|
    • #TRACE#com.sap.core.connectivity.protocol.http.handlers.HttpInboundStatisticsHandler#tunnel-client-34-2#0x18976c24#Set request description to statistics instance: http://<CloudAgentInternalHost>:<Port>/C4A_AGENT//deploymentInfo on [virtualHost=localhost, virtualPort=8080, protocol=HTTP]|
    • #TRACE#com.sap.core.connectivity.protocol.http.handlers.HttpInboundStatisticsHandler#tunnel-client-34-2#0x18976c24#Report invoke started for connection 0x18976c24 to http://<CloudAgentInternalHost>:<Port> request /C4A_AGENT//deploymentInfo|
    SCC sent HTTP request to http://<CloudAgentInternalHost>:<Port>/C4A_AGENT/deploymentInfo
    • #DEBUG#com.sap.core.connectivity.protocol.http.handlers.HttpAuthorizationHandler#tunnel-client-34-2#0x18976c24#Access allowed to http://<CloudAgentInternalHost>:<Port>/C4A_AGENT//deploymentInfo for virtual host <CloudAgentVirtualHost>:<Port>|
    Mapping Virtual host with Internal host.
    • #DEBUG#com.sap.core.connectivity.tunnel.client.sso.CallerPrincipalProviderImpl#tunnel-client-34-2#0x18976c24#Could not unassign principal. No principal is found for connection with ID: '0x18976c24'|
    This is a general message, not indicated an issue in this scenario.
    • #TRACE#com.sap.core.connectivity.spi.util.ChannelUtil#tunnel-client-34-2#0x18976c24#Closing channel [id: 0xea7f9781, L:/<SCChost>:<port> - R:<CloudAgentInternalHost>:<Port>]|
    • #DEBUG#com.sap.core.connectivity.spi.processing.AbstractProtocolProcessor#tunnel-client-34-2#0x18976c24#Released backend connection channel [id: 0xea7f9781, L:/<SCChost>:<port> ! R:<CloudAgentInternalHost>:<Port>]|
    • #TRACE#com.sap.core.connectivity.protocol.http.HttpProtocolProcessor#tunnel-client-34-2#0x18976c24#Report close connection with id: 0x18976c24|
    After test, the connection was closed.
     

    SCC Traffic trace (traffic_trace_<account id>_on_<landscapehost>.trc) :

    • HTTP Request crossing the tunnel for that subaccount going through this Cloud Connecton to access SAC agent
      • GET http://<CloudAgentInternalHost>:<Port> /C4A_AGENT/deploymentInfo
      • Authorization: Basic <base64encoded-username-password>
    • Response returned from SAC agent
      • HTTP/1.1 200
      • {"minSupportedVersion":"1.0.75", "currentVersion":"1.0.257"}
    • Example:


    Typical issues/errors

    Observation in HAR file:

    IssueObservation in tracePossible Cause Resolution

    Error "Please verify the SAP Cloud Platform Cloud Connector connection status under the SAP Cloud Platform account that is linked to your SAP Analytics Cloud system; and check the Cloud Connector logs to see if the network firewall is blocking access to the Cloud Platform.  If connected, please contact SAP Support regarding backend connectivity issue. HTTP Status: 503, Action: Check version

    when

    • Adding or editing location
    • Click Check Configuration
    • Request URL https://<SAC Tenant URL> /sap/fpa/services/rest/v1/locations/<LocationID> /agent/version?&tenant=<...>
      => Note: If it is the default location, <Location ID> is something like ONPREMDEFAULT-XXXXXXXXXXXX

    • Response/Preview
      => messageId: CALL_CLOUD_AGENT_SERVICE_FAILED_HCP_503

    Either SCC, Cloud Agent or both are not configured.

    Please make sure all the Prerequisites have been configured.

    Note: You may need to look into other traces as below to help you identify the issue further.

    Observation in SCC ljs_trace.log  

    Observation in trace filePossible Solution
    • #ERROR#com.sap.core.connectivity.tunnel.client.notification.NotificationClientEventHandler#Thread-35# #Denied access for tunnel with id 'account:///<SCP account>' and attributes: 'applicationType:JAVA, applicationAccount:<SCP Account>, applicationName:fpajapp'
    2508215 - "Failed to call SAP Analytics Cloud agent..." error in SAP Analytics Cloud after checking the configuration in datasource configuration
    • #DEBUG#com.sap.core.connectivity.protocol.http.handlers.HttpRequestStateHandler#tunnel-client-48-8#0x0b080a6c#Http error occurred, switching state to STARTING
      #DEBUG#com.sap.core.connectivity.spi.processing.OutboundConnectionErrorHandler#tunnel-client-48-8#0x0b080a6c#Protocol processing error:
      com.sap.core.connectivity.protocol.http.handlers.HttpProtocolException: Invalid server certificate
      at com.sap.core.connectivity.protocol.http.handlers.HttpProtocolClientCodec.exceptionCaught(HttpProtocolClientCodec.java:81)

    3084008 - SAP Analytics Cloud cannot connect to SAC agent

     

    Observation in SCC Traffic trace(traffic_trace_<account id>_on_<landscapehost>.trc) :

    Observation in trace filePossible Solution
    • HTTP 401 for request http://<CloudAgentInternalHost>:<Port>/C4A_AGENT/deploymentInfo

    It indicates the username and password maintained in SAC when adding the location is incorrect comparing with the ones maintained is tomcat-user.xml.

    • HTTP 403 for request http://<CloudAgentInternalHost>:<Port>/C4A_AGENT/deploymentInfo

    It indicates the role Services is not assigned to the tomcat user correctly. Please check the configurations in the tomcat-user.xml file.

      Observation in Tomcat logs:

      Observation in trace filePossible Solution
      • SEVERE: Error configuring application listener of class com.sap.fpa.cloud.rest.cs.DriverManager
        java.lang.UnsupportedClassVersionError: com/sap/fpa/cloud/rest/cs/DriverManager : Unsupported major.minor version 51.0 (unable to load class com.sap.fpa.cloud.rest.cs.DriverManager)
      • "<Driver Name> has been compiled by a more recent version of the Java Runtime (class file version 57.0), this version of the Java Runtime only recognizes class file versions up to 52.0"
      • INFO: JSR 356 WebSocket (Java WebSocket 1.0) support is not available when running on Java 6.
      In these cases, please check if Tomcat is using the correct JVM. Please refer the KBAs below for further information and solutions.
      • 2499952 - Tomcat can't deploy correctly C4A_AGENT - unable to load class com.sap.fpa.cloud.rest.cs.DriverManager
      • 2578699 - "A bad request was made to SAP Analytics Cloud agent" error message appears in SAP Analytics Cloud
      • 2322466 - Error HTTP Status 500 when testing the installation of the SAP Analytics Cloud Agent
       

      See Also

      Your feedback is important to help us improve our knowledge base.

      Keywords

      SAP Cloud for Planning, sc4p, c4p, cforp, cloudforplanning, Cloud for Analytics, Cloud4Analytics, CloudforAnalytics, Cloud 4 Planning, BOC, SAPBusinessObjectsCloud, BusinessObjectsCloud, BOBJcloud, BOCloud., SAC, SAP AC, Cloud-Analytics, CloudAnalytics, SAPCloudAnalytics,Error, Issue, System, Data, User, Unable, Access, Connection, Sac, Connector, Live, Acquisition, Up, Set, setup, Model, BW, Connect, Story, Tenant, Import, Failed, Using, Working, SAML, SSO, sapanalyticscloud, sap analytical cloud, sap analytical cloud, SAC, sap analyst cloud, connected, failure, stopped, sap analyst cloud, 

      SAP Cloud for Planning, sc4p, c4p, cforp, cloudforplanning, Cloud for Analytics, Cloud4Analytics, CloudforAnalytics, Cloud 4 Planning, BOC, SAPBusinessObjectsCloud, BusinessObjectsCloud, BOBJcloud, BOCloud., SAC, SAP AC, Cloud-Analytics, CloudAnalytics, SAPCloudAnalytics,Error, Issue, System, Data, User, Unable, Access, Connection, Sac, Connector, Live, Acquisition, Up, Set, setup, Model, BW, Connect, Story, Tenant, Import, Failed, Using, Working, SAML, SSO, sapanalyticscloud, sap analytical cloud, sap analytical cloud, SAC, sap analyst cloud, connected, failure, stopped, sap analyst cloud, https://hcs.cloud.saphttps://hanacloudservices.cloud.saphttps://cloudanalytics.accounts.ondemand.comhttps://hanacloudservices-us.accounts.ondemand.comhttps://www.sap.comhttps://help.sap.com, predictive analytics (analysis), data analysis (analytics) tools, analytics tools, sap analytics cloud, data literacy, advanced analytics, data democratization, analytics software, real time analytics, self service analytics, advanced data analytics, analytics as a service, analytics cloud / cloud analytics, saas analytics, cloud bi, enterprise planning, cloud data analytics, cloud based analytics, analytics cloud platform, modern analytics, real time analysis, cloud analytics solution(s), what is sap analytics cloud, cloud analytics tools, analytics in the cloud, cloud analytics software epm, business intelligence,
      , KBA , LOD-ANA-AQU , Import Data Connections (Acquiring Data) , LOD-ANA-ADM , SAC Administration , LOD-ANA-PL-PLI , Planning Integration (BPC import/export/writeback) , LOD-ANA-ML , SAC Modelling , LOD-ANA-ML-DI , Data Integration, Data Export API, Data Import API , How To

      Product

      SAP Analytics Cloud 1.0