!--a11y-->
Analysis of Trace File 
All important events and error messages are recorded in the trace file. The following steps explain how you can use the trace files to determine the cause of a problem.
To analyze problems related to synchronization, find the text Synchronization started in the trace file.

[20050504 06:23:36:838] P [MI/Sync ] Synchronization started for user TESTER
[20050504 06:23:36:838] D [MI/Sync ] PackageManager: create package with maximum 20 items
[20050504 06:23:36:838] D [MI/Sync ] PackageManager: filled package with 0 acknowledge received container(s) [
20050504 06:23:36:838] D [MI/Sync ] PackageManager: filled package with 0 acknowledge container(s)
[...]
[20050504 06:23:36:848] D [MI/Sync ] PackageManager: filled package with 20 container items or headers
[20050504 06:23:36:848] D [MI/Sync ] PackageManager: filled package with 1 notify container(s)
[20050504 06:23:36:848] D [MI/Sync ] Package file C:\_DST\SAP Mobile Infrastructure\sync\TESTER\out\package.out exists and can be read
[20050504 06:23:36:848] P [MI/Sync ] Synchronisation started
[20050504 06:23:36:848] D [MI/Sync ] Begin: Dumping file C:\_DST\SAP Mobile Infrastructure\sync\TESTER\out\package.out <ID>MISYNC</ID><FLAGS>0x1</FLAGS><VERSION>251300</VERSION>
<CONTAINER>
<HEADER>
<CONTAINER_ID>0103a65f92916e06debf</CONTAINER_ID>
<OWNER>TESTER</OWNER>
<CONTAINER_TYPE>R</CONTAINER_TYPE>
[...]
</HEADER>
<ITEM>
<FIELD_NAME>CONVIDGENERATION</FIELD_NAME>
<LINE_NUMBER>0</LINE_NUMBER>
<FIELD_VALUE>X</FIELD_VALUE>
</ITEM>
<ITEM>
<FIELD_NAME>DEPLID</FIELD_NAME>
<LINE_NUMBER>0</LINE_NUMBER>
<FIELD_VALUE></FIELD_VALUE>
</ITEM>
<ITEM>
<FIELD_NAME>DEVICE</FIELD_NAME>
<LINE_NUMBER>0</LINE_NUMBER>
<FIELD_VALUE>000 TESTER MOBILEENGINE_JSP I251300 </FIELD_VALUE>
</ITEM>
<ITEM>
<FIELD_NAME>DEVICEPROFILE</FIELD_NAME>
<LINE_NUMBER>0</LINE_NUMBER>
<FIELD_VALUE>OSNAME:Windows XP</FIELD_VALUE>
</ITEM>
<ITEM>
<FIELD_NAME>DEVICEPROFILE</FIELD_NAME>
<LINE_NUMBER>1</LINE_NUMBER>
<FIELD_VALUE>OSVERSION:5.1</FIELD_VALUE>
</ITEM>
[...]
</CONTAINER>
The message Synchronization started means that the SAP MI Client Component has started to connect with the SAP Web AS.
Information about the installation, the user ID, and the password is sent to the SAP Web AS. The password is validated and the installation information is compared with the user information on the server. Applications and data are installed, uninstalled, and updated on the SAP MI Client Component in accordance with the settings for the user on the SAP Web AS.
If a mobile device is used by several different users, and if the application has already been downloaded to a mobile device, the SAP Web AS simply sends a note to the SAP MI Client Component so that the application is visible to other users.
If the synchronization fails because the SAP MI Client Component was unable to connect to the SAP Web AS, the trace file specifies an error. A failure can be identified in two ways:
· The trace file contains a character string that clearly states that a connection could not be made.
· The Java message HttpConnectionException appears directly after the error message that explains that the connection could not be made.
The SAP MI Client Component normally runs a connection test with the server that was specified on the configuration side of the SAP MI Client Component. The connection test can be deactivated if you install the SAP MI Client Component in Customize mode. For more information, see the SAP MI Installation Guide – quick link: \instguides

Example with the URL connection test:
[20040204 08:52:15:520] I [MI/API/Services ] UrlConnectionTest: Set sleeping time for future connection tests to 500
[20040204 08:52:15:520] D [MI/API/Services ] UrlConnectionTest: returning instance for host p59299
[20040204 08:52:15:520] D [MI/API/Services ] UrlConnectionTest: lastHostChecked was
[20040204 08:52:15:520] D [MI/API/Services ] UrlConnectionTest: lastTimeOfCheck was 0
[20040204 08:52:15:520] D [MI/API/Services ] UrlConnectionTest: last check was 1075884735520 ms ago
[20040204 08:52:15:520] D [MI/API/Services ] UrlConnectionTest: try number: 1
[20040204 08:52:15:520] D [MI/API/Services ] UrlConnectionTestThread: method run() started...
[20040204 08:52:16:021] D [MI/API/Services ] UrlConnectionTest: try number: 2
.
.
[20040204 08:52:21:026] D [MI/API/Services ] UrlConnectionTest: try number: 12
[20040204 08:52:21:527] D [MI/API/Services ] UrlConnectionTest: it took 6007 ms to test the connection
[20040204 08:52:21:527] P [MI/API/Services ] UrlConnectionTest: Connection could not be established!!!
[20040204 08:52:21:527] E [MI/Sync ] Exception while synchronizing via http
com.sap.ip.me.api.services.HttpConnectionException: URL connection test timeout
at com.sap.ip.me.api.services.IOUtils.isConnectable(IOUtils.java:572)
at com.sap.ip.me.sync.HTTPSynchronizer.synchronize(HTTPSynchronizer.java:107)
at com.sap.ip.me.sync.HTTPSynchronizer.exchangeData(HTTPSynchronizer.java:66)
.
.
[20040204 08:52:21:527] P [MI/Core ] original context restored
[20040204 08:52:21:527] D [MI/Sync ] Dumping file 'C:\Test\Tom2.5\SAP Mobile Infrastructure\sync\DEMO\inbound.sync'
[20040204 08:52:21:527] D [MI/Sync ] End of content of file 'C:\Test\Tom2.5\SAP Mobile Infrastructure\sync\DEMO\inbound.sync'
[20040204 08:52:21:527] W [MI/Sync ] Synchronisation problems
com.sap.ip.me.api.sync.SyncException: Transport-layer (http) sync exception raised (root cause: URL connection test timeout)
at com.sap.ip.me.sync.HTTPSynchronizer.exchangeData(HTTPSynchronizer.java:71)
.
.
[20040204 08:52:21:527] D [MI/Sync ] Synchronisation: Fire SyncEvent 1
In this example, the message Fire SyncEvent 1 in the last line specifies that the synchronization was not successful. A successful synchronization generates the message Fire SyncEvent 2. The message Fire SyncEvent 1 is produced following further trace output.
The response code of the URL connection thread can vary.

For example:
[20040204 08:52:21:827] A [MI/API/Services ] URLConnectionThread: caught exception java.io.IOException: Server returned HTTP response code: 503 for URL: http://p59299:50000/meSync/servlet/meSync?~sysid=MID&~client=000&~language=en&ACKNOWLEDGE=&
java.io.IOException: Server returned HTTP response code: 503 for URL: http://p59299:50000/meSync/servlet/meSync?~sysid=MID&~client=000&~language=en&ACKNOWLEDGE=&
If an exception appears with a response code 500 or higher, the administrator should check the trace in the CCMS (transaction RZ20). The short dumps also need to be checked on the SAP Web AS (transaction ST22).
The command httpPost sends the file package.out from the SAP MI Client Component to the SAP Web AS. The file is stored in the directory <Installation>\sync\<User>\out. The file inbound.sync contains the HTTP stream sent from the SAP Web AS.
Once the server response has been saved in the file inbound.sync (directory: <Installation>\sync\<User>\in), the system begins to process the input container.
The RFC trace tool (transaction ST05) contains information about:
· The RFC call between the SAP Web AS J2EE stack and the SAP Web AS ABAP stack.
· Communication between the SAP Web AS ABAP and the application backend.
