Troubleshooting

Abstract

This document provides guidelines and information useful for troubleshooting issues related to the ciMDM service.

Understanding the log files.

The MDM service log file is called ciMDM.log and is located in the same folder as other CI log files.

It uses a common logging format which looks like this:

<Date> <Time Stamp> -  [<Log Level>] <Class> | <Message>

Date, time stamp, and class should be self-explanatory, while log level can be one of the standard levels in Common.logging. These are:

DEBUG - Used for DEBUG information. This will usually not provide information helpful to non-developers.

INFO - Used to relay INFO information. This is usually about important state changes in the system, such as reconfiguration events.

WARN - Used to relay WARN information, This is usually used to relay information about undesired (but not necessarily wrong) system behavior, such as using the override.xml file.

ERROR - Used to relay recoverable ERROR information. This is usually used to relay information about a serious failure of the software, like uncaught exceptions or malformed REST requests. Exceptions and stack traces are demarcated by '***'

FATAL - Used to relay unrecoverable FATAL information. This used exclusively for the serious failure of the software from which the software cannot recover, such as invalid config.xml. This will usually cause the service to shut down defensively.

You can change the current log level in the file: "ciMDM.exe.config" under the logging section. For debugging this should be set to DEBUG, but in performance-critical production environments, you should probably go with INFO or WARN.

Example Data Contracts 

Configuration
{"cibackend/mdm":{
 "id": 11,
 "guid": "bcc164dd-35f6-4e16-951c-ea9277a9aa1a",
 "backendid": 1,
 "backend": "http://SRVSQL.capasystems.com:89/cibackend",
 "frontendid": 1,
 "frontend": "http://SRVSQL.capasystems.com:81/cifrontend",
 "scependpoint": "http://mdmtest.capasystems.com:1640/pkiclient.exe",
 "name": "mdmtest",
 "publicurl": "mdmtest.capasystems.com",
 "scheme": "https",
 "port": "443",
 "sslcertificate": "27DCA9396A3E9449F5AF2A0960EF7D34553182D8",
 "mdmcertificate": "6A1E319E26D2D873063A09BE871891A8B3221CC6",
 "scepserviceid": "6",
 "useragreement": "Enrollment over the Internet (User)",
 "operatoragreement": "Enrollment over the Internet (Operator)",
 "offlineinstallation": "True",
 "status": "Fine (4)"
}}

Testing the configuration

If you're unsure whether the configuration delivered by the ciBackend service is correct you can try adding a file called "override.xml" to the installation directory. This file allows you to manually configure the ciMDM service with a static configuration. The data contract is:

override.xml
<?xml version="1.0" encoding="utf-8" ?>
<override>
	<hostname>milmdm.capasystems.com</hostname>
	<scheme>https</scheme>
	<port>8443</port>
	<sslcertificate>27DCA9396A3E9449F5AF2A0960EF7D34553182D8</sslcertificate>
	<mdmcertificate>6A1E319E26D2D873063A09BE871891A8B3221CC6</mdmcertificate>
	<scependpoint>http://srvsql.capasystems.com:1640/pkiclient.exe</scependpoint>
	<useragreement>User: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut ac sagittis quam. Proin eu elit leo, et mollis ipsum. Duis tristique, mi a suscipit porta, risus orci tristique enim, et tempus mi turpis eu odio. Pellentesque lacus felis, tristique a viverra at, pulvinar sagittis lorem. Phasellus dolor magna, volutpat eget tempus sed, interdum et ligula. Curabitur sit amet ornare nisl. Vivamus ac ante commodo tellus condimentum facilisis. Cras sit amet purus at ligula sagittis aliquet. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Vestibulum sodales, nulla ut feugiat congue, ante orci gravida orci, faucibus mattis metus nisi in sapien. Quisque aliquet, nisi egestas scelerisque aliquet, erat leo tempus magna, at consequat nisi felis at augue. In hac habitasse platea dictumst. Fusce bibendum tincidunt dolor sed hendrerit. Aliquam erat volutpat. Sed sit amet mauris sed mauris consectetur iaculis vel sit amet erat.</useragreement>
	<operatoragreement>Operator: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed gravida, risus sit amet posuere pellentesque, elit nisl eleifend velit, in vehicula risus est aliquet odio. Maecenas et congue sem. Pellentesque consectetur, leo ut viverra pulvinar, lorem libero aliquet dolor, nec gravida felis nunc vel nulla. Ut suscipit massa libero. Etiam pretium, lacus scelerisque accumsan vestibulum, quam ipsum rutrum nunc, nec commodo arcu odio id diam. Cras ipsum eros, bibendum in imperdiet in, tempor sit amet est. Donec semper, diam ac porttitor dignissim, dolor nibh pretium risus, a sollicitudin est magna ut dui. Integer ullamcorper, felis eget egestas porta, nisl nisl vestibulum metus, quis lobortis lacus enim eget lacus. Maecenas magna erat, ullamcorper quis faucibus eget, ultricies ut turpis.</operatoragreement>
</override>


Immediate Actions

SymptomWhat to try first.
MDM Service won't start.Check if the config.xml file is present and correct. The file should contain the REST endpoints for ciFrontend, ciBackend, as well as the service GUID.
MDM Service not working,The ciMDM service depends on the ciFrontend and ciBackend services. These must be up and running in order for the ciMDM service to function properly.
MDM Service not working.The ciMDM service depends on an installed PKI. Make sure that all certificates (SSL and MDM) are installed correctly (in Local Computer -> Personal. Also, make sure the lightweight SCEP service is running and functioning.
MDM Service not working.The ciMDM service gets its configuration dynamically from the ciBackend service. Make sure the configuration is correct. You can invoke the /mdm/<service uuid> endpoint on ciBackend to get the data. Alternatively, the configuration is written to the log under the DEBUG level.

Further Reading

Apple has release Technical Note TN2265 on troubleshooting push notifications. Be aware that this documentation is targeted at application developers, so not everything will apply. The document is here: http://developer.apple.com/library/ios/#technotes/tn2265/_index.html