我安装并配置了Tigase服务器,用于在多个星号服务器之间分发设备状态。服务器正常工作。它的配置文件如下:
--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我在两个不同的系统上安装了两个星号服务器。我还在这两个文件上编译了res_xmpp,并使用以下配置文件对其进行了配置:
[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我的一个服务器的用户名是server2 1@localhost/voip1,另一个服务器的用户名是server2 2@localhost/voip2。现在,xmpp模块正常工作。但是公共事件没有正确地分布。如您所见,我使用IP地址来区分Tigase服务器。如果在pubsub_node模块的res_xmpp选项中使用相同的IP地址,服务器将返回错误代码为501的“特性未实现”错误;因此,我使用了pubsub.192.168.20.105并将其设置在两个服务器的/etc/主机中,没有错误消息,但我也不会收到事件!我怎么才能解决这个问题?
发布于 2013-12-08 16:53:57
Tigase服务器和星号也有相同的问题;您的问题是设置了:
pubsub_autocreate=yes配置在您的xmpp.conf中。此选项将导致自动创建多个节点;如果您查看Tigase数据库中的tig_nodes,您将看到已经创建了许多节点。您必须注释此选项。之后,您必须重新部署Tigase SQL模式,否则必须删除所有这些节点;然后一切都会好起来。通过查看星号CLI中res_xmpp模块的调试输出,您将看到res_xmpp将尝试同时订阅多个节点,这会导致混淆,因为存在许多同名的节点;服务器将返回409和501错误。
发布于 2013-12-07 17:52:01
问题可能在于Tigase配置。你有:
--comp-class-1 = tigase.muc.MUCComponent
--comp-name-1 = muc
--comp-name-1=pubsub
--comp-class-1=tigase.pubsub.PubSubComponent如您所见,您为MUC和PubSub组件分配了相同的编号。考虑到其他组件的其他配置,PubSub的正确配置如下:
--comp-name-4=pubsub
--comp-class-4=tigase.pubsub.PubSubComponent发布于 2013-12-08 06:08:53
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现在,我的配置看起来是这样的,但是它给了我特性,而不是再次实现错误。
https://stackoverflow.com/questions/20439852
复制相似问题