title: WSO2 Android Agent Certificates
body: <p>I am using WSO2's Enterprise Mobility Manager to try and connect a device to it.</p>
  
  <p>I have followed all the instructions on WSO2's documentation. Here is what I have done:</p>
  
  <ul>
  <li>I followed the client's instructions:</li>
  </ul>
  
  <p>Which includes to create a .bks file from the certificates I created in the <a href="https://docs.wso2.org/display/EMM100/General+Server+Configurations" rel="nofollow">iOS Server Configurations</a>. I completed steps 2, 3, 4, 5, 6, 7 and 11. </p>
  
  <p>I then followed the instructions from <a href="https://github.com/nelenkov/custom-cert-https" rel="nofollow">git</a> to use the ca_cert.pem and ca.p12 to create a .bks file which I renamed to emm_truststore.bks and added to my project as per instructions.</p>
  
  <p>The client still has 159 warnings and 0 errors... Do these need resolving? As I have exported the project as is. Most of the Warnings indicate methods which aren't used or deprecated.</p>
  
  <ul>
  <li>I set up the database as instructed and everything works.</li>
  <li>Upon launching the server, it throws:</li>
  </ul>
  
  <blockquote>
    <p>ERROR  - LifeCycleException while starting tomcat connector
    Caused by: org.apcahe.catalina.LifeCycleException: Service.getName(): "Catalina"; Protocol handler start failed
    ERROR  - Error in initializing thrift transport
    ERROR  - Failed to initialize Entitlement Service</p>
  </blockquote>
  
  <p>And the MDM does not work. </p>
  
  <p>However when i do go back and undo the step 7 in the client setup, and place the original client-truststore.jks, wso2carbon.jks and wso2mobilemdm.jks files in the security folder the server starts without any hickups.
  -I can access the MDM interface, create Roles and Policies, and send an email to my device.
  -On my device, I can access the server, download and install the apk.
    -The problem then comes in that the app and the server won't communicate. "Authentication failed due to connection failure do you want to try again?"</p>
  
  <p>So I did some digging, and the possible problems is due to one of the following:</p>
  
  <ol>
  <li>There is a connection problem.</li>
  <li>There is a certificate mismatch.</li>
  </ol>
  
  <p>1) With regards to the connection this is my setup: I am running the server of my laptop (localhost) which is connected to our company network via wifi. I then connect my device on the same network. In order to reach the 'server' running on my laptop, I make use of my laptop's IP. (hence I was able to download the apk). The device has also been cleared through our proxies. Is any of this a possible cause to the problem?</p>
  
  <p>2) With regards to the certificates, I followed the instructions zealously. However one thing that still bothers me; is when I export my project, Eclipse asks for a 'keystore' which I then create anew. Does this affect the App or is the problem somewhere else?</p>