Menu

Upgrade to 3.9 - some issues

Help
Tim Jones
2017-11-25
2017-12-27
  • Tim Jones

    Tim Jones - 2017-11-25

    Hi,

    not sure if I am jumping the gun here but I decided to do a trial run upgrading from 3.8 to 3.9 and ran into some issues (not sure if they are related).

    I have an embedded server with Android clients.

    1) The initial load worked as expected but after it had completed I repeatedly get the following warning on the Android client

    11-26 10:24:40.179 27447-27759/com.mashr.cloud W/o.j.s.s.StatisticM*: Starting a new process even though the previous 'Database Pull Load' process had not finished

    11-26 10:24:40.179 27447-27759/com.mashr.cloud I/o.j.s.s.StatisticM*: Details from the previous process: processType=Database Pull Load,sourceNodeId=demo-server-node,targetNodeId=demo-tablet-100,queue=,status=New,startTime=Sun Nov 26 10:24:29 GMT+13:00 2017

    2) Synchronisation from the server to the clients works as expected but I can no longer sync from the Android client back to the server. I can see an entry in the sym_data table (so assume the trigger fired correctly) when I make a change on the Android client but no associated entry for the change ever appears in the sym_outgoing_batch or sym_data_event tables.

    I am certainly not ruling out my bad but I am not sure where to proceed from here. I have tried to pepper the SymDS code with some logging. I can see that the ProcessInfo has a status of ProcessStatus.NEW but not sure why this hasn't been changed to OK hence the repeated warning above.

    Any thoughts/ideas on where I should look next?

    Thanks,

    Tim

     
  • Tim Jones

    Tim Jones - 2017-11-26

    As a follow up I have deployed the Notepad example as described in http://www.jumpmind.com/blog/synchronizing-android-applications-part1 using 3.9 and I get the same issues as above.

     
  • Chris Henson

    Chris Henson - 2017-11-29

    We took a note to test Android on 3.9. I don't think that has been done yet. Thanks for bringing this to our attention.

     
  • Tim Jones

    Tim Jones - 2017-11-30

    Okay thanks, let me know if I can help e.g. re-test any fixes if you need to make any changes.

     
  • Chris Henson

    Chris Henson - 2017-12-06

    We checked in changes to fix the process status. Not sure about your other issue of data not capturing. Can you check your sym_data_gap table to make sure the data_ids in sym_data are in the range found in sym_data_gap?

     
  • Tim Jones

    Tim Jones - 2017-12-07

    I need to do some more investigation but I think there is a new bug in the code causing this error when I install the notepad app

    12-07 21:04:31.104 16165-16254/com.example.android.notepad D/o.j.s.s.i.Cluster: Failed to load instance id from file '/./conf/instance.uuid'
    java.io.FileNotFoundException: /./conf/instance.uuid (No such file or directory)
    at java.io.FileInputStream.open(Native Method)
    at java.io.FileInputStream.<init>(FileInputStream.java:146)
    at java.io.FileInputStream.<init>(FileInputStream.java:99)
    at org.jumpmind.symmetric.service.impl.ClusterService.initInstanceId(ClusterService.java:109)
    at org.jumpmind.symmetric.service.impl.ClusterService.init(ClusterService.java:82)
    at org.jumpmind.symmetric.AbstractSymmetricEngine.setupDatabase(AbstractSymmetricEngine.java:495)
    at org.jumpmind.symmetric.AbstractSymmetricEngine.setup(AbstractSymmetricEngine.java:454)
    at org.jumpmind.symmetric.AbstractSymmetricEngine.start(AbstractSymmetricEngine.java:622)
    at org.jumpmind.symmetric.AbstractSymmetricEngine.start(AbstractSymmetricEngine.java:613)
    at org.jumpmind.symmetric.android.SymmetricService$1.run(SymmetricService.java:108)
    at java.lang.Thread.run(Thread.java:762)

    I think the 2 method calls in the ClusterService.init() method need to be shifted down below the if statement as shown below.

    @Override
    public void init() {
    

    // initInstanceId();
    // checkSymDbOwnership();

        if (isClusteringEnabled()) {
    
            initInstanceId();   
            checkSymDbOwnership();
    

    This seems to fix the first issue but not the second (syncing form client to server). I'll check the sym_data_gap table tomorrow.

     
  • Tim Jones

    Tim Jones - 2017-12-08

    I am still unable to sync from the client to the server using 3.9. On the client Notepad App there are no entries in the sym_data_event or sym_data_gap tables after making a change on the client and server, however there are (the expected) entries in the sym_data table which I have attached a screen shot of. I am using the same engine file (notepad-000.properties) as used when running on 3.8 and the same sym database entries e.g. SYM_NODE_GROUP, SYM_NODE_GROUP_LINK, SYM_ROUTER, SYM_CHANNEL, sym_trigger and sym_trigger_router. I presume no changes are necessary for 3.9?

    On the server there are 2 entries in the sym_data_gap table

    start_id, end_id, status, create_time, last_update_hostname, last_update_time
    0; 0; "GP"; "2017-12-08 13:02:15.365";"arch-dadda";"2017-12-08 13:02:15.365"
    4; 50000003; "GP"; "2017-12-08 13:04:15.608";"arch-dadda";"2017-12-08 13:04:15.608"

     
  • Mark Michalek

    Mark Michalek - 2017-12-13

    Tim,

    Thanks for your continued feedback on Android. The stuff about instanceId appears to be a legitimate bug on Android. The placement of those methods is correct, but the instance.uuid is supposed to be written under the Symmetric install in a desktop installation, but the path comes out invalid on Android. We'll review that logic for Android - thank you for pointing that out.

    We'll also look into the general sync problems you are having. We recently fixed some bugs that we thought would fix this, but now we'll take a closer look at this specifically.

    Thanks,
    Mark

     
  • Maxwell Pettit

    Maxwell Pettit - 2017-12-15

    Hi Tim,

    As of oday, we've resolved some issues with the Symmetric Android project, including fixes for the instance.uuid bug you've reported as well as what we believe to be the cause of your android client not being able to push to the server. We have also updated our Android example project to work in Android Studio 3.0, and we are considering providing a repository for our new sample code.

    Please let us know if any of these bug fixes solves the issues you were seeing.

    Thanks,
    Max

     
  • Tim Jones

    Tim Jones - 2017-12-20

    Hi Maxwell,

    the errors have all gone but I am still unable to sync from the client to the server.

    Is the Android example project you referred to above distributed with Symmetric Pro or the GPL version? If I can download it I will test against it.

    Thanks,

    Tim

     
  • Maxwell Pettit

    Maxwell Pettit - 2017-12-20

    Hi Tim,

    The sample android project is under the GPL license. It was created on GitHub this week here: https://github.com/JumpMind/symmetric-android-client-demo

    It is very similar to the previous demo projects. However, we had made some changes in the 3.9 branch of symmetric-ds that have not been released on SourceForge. One of these fixes included setting the default parameter start.routing.job=true.

    If you have pulled the new changes but are still using the original database on your android client, the property start.routing.job may not be set to true. What I would recommend is either forcing that parameter to be true on startup (via the DbProvider class in the android project), manually updating the parameter in the android database in the sym_parameter table, or completely wiping the database on the android device and setup the android client node again from scratch.

    Please let us know if these solutions do not work for you.

    Thanks,
    Max

     
  • Tim Jones

    Tim Jones - 2017-12-21

    Hi Max,

    yep, setting the start.routing.job parameter did the trick.

    Can you please point me to the process of raising issues/change requests (assuming it is possible). There are currently some limitations to do with transactional behavior imposed by the current Android implementation that would only require small changes that I would like to raise + some other issues that effect Android users in particular.

    Thanks to your team for the help above.

    Tim

     
  • Maxwell Pettit

    Maxwell Pettit - 2017-12-27

    Hi Tim,

    If you wish to submit new requests, you can do that via our issue tracking here: http://www.symmetricds.org/issues

    You can also submit pull requests on our github page if you would like to contribute to the code changes here: https://github.com/JumpMind/symmetric-ds

    Thanks for your continued help,
    Max

     

Log in to post a comment.