on 04-01-2013 8:02 AM
Hi all.
Sometimes that problem occurs although no changes in code. Application registers successfully but it cannot synchronize. It gives timeout error.I uninstall and reinstall the application but it does not work. Only workaround is restarting SUP server but obviously it is not a real solution in productive system.
SUP version is 2.1.3 and relay server is used.
Here is the connection code:
- try {
- Application app = Application.getInstance();
- OtonomDB.registerCallbackHandler(new SUPDBCallback(
- SupConnectActivity.this, getBaseContext()));
-
- OtonomDB.setApplication(app);
-
- // Setting application connection properties
- ConnectionProperties connProps = app
- .getConnectionProperties();
- connProps.setLoginCredentials(new LoginCredentials(
- SUPHelper.USERNAME, SUPHelper.PASSWORD));
- connProps.setServerName(SUPHelper.HOST);
- connProps.setPortNumber(SUPHelper.PORT);
- connProps.setNetworkProtocol("HTTP");
- connProps.setSecurityConfiguration("admin");
- connProps.setFarmId(SUPHelper.FARM_ID_MBS);
-
- // Setting synchronization profile
- ConnectionProfile cp = OtonomDB.getSynchronizationProfile();
- cp.setServerName(SUPHelper.HOST);
- cp.setAsyncReplay(false);
- cp.setPortNumber(SUPHelper.PORT);
- cp.getStreamParams().setUrl_Suffix(SUPHelper.URL_SUFFIX);
- cp.setDomainName("default");
-
- // Register/start application
- if (app.getRegistrationStatus() != RegistrationStatus.REGISTERED) {
- app.registerApplication(SUPHelper.TIMEOUT);
- } else {
- app.startConnection(SUPHelper.TIMEOUT);
- }
-
- if (!OtonomDB.isSynchronized("default")) {
- OtonomDB.disableChangeLog();
- OtonomDB.synchronize();
- } else {
- OtonomDB.synchronize();
- }
- } catch (Exception e) {
- e.printStackTrace();
- } finally {
- }
-
- OtonomDB.enableChangeLog();
Hi Aybars,
Its difficult to tell the cause of error just by looking at the code.
Can you provide the Error Logs or Exceptions occurred (both in the Log Cat and the SUP Server).
Also, in your code while setting the synchronization profile I don't find the RBS Farm Id.
Please try the following instead of .setUrlSuffix(),
AppNameDB.getSynchronizationProfile().setNetworkStreamParams("trusted_certificates=;url_suffix=/ias_relay_server/Client/rs_client.dll/RBS_FarmID");
Let me know if it works.
Regards,
Dharmaraj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Dharmaraj. In logcat timeout error occurs. In server no exception is thrown. I can provide error logs, which one do you need?
Thank you for your suggestion, I'll try it.
Let me remind the case: Application can register but it cannot synchronize. The wierd thing, after restarting SUP server same code works perfectly.
User | Count |
---|---|
79 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.