Synthesis AG - SyncML Discussion Forum

Synthesis AG - SyncML Discussion Forum (http://forum.synthesis.ch/index.php)
-   SyncML Clients for classic PDAs (WindowsMobile, PalmOS) (http://forum.synthesis.ch/forumdisplay.php?f=2)
-   -   https problem with OX and 2.9.9.8 (Palm DBG) (http://forum.synthesis.ch/showthread.php?t=177)

dwoodruff 2006-11-19 05:23

https problem with OX and 2.9.9.8 (Palm DBG)
 
1 Attachment(s)
Lukas,

I am trying to sync to OX using Palm 2.9.9.8 version of Synthesis client.

Here are the particulars:
open-xchange-0.8.2-5 (SLES 9 SP3)
syncml-oxtender-SP1-sles9-1.2-14
Treo 700P
Synthesis v2.9.9.8 for Palm (PRO/DBG)

This works and can be found in the attached syncml_http.tcpdump:
Sync'ing Contacts via HTTP connection

This does not work and can be found in the attached syncml_https.tcpdump:
Sync'ing Contacts via HTTPS connection.
** The client just says "Waiting" and the phone locks up.
** I have to perform a reset on the device because it never aborts.
** I don't think the sysynclog_palm_session.PDB file shows the HTTPS because I had to perform a reset of the Treo.

I've also attached the tomcat log from OX (for your viewing and OX support).

NOTE: There were no changes made to Contacts (on server or Treo) in between the syncs.

Let me know if you need anything else.

Any idea what the problem could be?

Thanks,
Donnie

dwoodruff 2006-11-19 05:50

Re: https problem with OX and 2.9.9.8 (Palm DBG)
 
Lukas,

I did a quick test to a different account on OX. (A new account I set up for testing.) It sync's via https without a problem for Contacts. So, I am not sure where the problem is.

I've opened up a support ticket with OX and pointed them to this forum in case they need to communicate with you.

If you can provide any insight to what might be going on, that would be great.

Thanks,
Donnie

luz 2006-11-20 16:17

Re: https problem with OX and 2.9.9.8 (Palm DBG)
 
I would guess it is in the history of that account. SyncML servers need to save a lot of state information between sessions. Eventually, the problems caused by the WBXML parsing problems of earlier SyncML client versions have messed up that state information somehow. This would explain why it works with a "fresh" account.

Maybe there is a server side option to completely clear out the sync state information (but not the data) in the account, so that the next sync will be like an initial slow sync?

dwoodruff 2006-11-21 01:50

Re: https problem with OX and 2.9.9.8 (Palm DBG)
 
Lukas,

OX has a means of clearing out all the session data (sh /opt/openexchange/syncml/share/dbscript.sh). According to a bugzilla posting on OX's site, this will clear out all the syncml session info. This is what I think you were recommending in the previous post.

So, I have cleared this out and I am still having the same problem where the Synthesis client says "Waiting" and OX's log says they are waiting on the client:

<snip>
2006-11-20 19:38:04 StandardContext[/syncml]Receiving Alert (201) for "Private/Contacts"
2006-11-20 19:38:04 StandardContext[/syncml]Client Mode: TwoWay | Server Mode: TwoWay
2006-11-20 19:38:04 StandardContext[/syncml]Received Last Anchor does not match stored Last Anchor.
2006-11-20 19:38:04 StandardContext[/syncml]Database "Contacts" (contacts) initialized.
2006-11-20 19:38:04 StandardContext[/syncml]Preparing outgoing message
2006-11-20 19:38:04 StandardContext[/syncml]Start generating status responses
2006-11-20 19:38:04 StandardContext[/syncml]Sending Status 200 for Put
2006-11-20 19:38:04 StandardContext[/syncml]Sending Status 200 for Get
2006-11-20 19:38:04 StandardContext[/syncml]Sending Results
2006-11-20 19:38:04 StandardContext[/syncml]Sending Status 200 for Alert
2006-11-20 19:38:04 StandardContext[/syncml]Start generating server commands
2006-11-20 19:38:04 StandardContext[/syncml]Sending Alert (201) for "./contacts"
2006-11-20 19:38:04 StandardContext[/syncml]Sending Final: Closing Package#1.
2006-11-20 19:38:04 StandardContext[/syncml]Setting Connection to "Keep-Alive"
2006-11-20 19:38:04 StandardContext[/syncml]Waiting for Client-Response...

I specified "slow" sync on the Synthesis client (see receiving alert 201 above).

A couple of questions:
Anything on the client end that I can try?
Why would the Treo become unresponsive when "Waiting" for a response from the server? (I have to perform a reset each time I try this sync.)

Thanks for your help.
Donnie

VPracht 2006-11-21 11:44

Re: https problem with OX and 2.9.9.8 (Palm DBG)
 
We encountered the problem earlier. It seems to be a very buggy SSL implementation in Palm OS. The silliest things made it suddenly work. The current workaround on the server side, which works for the stable version, is to send everything byte by byte. One thing that also worked was using stunnel (stunnel.org) instead of Apache and connect to Tomcat's port 8080.

Can the client use the OpenSSL library for HTTPS?

VPracht 2006-11-22 11:51

Re: https problem with OX and 2.9.9.8 (Palm DBG)
 
Oops, after the random workarounds we have found the real problem last time: the Palm ran out of simultaneous connections. Setting the connection to "keep-alive" (see the second to last line of the server log) fixed that.

It looks like a new problem with an SSL implementation somewhere between Apache, your wireless ISP and Palm OS.

The new account probably worked because it has no data to synchronize and all SyncML packages fit into a single message/GPRS packet. Try removing contacts from the old account until it works and/or add contacts to the new account until it breaks.

luz 2006-11-22 12:16

Re: https problem with OX and 2.9.9.8 (Palm DBG)
 
Quote:

Originally Posted by VPracht (Post 435)
Oops, after the random workarounds we have found the real problem last time: the Palm ran out of simultaneous connections. Setting the connection to "keep-alive" (see the second to last line of the server log) fixed that.

Yes. Note that not using keep-alive creates problems not only with PalmOS, but with Win Mobile as well. Both have a very limited number of open sockets (I think it's 16 for Palm, and maybe 32 for Win Mobile). It is an inherent problem of TCP/IP, as for every separate connection the socket needs to stay semi-open for some minutes even after the connection is closed (so called TIME WAIT socket state).

So it's essential to avoid that a mobile application opens too many connections in a short period of time, as this inevitably leads to running out of sockets. This makes HTTP keep-alive a must for SyncML servers.

dwoodruff 2006-11-23 05:57

Re: https problem with OX and 2.9.9.8 (Palm DBG)
 
1 Attachment(s)
Using server path: contacts (all lower case) resolves this issue.

So OX/Treo 700P/Synthesis users should use the following server paths:
contacts, calendar, tasks (all lower case)

I was using Private/Contacts based on information on the OX Wiki site which appears to be inaccurate.

It looks like when using Private/Contacts, all information (tasks, calendar, and contacts) is sent to the client. Some how this is causing the dreaded "waiting on client" and "waiting on server" condition.

Hopefully Viktor and/or Lukas can look at the attached ssldumps and see why the communication probelm is occuring for https.

ssldump.contacts is a good sync using the contacts server path and https

ssldump.Private_Contacts is a bad sync using Private/Contacts server path and https.

Both files use the same userid to sync with and were initiated with the Slow sync option.

Let me know if you guys need any additional info.

Thanks for your help.
Donnie

VPracht 2006-11-23 14:12

Re: https problem with OX and 2.9.9.8 (Palm DBG)
 
"contacts" is a shortcut for the default contact folder. "Private/Contacts" names a folder explicitly by name, as it appears in the web front-end. It works only if there is a contact folder directly below "Private Folders" which is called "Contacts". Usually, this is the default contacts folder, but it doesn't show up in the logs you posted before. Did you rename it?

After comparing the two logs, I see following differences:

During the broken synchronization, the server sends all OX folders as DataStores inside the DevInf which was requested by the client. The requested folder "Private/Contacts" should show up as "Contacts", but doesn't seem to be included. Since it still can be synchronized over HTTP, and there's no 404 status code, I assume the folder exists anyway. The same DevInf in the working synchronization contains no DataStores at all. While this server behaviour is weird, the resulting messages look still valid to me.

The bigger message size during the broken synchronization seems to enable chunked HTTP transfer ecoding on the server (this is done automatically by Apache or Tomcat). The end of each message ends up divided into multiple HTTP chunks, which seem to result in even more SSL chunks, some even without payload.

After the first such message, the client starts a new session. After the same message in the second session, the log simply ends.

dwoodruff 2006-11-29 19:17

Re: https problem with OX and 2.9.9.8 (Palm DBG)
 
Viktor,

What should my server path for each of the objects be when connecting via SyncML?

The Private/Contacts, Private/Calendar, and Private/Tasks continues to have the "waiting" and server waiting for response from client problem.

Server path contacts works but server path calendar and tasks do not work.

Thanks,
Donnie


All times are GMT +2. The time now is 09:24.

Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2022, Jelsoft Enterprises Ltd.