Hello, I connect to Mobilink server using Sybase Central. I get the following message on my side (client): ---------- Starting synchronization Connecting Upload starting Finishing upload Disconnecting Done, with errors Sync failed: Synchronization server failed to commit the upload Results of this synchronization: Failed with error: -794 Download timestamp: 2011-09-15 09:47:02.328000 Upload failed No ignored rows No part download remaining Authentication value: 0 (0x0000) Server log file gives me this message: [10012] The consolidated and remote databases disagree on when the last synchronization took place, the progress offsets are 11 in the consolidated database and 3 in the remote database. The remote is being asked to send a new upload that starts at the last known synchronization point I. 2011-09-15 09:44:07. <82> Progress offsets for the publications that are explicitly involved in the current synchronization I. 2011-09-15 09:44:07. <82> Subscription id 2: consolidated progress 11 and remote progress 3 I. 2011-09-15 09:44:07. <82> Progress offsets for the publications that are not explicitly involved in the current synchronization I. 2011-09-15 09:44:07. <82> Subscription id 1: consolidated progress 0 and remote progress 0 I. 2011-09-15 09:44:07. <82> Synchronization complete I dont see any update onto my DB. Do you have any idea on what's going on? Thanks in advance. S |
The error message tells that there's obviously a progress mismatch between your consolidated and remote databases. That means they're out of sync. This may happen when you use an older copy of the remote (e.g. a backup) to sync with the current consolidated, and the remote had successfully synced in the meantime. (The opposite situation with a "old consolidated" can happen as well.) That would often be a valid reason to re-build the remote. For SQL Anywhere clients, the DBMLSync -rb option may help to cure the symptom, as then the client's progress offset will be used to decide what to download. However, that may or may not lead to inconsistent data. For Ultralite clients, the following doc part may explain more. 1
thank you for this. It worked but sometimes it doesnt work as I get this result: Sync failed: MobiLink communication error -- code: 86, parameter: 404, system code: 0 Results of this synchronization: Failed with error: -1305 Stream error code: 86 System error code: 0 Download timestamp: 2011-09-16 11:47:19.343000 Upload failed No ignored rows No part download remaining Authentication value: 0 (0x0000) doc does not give me much info about it. Any idea on what the problem might be?
(16 Sep '11, 05:58)
devdevoteam
when instead I try to sync from my client android application I get the same error 09-16 13:33:17.856: WARN/System.err(419): com.ianywhere.ultralitejni12.implementation.JniException: UltraLiteJ Error[-1305]: MobiLink communication error -- code: 57, parameter: donotshowmyparam, system code: %3 Please, what does "code: 57" mean?
(16 Sep '11, 06:50)
devdevoteam
Replies hidden
1
MobiLink errors and warnings are documented in the docs. You may just enter the error code in the docs's "Search box". Here is the doc for error code 57. (Note, warnings have code > 0, errors < 0). Besides that, I can't comment on the source of these errors. But my impression is that the new errors you have reported have a different background than the error message from your question.
(16 Sep '11, 07:51)
Volker Barth
Comment Text Removed
|
In addition to Caution that @Volker provided a link to (copied below), I would add the following: You must not copy an UltraLite database that has been synchronized from on client to another, or share ML remote ids. If you wish to copy a database, you must reset the ML remote id. Each client must have a unique ML remote id to maintain independent state.
|
Here's what I think led to your original problem.
You either needed to copy the UDB back from the Android device before redeploying to it, or not copy a synchronized UDB file to your Android device. |
If the ml_reset_sync_state procedure that @volker suggested does not work and/or you correctly identified subscription 2 for this particular remote and reset its progress to 2 or 3 and that did not work (did you commit?), then you need professional help. While this forum is ideal for quick answers and getting community help, I think this issue may be just too complicated for here. I therefore suggest that you open a support case to help you resolve this quickly. |
In situations like this, the type of remote is extremely useful. Are you using UltraLite, UltraLite J, or dbmlsync?
Is there a farm of MobiLink servers or just the one?
When you say "connect to MobiLink using Sybase Central", how exactly did you do this? Were you using an UltraLite tool?
the remote is Mobilink12. as client we use ultralite12 and an android application.
MobiLink is not a remote - it is the technology that synchronizes the remotes with a consolidated. Remote and client mean the same thing.
But you said in your original question that you used Sybase Central. I'm assuming you use the ul sync tool. Where did you get the client database from? Did you copy it from a device?
Is there just one MobiLink server or a farm?
sorry I was wrong in calling Mobilink as remote. I use SybaseCentral 6.1.0.6420 and I downloaded it from internet. Is not a farm but just one server.
I'm quite sure Philippe would like to know where you get the remote database from (i.e. whether you copied that from a device which might have already synced), not the SQL Anywhere software...
Hello, it was not me in doing that but in order to generate remote database has been followed those steps: - through Sybase Central, Click on: Mobilink 12 > ServerName > Synchronization models - right key on db - click on "Deploy..." - choose "Deploy immediately using last deployment settings" - Finish.
Thank you in advance, S
That helps...I asked our MobiLink plugin for SYbase Central person to look at your question.
That doesn't tell us whether you are creating a new remote database when deploying your synchronization model, or deploying to an existing remote database. To see what the "last deployment settings" are, choose the "Run this wizard initialized with last deployment settings" and note whether you deploying to a new remote database or an existing remote database.
deploying is to a new remote database. Thanks, S
A new remote database won't have a remote ID and (for UltraLite remotes) the progress offset will be zero. So if you are deploying to a new UltraLite remote, it should create a new UDB file that is "clean" for copying to different remotes.
Did you synchronize the new UDB file on the PC before copying to the Android device?
Is your application explicitly setting the remote ID?
yes, I did. That's because I try first if synchronization works with SybaseCentral and then with my application. I do not set any remote ID, I just set the following params: httpParms.setHost("xxx"); httpParms.setPort(xxx); syncParms.setUserName("xxx"); syncParms.setPassword("xxx"); syncParms.setPublications("xxx");
As Graham has stated, once you do sync, you will automatically set a remote ID. See his answer below to understand the effect and cause...
Please is there a way to set UDB file progress offset and remote ID (i.e. by command line)?
Using dbisql you may unset the ML remote ID with
I think this would suffice to solve the problem however if you want to clear the progress ID, you probably need to unload and reload the udb using ulunload and ulload.
thank you for your response, Philippe. I tried it and I get such an error with errorcode=-1118. As you know this is its probable cause: The MobiLink server uses the remote id to track synchronization progress. If the status of the previous upload is unknown then you must resolve this condition before changing the remote id.
Is there a way to resolve the fact that "the status of the previous upload is unknown"? I dont see anything from your documentation.
Thank you in advance. S
I haven't been able to track down how to reset the sync progress in the consolidated database for an UltraLite client. Hopefully @RussC_FromSybase or another MobiLink expert will pickup the problem.
If you are still in development mode, I would just trow out all client versions of the database and redeploy the model. Make sure you have unique remote ids.
For v8 MobiLink clients, I remember to have fiddled around with the ml_subscription.progress column. As the "ML system tables" are still user-defined tables from the consolidated dbms, you can adjust the value as needed (as long as you know what you are doing).
Not sure if this still applies to v12 and UltraLite clients. You may also have a look at the newer system procedures like ml_reset_sync_state.
An update on that table (ml_subscription) seems to work apparently but when you perform a selection on that data I actually see that the update did not take any effect. So my problem is still open.
Shortly, I need to perform sync from my android application (containing a remote db) to this consolidate db. Any query on my remote db (from my app) works but I cannot synchronize my remote db to the consolidate db. the error I get is always the same -794 caused by the difference between the two progress offset. Please in order to make sync works, is there another thing I can do?
Okay, I have a very similar problem, but let me lay it out fully as I have not read anything here that has solved my problem. We are writing a remote application, the remote client is Windows CE 5.0. Our DB is Oracle 11, we are running a single MobiLink server between the two and using Sybase Central to manage the process. We rolled out our first test device with the app and synced it a few times, worked great. Now we are ready to roll out our second device. We created a second user using mluser and assigned it to the second device. I pulled the original udb from the remote directory on the server (the file which we installed on the first device) and placed it on the second device. I expected that it would sync and update the udb to the current version of the main DB. Of course this did not happen. I got the [10012] error.
So now I have tried to update the udb file on the server using Sybase Central (Connect to UltraLite 12 | Right click on the file | Select Synchronize | set the user/pass and Finish), but this did not work either, in fact I got the exact same error.
So given all of this how do I roll out my second device? This seems like a totally logical sequence of events but it does not work. Have I missed something?
Take a look at the answer to http://sqlanywhere-forum.sap.com/questions/8013/second-device-rolled-out-but-unable-to-sync-error-10012 it may be what you need.