on 12-01-2015 3:10 PM
Hello, all
Is there a way to make the mobilink client service not to stop, but to retry DB connection indefinitely, until the service is started (or network connection is restored) ?
We are working with version 16
Thank you
Arcady
The MobiLink client is usually located very close to the remote database, and sometimes integrated in a fashion where a sync is not attempted until the remote database's availability is known (e.g., a client application that is already connected to the database invokes dbmlsync).
How are you launching a synchronization? Are you using the dbmlsync schedule extended option?
The dbmlsync utility is a client like any other, and reattempting failed database connections is the responsibility of the client... hence the question "how are you launching".
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello, Breck
I used Sybase central to create a Mobilink client service:
//------------------------------------
-c dsn=g4_center_test
-dl
-x 0
-q
-ot c:\mobilink\logs\ml_client_test_common_download.log
-os 10M
-s Common_Data_Download
-eu "sch='EVERY:0000:05' "
//-----------------------------------
The remote database is also a windows service.
The mobilink client does not always run on the same box as the DB server.
And restarting automatically does not help, because this only works, when service terminates unexpectedly. In this case, the service shutdowns automatically, but as far as the OS is concerned, the termination is normal. So the automatic restart never kicks in.
This is the error in the Mobilink client log file:
//--------------------------
E. 2015-12-08 12:36:05. SQL statement failed: (-832) Connection error: Timeout occurred while waiting for connection response
E. 2015-12-08 12:36:05. Unable to connect to remote database.
//------------------------
After that, the service stops and does not restart.
Hi Arcady,
Have you considered this option :
RetryConnectionTimeout :
http://dcx.sap.com/index.html#sa160/en/dbadmin/conparm-s-4536742.html
You can set this value from the ODBC Driver Manager, to appropriate values.
Note, I have not tried it myself, but I guess you can use a MobiLink hook procedure to control whether a failing connetion to the ML server will be retried (and whether a different ML server address might be used for that).
Here's link to the docs with an according sample using the "sp_hook_dbmlsync_ml_connect_failed" hook procedure:
http://dcx.sap.com/index.html#sa160/en/mlclient/sp-hook-connect-failed-ml-ref.html
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, Volker
There is no issue reconnecting to the Mobilink server.
The problem is with error -832: sql statement on mobilink client fails when remote database is unreachable. Once such an error occurs (because the DB is temporarily down or there is a comm issue), the mobilink client service shuts down and does not restart.
Just to clarify:
What do you mean by "There is no issue reconnecting to the Mobilink server."?
As stated, I have not used that hook myself so I cannot tell whether this will work or not - but in my understanding the hook would fit to the situation you are faced with: There has been a connection between ML client and ML server, and that connection has been dropped during a sync (for whatever reasons), and now you want to re-establish that connection and go on. Without that hook, no retry is being made, so by default dbmlsync stops. With that hook and while it does set the value "retry" to "true", I think it would attempt to retry.
Besides that, a further "brute force"-method may be to run the dbmlsync utility in a batch/cmd file within a loop, i.e. when it quits,re-start it (immediately or with a certain delay).
Hi, Volker
What I am trying to say is that the issue is not whether or not there is a connection to mobilink server.
The problem is that the client DB, to which dbmlsync connects is no longer accessible. This causes the service to shut down.
I would rather not run it in batch mode if I could avoid it.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.