cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot synchronize after registration?

aybars_morali
Participant
0 Kudos

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:

  1. try { 
  2.     Application app = Application.getInstance(); 
  3.     OtonomDB.registerCallbackHandler(new SUPDBCallback( 
  4.             SupConnectActivity.this, getBaseContext())); 
  5.  
  6.     OtonomDB.setApplication(app); 
  7.  
  8.     // Setting application connection properties 
  9.     ConnectionProperties connProps = app 
  10.             .getConnectionProperties(); 
  11.     connProps.setLoginCredentials(new LoginCredentials( 
  12.             SUPHelper.USERNAME, SUPHelper.PASSWORD)); 
  13.     connProps.setServerName(SUPHelper.HOST); 
  14.     connProps.setPortNumber(SUPHelper.PORT); 
  15.     connProps.setNetworkProtocol("HTTP"); 
  16.     connProps.setSecurityConfiguration("admin"); 
  17.     connProps.setFarmId(SUPHelper.FARM_ID_MBS); 
  18.  
  19.     // Setting synchronization profile 
  20.     ConnectionProfile cp = OtonomDB.getSynchronizationProfile(); 
  21.     cp.setServerName(SUPHelper.HOST); 
  22.     cp.setAsyncReplay(false); 
  23.     cp.setPortNumber(SUPHelper.PORT); 
  24.     cp.getStreamParams().setUrl_Suffix(SUPHelper.URL_SUFFIX); 
  25.     cp.setDomainName("default"); 
  26.  
  27.     // Register/start application 
  28.     if (app.getRegistrationStatus() != RegistrationStatus.REGISTERED) { 
  29.         app.registerApplication(SUPHelper.TIMEOUT); 
  30.     } else { 
  31.         app.startConnection(SUPHelper.TIMEOUT); 
  32.     } 
  33.  
  34.     if (!OtonomDB.isSynchronized("default")) { 
  35.         OtonomDB.disableChangeLog(); 
  36.         OtonomDB.synchronize(); 
  37.     } else { 
  38.         OtonomDB.synchronize(); 
  39.     } 
  40. } catch (Exception e) { 
  41.     e.printStackTrace(); 
  42. } finally { 
  43.  
  44. OtonomDB.enableChangeLog(); 

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

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

aybars_morali
Participant
0 Kudos

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.