Hi all,
I am developing chat feature for some android app. I am in stuck. I debugged problem for 2 days and need help.
Server: openfire 3.7, tried on ubuntu and standard Amazon EC2 linux.
Client: based on strophe.js, use http-bind.
What happens
Case1. Server and android are in local network. I run html page on android browser. Everything works like a charm.
Case2. Client connects through internet. For some reason, android browser sends identical request twice, after 60 seconds. Server says “item not found” and terminate the session. It happens both on android emulator and on real device.
Case3. Same HTML/JS on desktop - FF, Chrome - works through internet
Case4. Instead of openfire, install PROSODY. Android works!
I have tcpdump log from android side. It shows that android indeed sends identical requests (same RID). I analyzed it in wireshark and found that there are 2 tcp streams. There are options “follow TCP stream” and “hide TCP stream” in wireshark. First stream starts from user auth and ends with stanza X. Second stream starts from same stanza X.
I see on openfire server:
Tue Mar 15 18:39:05 KRAT 2011: HTTP RECV(b92b25c):
Tue Mar 15 18:40:05 KRAT 2011: HTTP SENT(b92b25c):
Tue Mar 15 **18:40:05 **KRAT 2011: HTTP RECV(b92b25c):
Tue Mar 15 18:40:05 KRAT 2011: HTTP ERR(b92b25c): terminate, item-not-found.
Tue Mar 15 18:40:05 KRAT 2011: HTTP SENT(b92b25c):
Tue Mar 15 18:40:06 KRAT 2011: HTTP RECV(b92b25c):
Brielfy. Desktop bvrowsers works, android works in local net, android works with prosody but not with openfire through internet.
Tested with 2 servers and 2 clients in 2 different cities. This is not firewall issue.
I think this is about socket options in openfire.
Thanx for any ideas.
I can send tcpdump file for analisis.