使用tigase管理命令 tclmt 中的add-user 出现错误的解决记录

文章详细记录了解决Tigase服务器使用tclmt添加用户时遇到NullPointerException错误的过程,包括错误排查、日志分析及最终解决方法。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

使用 tigase 的 tclmt 进行添加用户,下载tclmt安装包,安装后,

cd tclmt

bin/tclmt.sh -u admin@tigase1.local -p 123456  add-user test21 123456 test21@tigase1.local


然后显示 awaiting response.... 3分钟后;出现错误;


完整的错误信息如下;


INFO: Create empty DB.

awaiting response...

Error executing script add-user

        java.lang.NullPointerException


java.net.SocketException: Socket is closed


上去看了 tigase.org ,以tclmt NullPointerException为关键字搜索一下,看是否有人碰到这样的问题;

倒是有几个人碰到,有的人是是因为没有在 etc/init.properties 中对管理员进行正确的设置;

如:--admins=admin@tigase1.local

那么这个用户 admin@tigase1.local 必须真实有效的存在;可以先通过客户端进行注册管理;


也有人提醒要这样子输入;

bin/tclmt.sh -u admin@tigase1.local -p 123456 -ip 127.0.0.1 remote sess-man add-user test21 123456 test21@tigase1.local

或者对某些地方加引号

bin/tclmt.sh -u admin@tigase1.local -p 123456 -ip 127.0.0.1 remote sess-man add-user test21 123456 "test21@tigase1.local"


这些方法,都试过后,发现还是不行;


后来,我去看了日志;日志没有明显的报错,很奇怪,我就搜索 日志里面的 type="error" 的xml;发现会有这样的信息提示;

There is no implementation for such command on the server


后来我根据这个到tigase的官网搜索,才找到问题的根源;

这 位老兄也碰到这个问题;http://www.tigase.org/content/tclmt-not-working-session- manager-logs-warning-there-no-implementation-such-command-server


主要原因是没有安装 admin 的 ad-hoc scripts  的groovy脚本;


搜索一下怎样安装,原来旧版本是会默认在 tigase-server/scripts/admin下。但是新版本放到了 src/main/groovy/tigase/admin/

所以执行 copy命令  src/main/groovy/tigase/admin/ to: scripts/admin/

即可;


重启一下服务器,log会提示;Loaded admin command from file

ok,加载成功;

运行这个,

bin/tclmt.sh -u admin@tigase1.local -p 123456  add-user test21 123456 test21@tigase1.local


一切正常;


虽 然调试正常了,但是很奇怪,部署在本地的tigase,并不会报xml中的There is no implementation for such command on the server错误;害得我一度以为不是这个问题引起了。还好总算都留点心,找到问题的解决办法了。


转载于:https://my.oschina.net/vdroid/blog/228452

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值