首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >tigase XMPP服务器的域连接问题

tigase XMPP服务器的域连接问题
EN

Stack Overflow用户
提问于 2013-09-19 16:33:36
回答 2查看 2.3K关注 0票数 1

我刚刚开始研究tigase XMPP服务器,并在为spark客户端连接配置服务器时遇到问题。

服务器打印:

代码语言:javascript
复制
C:\Tigase>java -cp "jars/tigase-server.jar;libs/*" -Djdbc.drivers=com.mysql.jdbc.Driver tigase.server.XMPPServer --property-file etc/init.properties
2013-09-18 00:39:14  DNSResolver.<clinit>()              WARNING:  Resolving default host name took: 935
2013-09-18 00:39:14  ConfiguratorAbstract.parseArgs()    CONFIG:   Setting defaults: --property-file=etc/init.properties
2013-09-18 00:39:14  ConfiguratorAbstract.parseArgs()    CONFIG:   Loading initial properties from property file: etc/init.properties
2013-09-18 00:39:14  ConfiguratorAbstract.parseArgs()    CONFIG:   Added default config parameter: (--user-db=pgsql)
2013-09-18 00:39:14  ConfiguratorAbstract.parseArgs()    CONFIG:   Added default config parameter: (--admins=admin@BIB)
2013-09-18 00:39:14  ConfiguratorAbstract.parseArgs()    CONFIG:   Added default config parameter: (--user-db-uri=jdbc:postgresql://localhost/tigasedb?user=tigase&password=bib)
2013-09-18 00:39:14  ConfiguratorAbstract.parseArgs()    CONFIG:   Added default config parameter: (config-type=--gen-config-def)
2013-09-18 00:39:14  ConfiguratorAbstract.parseArgs()    CONFIG:   Added default config parameter: (--virt-hosts=BIB)
2013-09-18 00:39:14  ConfiguratorAbstract.parseArgs()    CONFIG:   Added default config parameter: (--debug=server)
2013-09-18 00:39:14  MessageRouter.addRegistrator()      INFO:     Adding registrator: Configurator
2013-09-18 00:39:14  MessageRouter.addComponent()        INFO:     Adding component: Configurator
2013-09-18 00:39:14  ConfiguratorAbstract.componentAdded()  CONFIG:  component: basic-conf
2013-09-18 00:39:14  ConfiguratorAbstract.setup()        CONFIG:   Setting up component: basic-conf
2013-09-18 00:39:14  ConfiguratorAbstract.setup()        CONFIG:   Component basic-conf defaults: {component-id=basic-conf@blos1, def-hostname=blos1, admins=[Ljava.lang.String;@506c6ce7, scripts-dir=scripts/admin, command/ALL=ADMIN, logging/.level=CONFIG, logging/handlers=java.util.logging.ConsoleHandler java.util.logging.FileHandler, logging/java.util.logging.ConsoleHandler.formatter=tigase.util.LogFormatter, logging/java.util.logging.ConsoleHandler.level=WARNING, logging/java.util.logging.FileHandler.append=true, logging/java.util.logging.FileHandler.count=5, logging/java.util.logging.FileHandler.formatter=tigase.util.LogFormatter, logging/java.util.logging.FileHandler.limit=10000000, logging/java.util.logging.FileHandler.pattern=logs/tigase.log, logging/tigase.useParentHandlers=true, logging/java.util.logging.FileHandler.level=ALL, logging/tigase.server.level=ALL, user-domain-repo-pool=tigase.db.UserRepositoryMDImpl, auth-domain-repo-pool=tigase.db.AuthRepositoryMDImpl, user-repo-po
ol-size=1, user-repo-class=pgsql, user-repo-url=jdbc:postgresql://localhost/tigasedb?user=tigase&password=bib, auth-repo-class=tigase.db.jdbc.TigaseCustomAuth, auth-repo-url=jdbc:postgresql://localhost/tigasedb?user=tigase&password=bib, ssl-container-class=tigase.io.SSLContextContainer, ssl-certs-location=certs/, ssl-def-cert-domain=default}
2013-09-18 00:39:14  ConfiguratorAbstract.setup()        CONFIG:   Component basic-conf configuration: {component-id=basic-conf@blos1, def-hostname=blos1, admins=[Ljava.lang.String;@506c6ce7, scripts-dir=scripts/admin, command/ALL=ADMIN, logging/.level=CONFIG, logging/handlers=java.util.logging.ConsoleHandler java.util.logging.FileHandler, logging/java.util.logging.ConsoleHandler.formatter=tigase.util.LogFormatter, logging/java.util.logging.ConsoleHandler.level=WARNING, logging/java.util.logging.FileHandler.append=true, logging/java.util.logging.FileHandler.count=5, logging/java.util.logging.FileHandler.formatter=tigase.util.LogFormatter, logging/java.util.logging.FileHandler.limit=10000000, logging/java.util.logging.FileHandler.pattern=logs/tigase.log, logging/tigase.useParentHandlers=true, logging/java.util.logging.FileHandler.level=ALL, logging/tigase.server.level=ALL, user-domain-repo-pool=tigase.db.UserRepositoryMDImpl, auth-domain-repo-pool=tigase.db.AuthRepositoryMDImpl, user-re
po-pool-size=1, user-repo-class=pgsql, user-repo-url=jdbc:postgresql://localhost/tigasedb?user=tigase&password=bib, auth-repo-class=tigase.db.jdbc.TigaseCustomAuth, auth-repo-url=jdbc:postgresql://localhost/tigasedb?user=tigase&password=bib, ssl-container-class=tigase.io.SSLContextContainer, ssl-certs-location=certs/, ssl-def-cert-domain=default}
Loading plugin: session-close=4 ...
Loading plugin: session-open=4 ...
Loading plugin: default-handler=4 ...
Loading plugin: jabber:iq:register=2 ...
Loading plugin: jabber:iq:auth=8 ...
Loading plugin: urn:ietf:params:xml:ns:xmpp-sasl=8 ...
Loading plugin: urn:ietf:params:xml:ns:xmpp-bind=2 ...
Loading plugin: urn:ietf:params:xml:ns:xmpp-session=2 ...
Loading plugin: jabber:iq:roster=16 ...
Loading plugin: jabber:iq:privacy=2 ...
Loading plugin: jabber:iq:version=2 ...
Loading plugin: http://jabber.org/protocol/stats=2 ...
Loading plugin: starttls=2 ...
Loading plugin: vcard-temp=2 ...
Loading plugin: http://jabber.org/protocol/commands=2 ...
Loading plugin: jabber:iq:private=2 ...
Loading plugin: urn:xmpp:ping=2 ...
Loading plugin: presence=16 ...
Loading plugin: disco=2 ...
Loading plugin: pep=2 ...
Loading plugin: amp=2 ...

我正在windows上运行这个版本,并试图连接到一个XMPP客户端。我已经尝试了火花和建议的PSI。

我刚刚创建了一个域"BIB“,并试图通过admin@BIB用户帐户连接到tigase服务器。但是,我认为它完全没有连接,也没有看到服务器的任何反应。我可能错过了一些很小的东西。我看了tigase网站上的文件。这是基于.exe从网站下载。我已经验证了用户也是在postgres库中创建的。因此,从这个角度来看,它是起作用的。

更新后的但是,我只能让本地主机工作,但不确定原因。是否有一些外部窗口设置使psi可以识别域?

代码语言:javascript
复制
C:\Tigase>java -cp "jars/tigase-server.jar;libs/*" -Djdbc.drivers=com.mysql.jdbc.Driver tigase.server.XMPPServer --property-file etc/init.properties
2013-09-18 12:47:51  DNSResolver.<clinit>()              WARNING:  Resolving default host name took: 23
2013-09-18 12:47:51  ConfiguratorAbstract.parseArgs()    CONFIG:   Setting defaults: --property-file=etc/init.properties
2013-09-18 12:47:51  ConfiguratorAbstract.parseArgs()    CONFIG:   Loading initial properties from property file: etc/init.properties
2013-09-18 12:47:51  ConfiguratorAbstract.parseArgs()    CONFIG:   Added default config parameter: (--user-db=pgsql)
2013-09-18 12:47:51  ConfiguratorAbstract.parseArgs()    CONFIG:   Added default config parameter: (--admins=admin@localhost,admin@bib)
2013-09-18 12:47:51  ConfiguratorAbstract.parseArgs()    CONFIG:   Added default config parameter: (--user-db-uri=jdbc:postgresql://localhost/tigasedb?user=tigase&password=bib)
2013-09-18 12:47:51  ConfiguratorAbstract.parseArgs()    CONFIG:   Added default config parameter: (config-type=--gen-config-def)
2013-09-18 12:47:51  ConfiguratorAbstract.parseArgs()    CONFIG:   Added default config parameter: (--virt-hosts=bib,localhost,any-other-domain,BLOS1)
2013-09-18 12:47:51  ConfiguratorAbstract.parseArgs()    CONFIG:   Added default config parameter: (--debug=server,xmpp.XMPPIOService,cluster)
2013-09-18 12:47:51  MessageRouter.addRegistrator()      INFO:     Adding registrator: Configurator
2013-09-18 12:47:51  MessageRouter.addComponent()        INFO:     Adding component: Configurator
2013-09-18 12:47:51  ConfiguratorAbstract.componentAdded()  CONFIG:  component: basic-conf
2013-09-18 12:47:51  ConfiguratorAbstract.setup()        CONFIG:   Setting up component: basic-conf
2013-09-18 12:47:51  ConfiguratorAbstract.setup()        CONFIG:   Component basic-conf defaults: {component-id=basic-conf@blos1.bacn0.net, def-hostname=blos1.bacn0.net, admins=[Ljava.lang.String;@56a3ed9f, scripts-dir=scripts/admin, command/ALL=ADMIN, logging/.level=CONFIG, logging/handlers=java.util.logging.ConsoleHandler java.util.logging.FileHandler, logging/java.util.logging.ConsoleHandler.formatter=tigase.util.LogFormatter, logging/java.util.logging.ConsoleHandler.level=WARNING, logging/java.util.logging.FileHandler.append=true, logging/java.util.logging.FileHandler.count=5, logging/java.util.logging.FileHandler.formatter=tigase.util.LogFormatter, logging/java.util.logging.FileHandler.limit=10000000, logging/java.util.logging.FileHandler.pattern=logs/tigase.log, logging/tigase.useParentHandlers=true, logging/java.util.logging.FileHandler.level=ALL, logging/tigase.server.level=ALL, logging/tigase.xmpp.XMPPIOService.level=ALL, logging/tigase.cluster.level=ALL, user-domain-repo-pool
=tigase.db.UserRepositoryMDImpl, auth-domain-repo-pool=tigase.db.AuthRepositoryMDImpl, user-repo-pool-size=1, user-repo-class=pgsql, user-repo-url=jdbc:postgresql://localhost/tigasedb?user=tigase&password=bib, auth-repo-class=tigase.db.jdbc.TigaseCustomAuth, auth-repo-url=jdbc:postgresql://localhost/tigasedb?user=tigase&password=bib, ssl-container-class=tigase.io.SSLContextContainer, ssl-certs-location=certs/, ssl-def-cert-domain=default}
2013-09-18 12:47:51  ConfiguratorAbstract.setup()        CONFIG:   Component basic-conf configuration: {component-id=basic-conf@blos1.bacn0.net, def-hostname=blos1.bacn0.net, admins=[Ljava.lang.String;@56a3ed9f, scripts-dir=scripts/admin, command/ALL=ADMIN, logging/.level=CONFIG, logging/handlers=java.util.logging.ConsoleHandler java.util.logging.FileHandler, logging/java.util.logging.ConsoleHandler.formatter=tigase.util.LogFormatter, logging/java.util.logging.ConsoleHandler.level=WARNING, logging/java.util.logging.FileHandler.append=true, logging/java.util.logging.FileHandler.count=5, logging/java.util.logging.FileHandler.formatter=tigase.util.LogFormatter, logging/java.util.logging.FileHandler.limit=10000000, logging/java.util.logging.FileHandler.pattern=logs/tigase.log, logging/tigase.useParentHandlers=true, logging/java.util.logging.FileHandler.level=ALL, logging/tigase.server.level=ALL, logging/tigase.xmpp.XMPPIOService.level=ALL, logging/tigase.cluster.level=ALL, user-domain-repo
-pool=tigase.db.UserRepositoryMDImpl, auth-domain-repo-pool=tigase.db.AuthRepositoryMDImpl, user-repo-pool-size=1, user-repo-class=pgsql, user-repo-url=jdbc:postgresql://localhost/tigasedb?user=tigase&password=bib, auth-repo-class=tigase.db.jdbc.TigaseCustomAuth, auth-repo-url=jdbc:postgresql://localhost/tigasedb?user=tigase&password=bib, ssl-container-class=tigase.io.SSLContextContainer, ssl-certs-location=certs/, ssl-def-cert-domain=default}
Loading plugin: session-close=4 ...
Loading plugin: session-open=4 ...
Loading plugin: default-handler=4 ...
Loading plugin: jabber:iq:register=2 ...
Loading plugin: jabber:iq:auth=8 ...
Loading plugin: urn:ietf:params:xml:ns:xmpp-sasl=8 ...
Loading plugin: urn:ietf:params:xml:ns:xmpp-bind=2 ...
Loading plugin: urn:ietf:params:xml:ns:xmpp-session=2 ...
Loading plugin: jabber:iq:roster=16 ...
Loading plugin: jabber:iq:privacy=2 ...
Loading plugin: jabber:iq:version=2 ...
Loading plugin: http://jabber.org/protocol/stats=2 ...
Loading plugin: starttls=2 ...
Loading plugin: vcard-temp=2 ...
Loading plugin: http://jabber.org/protocol/commands=2 ...
Loading plugin: jabber:iq:private=2 ...
Loading plugin: urn:xmpp:ping=2 ...
Loading plugin: presence=16 ...
Loading plugin: disco=2 ...
Loading plugin: pep=2 ...
Loading plugin: amp=2 ...
2013-09-18 12:48:15  SocketThread.<clinit>()             WARNING:  33 socketReadThreads started.
2013-09-18 12:48:15  SocketThread.<clinit>()             WARNING:  33 socketWriteThreads started.

init文件:

代码语言:javascript
复制
--user-db = pgsql
--admins = admin@localhost,admin@bib    
--user-db-uri = jdbc:postgresql://localhost/tigasedb?user=tigase&password=bib
config-type = --gen-config-def
--virt-hosts = bib,localhost,any-other-domain,BLOS1
--debug = server,xmpp.XMPPIOService,cluster

使用此当前配置,localhost可以连接,但当我尝试添加一个新帐户- Psi: add帐户( name: bib ) -单击注册新帐户(服务器名称: bib,手动单击指定服务器主机/端口-主机:bib端口: 52222)时,它会发出抱怨。

与XMPP服务器通信时出错。详细信息:连接错误:无法连接到服务器

不确定为什么只有本地主机才能工作,而不是bib作为tigase服务器的域名。

平台: Windows 8版本:tigase-server-5.1.5B 3164

如有任何建议,谢谢

EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2013-09-19 23:39:15

所以我没有思考,我对网络/IP缺乏了解。

在windows上,您需要将域名注册到主机文件,即配置您的窗口网络以重新确定域。

查找主机文件:http://www.jafaloo.com/windows-hosts-file/

添加任何您想要使用的域。

有关主机文件做什么的更多信息:%28file%29

这让一切都正常了。

票数 1
EN

Stack Overflow用户

发布于 2013-09-19 18:37:19

这个很小的东西可能就是域名。我认为这个BIB域可能无法被识别,并且客户端无法连接到服务器,因为它不知道在哪里连接。客户端是否显示任何错误消息?

另外,您使用哪个版本的Tigase服务器?过去的一些版本在域名大写字符方面有问题。请在域名、Tigase配置和用户JID客户端配置中使用所有小写字符。

您还可以启用调试模式,以便更多地显示服务器中正在发生的事情。您必须检查日志文件以查看客户端的连接尝试。

最后一件事--使用Tigase服务器的默认内存设置运行Java。这只适用于开发系统。任何生产系统,请参考原始启动文件的建议设置。

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/18900306

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档