Project

General

Profile

MUC and BOSH: duplicate messages

Aleksandr Kostyrev
Added almost 5 years ago

Good day!

Our developer wrote an app (with Strophe.js) that connects to tigase bosh and sends and retrieves messages to/from MUC room.

I send '1111' message to muc (with psi+).

When he connects to this muc room he recieves two messages instead of one. He claims that it's a bug in tigase bosh.

I can confirm such behavior with tcpdump:

POST / HTTP/1.1

Host: im.example.org:5280

Connection: keep-alive

Content-Length: 428

User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.107 Safari/537.36

Origin: https://devlk.example.org

Content-Type: text/plain;charset=UTF-8

Accept: /

Accept-Encoding: gzip,deflate,sdch

Accept-Language: en-US,en;q=0.8

HTTP/1.1 200 OK

Content-Type: text/xml; charset=utf-8

Content-Length: 1377

Access-Control-Allow-Origin: *

Access-Control-Allow-Methods: GET, POST, OPTIONS

Access-Control-Allow-Headers: Content-Type

Access-Control-Max-Age: 86400

Server: Tigase Bosh/5.2.0-b3447/48635d0a (2014-02-12/17:29:15)

1111

1111

POST / HTTP/1.1

Host: im.example.org:5280

Connection: keep-alive

Content-Length: 110

User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.107 Safari/537.36

Origin: https://devlk.example.org

Content-Type: text/plain;charset=UTF-8

Accept: /

Accept-Encoding: gzip,deflate,sdch

Accept-Language: en-US,en;q=0.8


Replies (4)

(1)
Avatar?id=6023&size=32x32

Added by Artur Hefczyc TigaseTeam almost 5 years ago

Could you tell us more about the Tigase server you are using?

  1. Version

  2. Configuration

  3. Is it running in a cluster mode

(1)

Added by Andrzej Wójcik IoT 1 CloudTigaseTeam almost 5 years ago

Are you expiriencing this issue when Tigase XMPP Server is running in clustered mode?

Added by Aleksandr Kostyrev almost 5 years ago

Sorry that I forgot to add info about me setup. Silly me

1)

Name: Tigase

Version: 5.2.0-b3447/48635d0a (2014-02-12/17:29:15)

Os: Linux-amd64-2.6.32-431.5.1.el6.x86_64, Java HotSpot(TM) 64-Bit Server VM-24.45-b08-Oracle Corporation

2)

config:

--cluster-mode = true

config-type = --gen-config-def

--debug = server,cluster,muc

--bosh-extra-headers-file = etc/bosh-extra-headers.txt

--user-db = mysql

--auth-db = tigase-auth

--admins = admin@example.org

--user-db-uri = jdbc:mysql://testhost.example.org/tigasedb?user=tig_user&password=thisisnotmypassword&autoCreateUser=true

--virt-hosts = example.org

--sm-plugins = +jabber:iq:auth,+urn:ietf:params:xml:ns:xmpp-sasl,+urn:ietf:params:xml:ns:xmpp-bind,+urn:ietf:params:xml:ns:xmpp-session,+jabber:iq:register,+jabber:iq:roster,+presence,+jabber:iq:privacy,+jabber:iq:version,+http://jabber.org/protocol/stats,+starttls,+msgoffline,+vcard-temp,+http://jabber.org/protocol/commands,+jabber:iq:private,+urn:xmpp:ping,+basic-filter,+domain-filter,+pep,-zlib,+message-archive-xep-0136

--auth-db-uri = jdbc:mysql://testhost.example.org/testdb?user=tig_user&password=thisisnotmypassword

--comp-class-1 = tigase.archive.MessageArchiveComponent

--comp-name-1 = message-archive

message-archive/archive-repo-uri=jdbc:mysql://testhost.example.org/tigmsg?user=tig_user&password=thisisnotmypassword

--comp-name-2=muc

--comp-class-2=tigase.muc.MUCComponent

3) Yes, it is in cluster mode but

I checked it even with --cluster-mode = false - result is the same - I recieve two messages.

(1)
Avatar?id=6023&size=32x32

Added by Artur Hefczyc TigaseTeam almost 5 years ago

Could you please have a look at these 2 topics: Tigase Cluster Presence Issue and Tigase Presence Issue? I think these describe a similar issue which is most likely caused by the same thing. Could you confirm that this is the same problem and workaround proposed works for you? If you confirm, this is a good news because we have a fix with a proper solution prepared and will be releasing soon.

    (1-4/4)