cancel
Showing results for 
Search instead for 
Did you mean: 

Mobilink client stops when remote DB is unreachable

former_member329524
Active Participant
0 Kudos

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

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member188493
Contributor
0 Kudos

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".

former_member329524
Active Participant
0 Kudos

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' "

//-----------------------------------

VolkerBarth
Active Participant
0 Kudos

And how is the remote database started? Does the database engine run on the same box as dbmlsync? Does it run as a service, too?

Is the dbmlsync Windows service configured to restart automatically in case of failure?

former_member329524
Active Participant
0 Kudos

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.

former_member329524
Active Participant
0 Kudos

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.

Former Member
0 Kudos

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.

former_member329524
Active Participant
0 Kudos

No, Hanbin

I have not tryed that

I shall try it on some of the problematic sites, thank you.

Arcady

VolkerBarth
Active Participant
0 Kudos

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

former_member329524
Active Participant
0 Kudos

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.

VolkerBarth
Active Participant
0 Kudos

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).

former_member329524
Active Participant
0 Kudos

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.

Former Member
0 Kudos

Hi Arcady,

"no longer accessible", - do you mean that you cannot make a client connection to the database?

"This causes the service to shutdown" - you didn't specify what the service is? do you mean your Mobilink Service that you craeted ? i.e. SQL Anywhere Mobilink Client?

former_member329524
Active Participant
0 Kudos

Hi, Hanbin.

YES - to both.

former_member188493
Contributor
0 Kudos

FYI... Arcady did not mention "server" once... this is a question about dbmlsync connecting to the remote database, something we all take for granted : )