你好,游客 登录 注册 搜索
背景:
阅读新闻

Tigase服务器安装以及集群

[日期:2014-04-11] 来源:Linux社区  作者:fslc2004 [字体:大 中 小]

安装第二台tigase服务器实现集群
1.
安装部署与第一台tigase服务器一样,只是选择数据库时不是选择本地,而是选择安装在第一台tigase服务器上的数据库,实现一台数据库做了后端集群,也是目前最简单最实用的方法。


安装时不同之处如下:

PostgreSQLdatabase details. It will be created automatically if it does notexist.

 


Databaseaccount: [tigase]

Tigase                        #存放tigase数据的用户、密码以及数据库相同

Accountpassword: [tigase12]

tigase

Databasename: [tigasedb]

tigasedb

Databasehost or IP: [localhost]

192.168.3.180                  #设置数据库连接安装在第一台tigase服务器的数据库.

 


最后输出时显示信息有一点不一样。

PerformingDB tasks

 


Checkingconnection to the database 

ConnectionOK

Checkingif the database exists 

ExistsOK

Checkingthe database schema 

SchemaOK, accounts number: 7

Checkingwhether the database needs conversion 

Conversionnot needed

AddingXMPP admin accounts  Apr 05, 2014 1:41:17 PMtigase.db.jdbc.DataRepositoryImpl initRepository

INFO:Table schema found: public, database type: postgresql, databasedriver: org.postgresql.Driver

Apr05, 2014 1:41:17 PM tigase.db.jdbc.DataRepositoryImpl initRepository

INFO:Initialized database connection:jdbc:postgresql://192.168.3.180/tigasedb?user=postgres&password=postgres

Allusers added

Postinstallation actions 

Finalizing...completed OK

Loadingsocks5 component schema 

Loadingsocks5 schema...

Socks5schema exists, skipping schema load

LoadingPubSub component schema 

LoadingPubSub schema...

PubSubschema exists, skipping schema load

 


重启两台服务器查看日志

tigase-console.log tigase.log.0

出现以下日志表示集群成功.

2014-04-0513:51:56.486 [ConnectionOpenThread] ClusterConnectionManager.serviceStarted()  INFO: cluster connectionopened: 192.168.3.181, type: connect,id=192.168.3.180_54221_192.168.3.181_5277

 


如不从启服务有可能出现以下日志

2014-04-0513:51:41.400 [pool-16-thread-5] ClusterConnectionManager.processHandshake()  WARNING: Handshakingpassword doesn't match, disconnecting: null, type: accept, Socket:nullSocket[addr=/192.168.3.180,port=54219,localport=5277], jid: null

 


重启服务都不行,就有可能是域名解析的原因.可用hostname–f查看你计算机的FQDN,tigase5.2后安装就实现自动集群,但对计算机的FQDN比较严格.

如:

[root@tigase3logs]# hostname -f

tigase3.test.com

[root@tigase4logs]# hostname -f

tigase4.test.com

如hostname–f出来是未知主机,那集群将无法实现.改正以下两个地方

/etc/hosts

/etc/sysconfig/network

 


安装后系统集群成功后默认可以在不同服务器上登录以及添加联系人,但建立room后不能实现不同服务器之前通信.

实现方法如下:

1检查/opt/tigase-server/jars下是否有tigase-acs.jar包,如果没有可到官网下载max包,解压后再复制进去,MAX包是最完整的,一般推荐下这个,然后按需所取即可!

2.修改两台集群服务器的/opt/tigase-server/etc/init.properties文件.

将--comp-class-1= tigase.muc.MUCComponent改为

--comp-class-1= tigase.muc.cluster.MUCComponentClustered

两台集群服务器配置都改成一样.

重新启动tigase服务,测试成功.

linux
相关资讯       tigase 
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款