Project

General

Profile

Configuring and using pubsub component problem

m m
Added about 5 years ago

I have an Asterisk server that i wanted to integrate it with tigase. I compiled the res_xmpp.so module of asterisk and configured it. On both servers it is configured properly

[general]

debug=yes

autoregister=yes

collection_nodes=yes

pubsub_autocreate=yes

[tigase]

type=client

serverhost=192.168.20.105

username=server1@localhost/voip1

;pubsub_node=pubsub.192.168.20.105

secret=123456

priority=25

port=5222

usetls=yes

usesasl=yes

status=available

statusmessage="I am available"

timeout=5

buddy=server2@localhost/voip2

distribute_events=yes

The above is a sample configuration. I also configured Tigase. Servers can connect to Tigase with no problem and xmpp show connections and xmpp show buddies works fine. But i have one problem when it comes to sharing state using XMPP Pub-Sub i get the following error:

feature-not-implemented

or:

Feature not supported yet.

My init.properties is like the following:

--cluster-mode = true

config-type = --gen-config-def

--debug = server,xmpp,net

--user-db = mysql

--admins = admin@localhost

--user-db-uri = jdbc:mysql://localhost/tigasedb?user=root&password=no

--virt-hosts = localhost

--comp-name-3 = message-archive

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

--comp-class-2 = tigase.socks5.Socks5ProxyComponent

--comp-name-2 = proxy

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

--comp-name-1 = muc

--sm-plugins = +message-archive-xep-0136

#--ssl-container-class=tigase.extras.io.PEMSSLContextContainer

#--ssl-container-class=tigase.io.SSLContextContainer

--comp-name-1=pubsub

--comp-class-1=tigase.pubsub.PubSubComponent

How should i configure pubsubnode in the xmpp.conf? i used IP address for my server.


Replies (5)

Avatar?id=6023&size=32x32

Added by Artur Hefczyc TigaseTeam about 5 years ago

The problem is probably with the Tigase configuration. You have:

--comp-class-1 = tigase.muc.MUCComponent
--comp-name-1 = muc
--comp-name-1=pubsub
--comp-class-1=tigase.pubsub.PubSubComponent

As you can see you assigned the same number to both the MUC and PubSub component. Considering other configuration for other components a correct configuration for PubSub would be:

--comp-name-4=pubsub
--comp-class-4=tigase.pubsub.PubSubComponent
(1)

Added by m m about 5 years ago

I changed my config to:

config-type=--gen-config-def

#config-type= --gen-config-all

--admins=admin@localhost

--virt-hosts=tigase.lc

--debug=server

--user-db=mysql

--user-db-uri = jdbc:mysql://localhost/tigasedb?user=root&password=no

--comp-name-1=pubsub

--comp-class-1=tigase.pubsub.PubSubComponent

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

--comp-name-2 = muc

--sm-plugins = +message-archive-xep-0136

--comp-name-3 = message-archive

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

--comp-class-4 = tigase.socks5.Socks5ProxyComponent

--comp-name-4 = proxy

But it gives me feature not implemented again!!!

(1)

Added by m m about 5 years ago

How to create a pub/sub node in tigase? Is that necessary to create the node manually? I think the problem is because of node creation.

Added by Wojciech Kapcia TigaseTeam about 5 years ago

As per XEP-0060

<iq type='set'
    from='admin@localhost/resource'
    to='pubsub.localhost'
    id='create1'>
  <pubsub xmlns='http://jabber.org/protocol/pubsub'>
    <create node='new_node'/>
  </pubsub>
</iq>

As you can see from example nightly test result PubSub node creation works just fine.

If you could provide sample exchange / stanza that you are using to create node / excerpt from tigase logs (with @--debug=server,xmpp.impl,pubsub@) it would be easier to determine what causes the problem.

Added by Bradley Watkins almost 5 years ago

Obviously an example of stanzas as per the request above would be nice, but I suspect based on your Asterisk configuration that you aren't sending to the appropriate component. You'll see the 'to' being '192.168.20.105'. Given your configuration of Tigase, you should probably set the pubsub_node to 'pubsub.tigase.lc' (or pubsub. if you have a real domain set up). The reason you get 'feature not implemented' is because you're sending the initial request to the base XMPP server and not the pubsub component.

    (1-5/5)