0

I'm trying to setup the WSO2-EMM on a server. I've successfully started the server and logged in to the Enterprise Mobility Manager with the default admin/admin username and password. I'm using https to connect to the EMM (HTTP doesn't work for me). I have not changed any settings in the XML files on the server. What i've done is follow the steps to create a JKS and P12 file which are successfully added to wso2 JKS file and uploaded to the server. I've also successfully created a BKS file and overwritten it in the Android project. Then I updated the CommonUtilities.java file with the following settings:

  • SERVER_IP: IP adress to my server (without the port)
  • SERVER_PORT: 9443
  • SERVER_PROTOCOL: https://

    I've build the App directly to my phone and couldn't connect to the server. Then I generated a signed APK with the keystore created during the stept provided on the wso2-emm website. Also can't connect to the server. The only thing I can think of right now is that the https certificate of the WSO2-EMM Dashboard isn't valid which maybe somehow interferes with connecting with the app?

My Android studio logs:

04-21 09:50:00.174 25086-25168/org.wso2.emm.agent D/ServerUtils: Attempt #1 to register [ 04-21 09:50:00.174 25086:25168 E/
] in 04-21 09:50:00.194 25086-25168/org.wso2.emm.agent V/ServerUtils: my_ipPosting '{username=admin, password=admin}' to https://my_ip:9443/emm/api/devices/clientkey 04-21 09:50:00.194 25086-25168/org.wso2.emm.agent V/ServerUtils: Posting 'username=admin&password=admin' to https://my_ip:9443/emm/api/devices/clientkey 04-21 09:50:00.194 25086-25168/org.wso2.emm.agent I/System.out: Thread-202051(ApacheHTTPLog):Reading from variable values from setDefaultValuesToVariables 04-21 09:50:00.194 25086-25168/org.wso2.emm.agent I/System.out: Thread-202051(ApacheHTTPLog):isSBSettingEnabled false 04-21 09:50:00.194 25086-25168/org.wso2.emm.agent I/System.out: Thread-202051(ApacheHTTPLog):isShipBuild true 04-21 09:50:00.194 25086-25168/org.wso2.emm.agent I/System.out: Thread-202051(ApacheHTTPLog):getDebugLevel 0x4f4c 04-21 09:50:00.194 25086-25168/org.wso2.emm.agent I/System.out: Thread-202051(ApacheHTTPLog):Smart Bonding Setting is false 04-21 09:50:00.194 25086-25168/org.wso2.emm.agent I/System.out: Thread-202051(ApacheHTTPLog):SmartBonding Setting is false, SHIP_BUILD is true, log to file is false, DBG is false, DEBUG_LEVEL (1-LOW, 2-MID, 3-HIGH) is 1 04-21 09:50:00.214 25086-25106/org.wso2.emm.agent D/mali_winsys: new_window_surface returns 0x3000, [1336x648]-format:1 04-21 09:50:00.224 25086-25086/org.wso2.emm.agent E/ViewRootImpl: sendUserActionEvent() mView == null

Community
  • 1
  • 1
Tripwire
  • 198
  • 2
  • 11

1 Answers1

0

Can you please explain which version of EMM server you are using? Since EMM newest version(to date) is 2.0.1, I assume you are on this version. The class ServerUtils is only found in EMM 1.1.0 server's agent code. EMM 2.x agent code is found here[1]. Is this server hosted in a public server? If you are testing this locally, both your device and the server needs to be in the same network. Furthermore, you can start the server in SSL debug mode as - sh wso2server.sh -Djavax.net.debug=all and check what is happening at the handshake level.

[1]. https://github.com/wso2/product-emm/tree/master/modules/mobile-agents/android/client

Inosh Perera
  • 200
  • 2
  • 9
  • Hi Inosh, Sorry for the late reply. I'm using the latest version of the EMM server downloaded from the official website. And i've downloaded the latest version of the Android Studio version. But i'll try it again see how it goes. Thanks for the SSL debug mode didn't know about that one, going to test to see what happends. – Tripwire May 11 '16 at 11:38
  • Hi Inosh, I updated to the latest version of the App, I was indeed running an older version. The server is hosted on a public server. I've started the server as debug and now see (after I redid the whole BKS setup from the manual) that the SSL handshake seems to be working on the server (no errors). But when i'm trying to connect with the Android app it gives an error: D/DynamicClientManager: com.android.volley.NoConnectionError: javax.net.ssl.SSLHandshakeException: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found. @InoshPerera – Tripwire May 13 '16 at 13:42