问题
I'm just started looking into the tigase XMPP server and having issue configuring the server for a spark client to connect.
server print out:
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 ...
I'm running this version on windows and trying to connect with a XMPP client. I've tried with both spark and the suggested PSI.
I just made up a domain "BIB" and tried to connect to the tigase server through the admin@BIB user account. However, I don't see it connect at all or any reaction from the server. I'm probably missing something really small. I looked at the documentation on the tigase website. This is based off the .exe download from the website. I've verified that the user has been created in the postgres library as well. So from that standpoint it is working.
Updated------------------ So the problem has to deal with the domain name like Artur Mentioned. However, I can only get localhost to work and not sure why. Is there some external window settings i have to do to make the domain recognizable by psi
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 file:
--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
With this current configuration, localhost can connect but when i try to add a new account - Psi: Add Account (Name:bib) - clicked register new account (Server name: bib, clicked manually specify server host/port - Host: bib port: 52222) and it would complain
"There was error communicating with the XMPP server. Details: Connection Error: Unable to connect to server"
Not sure why only localhost works and not bib as domain names for the tigase server.
Platform: Windows 8 Version: tigase-server-5.1.5-b3164
Any advice appreciated, Thanks D
回答1:
This something really small is probably the domain name. I think this BIB domain may not be recognized and the client cannot connect to the server because it does not know where to connect. Is the client showing you any error message?
Also, what version of the Tigase server do you use? Some past versions had problems with uppercase characters in the domain name. Please use all lowercase characters in domain name, in both the Tigase configuration and in the client configuration for the user's JID.
You can also enable debug mode so it shows you more of what is going on in the server. You have to check log files to see client's connections attempts.
And the last thing - you run Java with default memory settings for the Tigase server. This is fine only for development system. For any production system, please refer to original startup files for recommended settings.
回答2:
K so I wasn't thinking and my knowledge of network/IP is lacking.
On windows you need to register the domain name with the host file aka configure your window network to recongize the domain
To find your host file: http://www.jafaloo.com/windows-hosts-file/
Add whatever domain you want to use.
For more information on what a host file does: http://en.wikipedia.org/wiki/Hosts_%28file%29
This made everything work.
来源:https://stackoverflow.com/questions/18900306/domain-connection-issues-with-tigase-xmpp-server