The forum will experience an outage sometime between February 10 at 7:00pm EST and February 12 at 11:59 EST for installation of security updates. The actual time and duration of the outage are unknown but attempts will be made to minimize the downtime. We apologize for any inconvenience.

The following error code is generated when we run the Android Java code for the synchronization:

com.ianywhere.ultralitejni12.implementation.JniException: UltraLiteJ Error[-1305]: MobiLink communication error -- code: 63, parameter: , system code: 101

This is a network level error, right? Source: http://dcx.sybase.com/index.html#1201/en/saerrors/mlcommerr63.html Due to a lack of knowledge of the hardware side, we don't know how to solve this. Which steps have we missed out?

Below some more information how we set up the server and client environment:

SQLAnywhere consolidated (server) database

We use SQL Anywhere database as the consolidated database. This database is set up using the Sybase Central application. We did the following actions:

  • We created the database tables, these will be used to synchronize with the remote Ultralite databases.
  • We added one Mobilink user to the Mobilink Users within folders in the Sybase Central application.
  • We made a publication containing two tables at the Publications within folders in the Sybase Central application.
  • We made a synchronization subscription using the publication and is assigned to the Mobilink user.

Mobilink server

We made a new Mobilink project using the Sybase Central application create project wizard.

  • We added the SQLAnywhere consolidated database to the Mobilink project.
  • We added a synchronization model to the Mobilink project.
  • We deployed the synchronization model successfully.

Ultralite remote (client) database

For the client database we use UltraliteJ with Android OS. The local database was created using Java code. We have generated a publication using the following Java code:

String createQuery = "CREATE PUBLICATION IF NOT EXISTS ActionsPubs (TABLE action, TABLE actionParameter)";
PreparedStatement ps = connection.prepareStatement(createQuery);

We connect using the SyncParms from the UltraliteJ API:

Connection conn = DatabaseManager.getConnection(context);       
createPublications(conn);
SyncParms syncParms = conn.createSyncParms(SyncParms.HTTP_STREAM, config.getUsername(), "1.0" );
syncParms.setPassword(config.getPassword());
syncParms.setPublications(publications);
StreamHTTPParms streamParms = (StreamHTTPParms) syncParms.getStreamParms();
streamParms.setHost("109.205.192.1");
streamParms.setPort(config.getPortNumber()); //portnumber is 3306
conn.synchronize( syncParms );

So when we debug, we get the error mentioned above after passing the conn.synchronize(syncParms); line.

Is there any advice on where to look and check for this problem? Thanks in advance!

asked 22 Dec '11, 13:36

Yanny's gravatar image

Yanny
1767917
accept rate: 75%

edited 15 Mar '13, 21:28

Mark%20Culp's gravatar image

Mark Culp
22.3k9129262


The problem is finally solved with the help of Bill Frier, Jeff Albion, Andy Quick and Volker Barth. I will summarize below what I have changed during problem solving.

  • Starting up the Mobilink server and specifying the host and portnumber using -x http. mlsrv12 -c "dsn=mobiel-cmp;uid=xxx;pwd=xxx" -x http(host=109.205.192.234;port=3306) -v The host address is changed to the second NIC address. I asked the server admin to open the port 3306 in the Firewall.
  • Changed the host address in the java code to 109.205.192.234 and started running the code.

From this point I have connection the Mobilink server, but I get other errors.

  • Version 'Mobiel-CMP 1.0' not found error, changed the script version to number 4 Mobiel-CMP-Sync.
  • The table 'action' has no download_cursor script" error, changed the script version to number 5 Mobiel_CMP-Synchronization

So after these changes I am able to synchronize between the Android Ultralite remote database and the SQLAnywhere database. Thanks to all the persons who contributed in this thread!

permanent link

answered 19 Jan '12, 15:17

Yanny's gravatar image

Yanny
1767917
accept rate: 75%

edited 21 Jan '12, 08:41

Volker%20Barth's gravatar image

Volker Barth
29.3k287438645

Being a gateway machine, does this mean it has two or more NICs? If yes, MobiLink may not be listening on the one you expect. Try specifying the HTTP (or HTTPS) host option. Something like,

mlsrv12 -c "dsn=mobiel-cmp;uid=xxx;pwd=xxx" -x http(host=109.205.192.1;port=3306)

If this doesn't help you should check the MobiLink log for clues. The mlsrv12 -ot and -v options can help with this.

The host option is used to specify the host name or IP number on which the MobiLink server should listen. The way I read your question, you want the ML server to listen on the public IP. In the sample mlsrv12 command line above, that is done with,

-x http(host=109.205.192.1;port=3306)

It is common to want the ML server and its consolidated database behind a firewall. In such a case you would would specify the internal IP and port and ensure that your router/firewall allows the communication to get through or use something such as Sybase Relay Server to relay the communication across the firewall without the need to open any inbound ports.

permanent link

answered 23 Dec '11, 08:25

Bill%20Frier's gravatar image

Bill Frier
515914
accept rate: 41%

edited 19 Jan '12, 07:40

I've asked about the amount of NICs, they will reply me soon about it. After reading the reply of Jeff Albion, it makes more sense to use HTTP to start up the Mobilink server, as UltraliteJ only can connect with HTTP or HTTPS.

(23 Dec '11, 15:14) Yanny

OK, there are actually 2 NICS: - 1 network card for intern/domain - 1 network card for public ip. How can I possibly configure Mobilink to listen to the correct NIC?

(09 Jan '12, 07:58) Yanny

The host option is used to specify the host name or IP number on which the MobiLink server should listen. The way I read your question, you want the ML server to listen on the public IP. In the sample mlsrv12 command line above, that is done with,

-x http(host=109.205.192.1;port=3306)

It is not uncommon to want the ML server and its consolidated database behind a firewall. In such a case you would would specify the internal IP and port and ensure that your router/firewall allows the communication to get through or use something such as Sybase Relay Server to relay the communication across the firewall.

(09 Jan '12, 10:19) Bill Frier

Use the "host=" http option with the IP address of the NIC on which you want MobiLink to listen, as described above. The documentation says host rather than hostname, but hostname may work as well.

(09 Jan '12, 10:19) Andy Quick

Thank you all so much for the quick responses!

So far I tried to connect with the following command: mlsrv12 -c "dsn=mobiel-cmp;uid=xxx;pwd=xxx" -x http(host=109.205.192.1;port=3306) I got the error that the host is a public address.

So I tried using the internal address 109.205.192.234, which is an Ethernet adapter 109. No error upon that and the Mobilink server runs.

Now I still have to test the connection, but come across other problems which I need to resolve first. So I will keep this thread updated when I progress.

(10 Jan '12, 05:02) Yanny

I will reply in a new comment about the progress.

There are two NICS, currently it is listening to the correct NIC called 109 with the following address: IPv4 address: 109.205.192.234 It is not possible to PING to that address due to security reasons, so instead the port has been opened in the firewall. A telnet connection to that address should be okay anyway.

The SQL Anywhere database is started with: dbsrv12 "mobiel-cmp.db"

The Mobilink server is started with: mlsrv12 -c "dsn=mobiel-cmp;uid=xxx;pwd=xxx" -x http(host=109.205.192.234;port=3306)

Now when I run the application I get the following new error: com.ianywhere.ultralitejni12.implementation.JniException: UltraLiteJ Error[-857]: Synchronization failed due to an error on the server: [-10368] Unable to complete the request

Any idea what is going on?

(17 Jan '12, 06:07) Yanny

The -857 error indicates a server error. You will need to check the ML server log to diagnose server side problems. Generally it is easiest if you log output to a file. In the log file, error lines start with 'E.'. Warnings can also be helpful and they are prefixed with 'W.'.

(17 Jan '12, 07:27) Bill Frier

I get the error message previously I had again, which is so annoying... >_< com.ianywhere.ultralitejni12.implementation.JniException: UltraLiteJ Error[-1305]: MobiLink communication error -- code: 63, parameter: , system code: 101

I specified the log option when starting the mobilink using the command: mlsrv12 -o mlsrv.log -c "dsn=mobiel-cmp;uid=xxx;pwd=xxx" -x http(host=109.205.192.234;port=3306)

I don't see errors in the log file: mlsrv.log.

I have a question about the SQLAnywhere database. I saw it is started automatically on the port 2638. Database server started at Tue Jan 17 2012 19:39 Trying to start SharedMemory link ... SharedMemory link started successfully Trying to start TCPIP link ... Starting on port 2638 TCPIP link started successfully

So should the ports of the Mobilink and the database server be the same?

(17 Jan '12, 14:08) Yanny

No, MobiLink and SQL Anywhere Server must be different ports if they are running on the same machine.

It looks like the communication from the client app is once again not getting through to the MobiLink server. If you add a -v to your MobiLink command line you will see lines like the following in the log file when the client attemps to connect,

I. 2012-01-17 14:46:44. <1> Request from "UL 12.0.1.3505" for: remote ID:...

I. 2012-01-17 14:46:44. <1> Synchronization connection connected

Has the client app been update to use the new IP address?

(17 Jan '12, 14:58) Bill Frier

The client app is using the new IP address.

Anyway after putting -v into the mobilink command line I get the following:

I. 2012-01-18 10:34:17. <1> Request from "UL 12.0.1.3457" for: remote ID: d5b17150-2c2a-11e1-8000-afbeb0a6b374, user name: mobielcmp, version: Mobiel-CMP 1.0 E. 2012-01-18 10:34:18. <1> [-10013] Version 'Mobiel-CMP 1.0' not found in the ml_script_version table. Cannot synchronize I. 2012-01-18 10:34:18. <1> Synchronization failed

Does this mean the connection is made successfully?

(18 Jan '12, 04:36) Yanny

If this is the correct remote id of your device, yes.

However, the specified script version seems to be wrong.

(18 Jan '12, 04:55) Volker Barth

How can I check the remote id of my device? I mean where to see if this is the correct one? Anyway corrected the version id, now that error is not coming up. I get the another error: "Message: The table 'action' has no download_cursor script"

How can I make the download cursor script?

(18 Jan '12, 05:13) Yanny
Comment Text Removed
1

For the remote ID, unless it you have multiple clients trying to sync, I would expect the remote ID is for the remote you are syncing. A simple way to check is to sync a couple of times. If the remote IDs listed in the log match and correspond to the times you initiate a sync, then the ID is associated with the instance with which you are working. If you want to check more precisely, the actual remote ID is stored in the ml_database table. To map it back to a MobiLink user, you will need to trace it through the ml_subscription table to the ml_user table.

See writing download_cursor scripts for details on writing them yourself. Normally these are defined in the MobiLink synchronization model. This is described in Modifying the download type.

In your original post, you said deployment was successful. Did you add the action table after you created and deployed your model? Do you have multiple versions of your scripts?

Note: If you specifically want to ignore required scripts such as download_cursor, you can tell MobiLink to ignore them using the --{ml_ignore} prefix.

(18 Jan '12, 09:28) Bill Frier

Okay I have figured out when I get this particular error. "com.ianywhere.ultralitejni12.implementation.JniException: UltraLiteJ Error[-1305]: MobiLink communication error -- code: 63, parameter: , system code: 101"

When I use the internet connection at home I receive the above error. I have turned off the firewall on my computer but still receives that error. Maybe the port is blocked on the modem. At work I can make the Mobilink connection, but I still need to fix errors like the error about the download cursor script.

Back to your comment. I generated the synchronization model using the Sybase Central wizard. I can't remember if I created the table action after the deployment. But I did an update on the synchronization schema, so I think this way the table action is added in the synchronization table? When I click on the synchronization model I see a table mappings with consolidated tables, the action table is in the list and the direction of synchronization is bi-directional. I've made a screenshot of it: http://s14.postimage.org/xmrwvy6up/Screen_shot_2012_01_18_at_21_37_39.png

As for the versions, I'm not sure if I have multiple versions, but I can see there are two version_id rows in the ml_script_version table: Mobiel-CMP-Sync Mobiel-CMP-Synchronization Here is the screenshot: http://s13.postimage.org/rtuoaboyv/Screen_shot_2012_01_18_at_21_58_04.png

What can I try next?

(18 Jan '12, 15:58) Yanny
1

Based on the screen shots it looks like your most recent deployment of your sync model would be using the Mobiel-CMP-Synchronization script version. Make sure your client app uses this script version. If you are still getting errors about missing scripts, please check that you are deploying to the right consolidated database.

(18 Jan '12, 17:09) Bill Frier

I just changed the script version to Mobiel-CMP-Synchronization and the synchronization is done successfully! Now I'm getting other Ultralite errors, but that is off topic and I can fix that.

Thank you very much for the help. How do I close this thread? Which reply should I mark as the answer?

(19 Jan '12, 04:40) Yanny

I guess it's common practise here to "close" threads by just accepting one answer - you can also "close" the question itself, but that is rarely used.

If none of the answers here seems fitting as "solution", feel free to add one answer on your own to "summarize" the steps that helped to get you going, and accept that one:)


FWIW: That's just my way of acting here, please treat that as a mere suggestion, fortunately there's no "right or wrong behaviour" in this forum...

(19 Jan '12, 05:30) Volker Barth
1

FWIW, I moved up some details to this answer from a comment, because I think the essence of the solution around the -63 error was around gateway and firewall in this issue. However, I upvoted Jeff's answer because that would have been the next problem to solve. There were a few other things that came up along the way too. A team effort. Thanks everyone!

(19 Jan '12, 07:58) Bill Frier
More comments hidden
showing 5 of 18 show all flat view
StreamHTTPParms streamParms = (StreamHTTPParms) syncParms.getStreamParms();
streamParms.setHost("109.205.192.1");
streamParms.setPort(config.getPortNumber());

mlsrv12 -c "dsn=mobiel-cmp;uid=xxx;pwd=xxx" -x tcpip(port=3306)

You're requesting HTTP synchronization from your UltraLiteJ client code (which is the only protocol UltraLiteJ supports), but starting a regular TCP listener (-x tcpip) on your MobiLink server. You'll need to start the HTTP protocol instead, using "-x http":

mlsrv12 -c "dsn=mobiel-cmp;uid=xxx;pwd=xxx" -x http(port=3306)
permanent link

answered 23 Dec '11, 10:57

Jeff%20Albion's gravatar image

Jeff Albion
10.7k171174
accept rate: 24%

After starting up with HTTP(port=3306) and running the application, it still has the same error code. :( How can I see this Mobilink server can communicate with the application?

(23 Dec '11, 15:16) Yanny

How can I see this Mobilink server can communicate with the application?

This sounds like you have a general networking issue that you need to resolve with traditional network diagnostics. (e.g. WireShark)


Now it appears that the HTTP socket you have specified on the host is no longer open (closed) - it was filtered (open) when I checked it last.

You can check a remote port's status using nmap.

===========
Host is up (0.15s latency).
PORT     STATE  SERVICE
3306/tcp closed mysql
===========

(27 Dec '11, 09:46) Jeff Albion

Yanny,

Yes, this is a network error. Please provide details about the MobiLink server and client. Is the UltraLiteJ application running in the emulator? Or, is it running on a device? If so, what is the network being used? Is the server reachable via that IP address from a web browser? Thanks.

permanent link

answered 22 Dec '11, 14:50

Andy%20Quick's gravatar image

Andy Quick
2.1k2436
accept rate: 43%

The default gateway IP address is 109.205.192.1. This is the address of the computer where the SQLAnywhere and Mobilink is installed. If we type in the default gateway address in the web browser we can see it's up and running. Try it yourself.

But I'm wondering if the Mobilink server is using the same address as the default gateway address?

Anyway, we started the Mobilink server using this command line: mlsrv12 -c "dsn=mobiel-cmp;uid=xxx;pwd=xxx" -x tcpip(port=3306)

The UltraliteJ application is running on a mobile device. What address this one is using I really don't have any idea.

(23 Dec '11, 06:16) Yanny
1

The fact that you can browse to the host that is running MobiLink indicates that you have network connectivity.

Does your application have permissions to make an internet connection? This line should be in your AndroidManifest.xml:

    <uses-permission android:name="android.permission.INTERNET"/>

You could also try a Wifi connection, if the host running MobiLink is addressible on a Wifi network.

(29 Dec '11, 10:40) Andy Quick
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×266
×128
×123

question asked: 22 Dec '11, 13:36

question was seen: 7,516 times

last updated: 15 Mar '13, 21:28