Projects tigase _server server-core Issues #903
comp-name for pubsub needs to be pubsub (#903)
Ingo Krabbe opened 7 years ago

I found a very strange bug, that is possible just no bug, but a misunderstood configuration option, but still this is very confusing and error prone. So my proposal would be to change the behavior of tigase at this part.

You can understand this faster when I tell you a little story of what I did and what happened, because with a little change I can turn this error on and off:

A colleague in our office building proposed a little configuration for the pubsub component in the init.properties file:

--comp-name-2=events
--comp-class-2=tigase.pubsub.PubSubComponent

Because our PubSub Component should be a kind of event queue.

Now I connect two test users to my local test domain "user1@test.domain" and "user2@test.domain". To quickly test the connection and the presence protocol, I authorize both users to see each other with pidgin. Once both have added each other to some buddy list, the user1 gets status "406 not acceptable", while user2 is "online". Remember "user1" is buddy of "user2" and vice versa, Both are visible in the same client. But you can get the same results with two clients.

Restarting the server, reconnecting both users leave both users in 406 state. At least this is a symmetric behavior.

Now I change the component name from "events" to "pubsub".

--comp-name-2=pubsub
--comp-class-2=tigase.pubsub.PubSubComponent

I reconnect my users that could not see each other and "magic", both are online.

For fun I replaced the name "pubsub" with "funsub" actually I did named it slightly different, but that is to rude for the public ;)

and restarted the server again.

Again I get the 406er status codes.

So changing the name of a component results in the failure of the component.

This error was very hard to find as you can guess.

Either remove the processing of --comp-name at least for the PubSub component, because changing it from its default value to another value breaks the server, or fix this error that the PubSub component can get any name, but still works.

Andrzej Wójcik (Tigase) commented 7 years ago

I have one question, to clarify this issue. There is no use of PubSub component when XMPP clients are communicating with exchange of messages, iqs and presences.

However, this issue may happen if PEP is enabled (@pep@ processor in the SessionManager (@sess-man@) is enabled) and you changed the name of PubSub component but have not changed the address of PubSub component in a PEP processor.

So my question is:

Was PEP processor in SessionManager enabled?

If so, was the configuration of PEP processor adjusted somehow?

With PEP disabled, you should be able to usage PubSub with a different name without any issues. With PEP enabled, you are required to adjust address of PubSub component in PEP processor settings.

Ingo Krabbe commented 7 years ago
--sm-cluster-strategy-class=tigase.cluster.strategy.DefaultClusteringStrategy
--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-state,+presence-subscription,+basic-filter,+domain-filter,+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,+pep,+zlib,+amp

or a bit more readable by pushing sm-plugins through | tr ',' '\n' | tr -d '\\'

+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-state
+presence-subscription
+basic-filter
+domain-filter
+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
+pep
+zlib
+amp

Seems that

a) yes, the pep processor is enabled in the session manager, but

b) no, I cannot see some configurations adjusting the pep processor.

Anyway, if there is such a subtle dependency this at least has to be documented, I guess.

Also I cannot find the place where to "adjust address of PubSub component in PEP processor settings".

For more cross dependencies, here is our complete "init.properties" file with credentials stripped:

config-type=--gen-config-def
--cluster-mode=true
--virt-hosts = SomeVirtualHostsAND,localhost
--admins=Private-Data

http/setup/admin-credentials=admin:admin

--user-db-uri=jdbc:mysql://tigaseqa.cvroo3yhsnfj.eu-west-1.rds.amazonaws.com:3306/tigase?user=JustSomeone&password=NoneOfYourConcern&useUnicode=true&characterEncoding=UTF-8&autoCreateUser=true&autoReconnect=true&noAccessToProcedureBodies=true

--auth-db[qa-chat.protel.net,bwiqa-chat.protel.net]=protel.xmpp.TigaseProtelChatAuth
--auth-db-uri[qa-chat.protel.net,bwiqa-chat.protel.net]=http://internal-winapi-internal-qa-208142009.eu-west-1.elb.amazonaws.com/message/1/xmppauth

--cm-see-other-host=none
--sm-cluster-strategy-class=tigase.cluster.strategy.DefaultClusteringStrategy
--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-state,+presence-subscription,+basic-filter,+domain-filter,+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,+pep,+zlib,+amp

--amp-security-level=NONE

--comp-name-1=conference
--comp-class-1=tigase.muc.MUCComponent
conference/default_room_config/muc#roomconfig_persistentroom=true
conference/default_room_config/muc#roomconfig_publicroom=true
conference/default_room_config/muc#roomconfig_changesubject=true
conference/default_room_config/muc#maxhistoryfetch=500
conference/muc-lock-new-room[B]=false
conference/message-filter-enabled[B]=false

--comp-name-2=pubsub
--comp-class-2=tigase.pubsub.PubSubComponent

--comp-name-3=http
--comp-class-3=tigase.http.HttpMessageReceiver

--comp-name-4=ext
--comp-class-4=tigase.server.ext.ComponentProtocol
--external=none-of-your-concern...

--comp-name-5=echo
--comp-class-5=EchoComponent

BTW: It helps if you point me to the "PEP processor settings".

Andrzej Wójcik (Tigase) commented 7 years ago

I've added documentation of PEP plugin settings for upcoming version 8.0.0 of Tigase XMPP Server.

In case of version 7.1.0, I've checked and it is required for PubSub component to be named pubsub to be able to use PEP processor. Settings of PEP processor which I mentioned before, occurred to be introduced in the newest version (8.0.0) which will be released soon.

issue 1 of 1
Type
Bug
Priority
Normal
Assignee
RedmineID
6331
Version
tigase-server-7.1.2
Spent time
2h 30m
Issue Votes (0)
Watchers (0)
Reference
tigase/_server/server-core#903
Please wait...
Page is in error, reload to recover