Project

General

Profile

Configuration question.

Slava Bendersky
Added over 3 years ago

Hello Everyone,

Having some issue to start tigase server properly. Can't load main components.

[root@xmpp tigase]# rpm -qa | grep tigase
tigase-server-7.0.2-4.fc21.noarch

2015-07-04 19:15:54.480 [main]             MessageRouterConfig.hasClassForServerComponent()  WARNING: Can't load component filetrans: tigase.filetrans.FileTransComponent
2015-07-04 19:15:54.480 [main]             MessageRouterConfig.hasClassForServerComponent()  WARNING: Can't load component http: tigase.http.HttpMessageReceiver
2015-07-04 19:15:54.480 [main]             MessageRouterConfig.hasClassForServerComponent()  WARNING: Can't load component message-archive: tigase.archive.MessageArchiveComponent
2015-07-04 19:15:54.480 [main]             MessageRouterConfig.hasClassForServerComponent()  WARNING: Can't load component muc: tigase.muc.MUCComponent
2015-07-04 19:15:54.487 [main]             MessageRouterConfig.hasClassForServerComponent()  WARNING: Can't load component pubsub: tigase.pubsub.PubSubComponent
2015-07-04 19:15:54.662 [main]             ConfigRepository.setProperties()   WARNING:  Items list is not set in the configuration file!!
2015-07-04 19:15:54.676 [main]             MonitorComponent.setProperties()   WARNING:  {}
2015-07-04 19:15:54.998 [main]             ConfigurationCache.store()         WARNING:  Dumping server configuration to: /etc/tigase/config-dump.properties
2015-07-04 19:16:01.891 [ConnectionOpenThread]  SocketThread.<clinit>()       WARNING:  5 socketReadThreads started.
2015-07-04 19:16:01.893 [ConnectionOpenThread]  SocketThread.<clinit>()       WARNING:  5 socketWriteThreads started.

Here configuration file.


config-type = --gen-config-def
--admins = admin@$HOST.
--user-db = mysql
--user-db-uri = jdbc:mysql://db_host/db?user=db_user&password=db_password&useUnicode=true&characterEncoding=UTF-8&autoCreateUser=true
--virt-hosts = networklab.ca
--vhost-anonymous-enabled = false
--vhost-register-enabled = true
--vhost-tls-required = true
--vhost-max-users = 150
--debug = server,pubsub,archive
--auth-db = tigase-custom
--auth-db-uri = jdbc:mysql://db_host/db?user=db_user&password=db_password
--user-db = mysql
--user-db-uri = jdbc:mysql://db_host/db?user=db_user&password=db_password
--ssl-container-class = tigase.io.SSLContextContainer
--ssl-certs-location = /etc/pki/tigase/certs
--ssl-def-cert-domain = networklab.ca
--sm-plugins = +message-archive-xep-0136,+jabber:iq:auth,+urn:ietf:params:xml:ns:xmpp-sasl,+urn:ietf:params:xml:ns:xmpp-bind,+urn:ietf:params:xml:ns:xmpp-session,+jabber:iq:register,+jabber:iq:roster,+presence,+jabber:iq:privacy,+jabber:iq:version,+roster-presence,+http://jabber.org/protocol/stats,+starttls,+vcard-temp,+http://jabber.org/protocol/commands,+jabber:iq:private,+urn:xmpp:ping,+basic-filter,+domain-filter,+pep,+zlib,+amp,-message,-msgoffline
--client-access-policy-file = /etc/tigase/client-access-policy.xml
--cross-domain-policy-file = /etc/tigase/cross-domain-policy.xml
--bosh-extra-headers-file = /etc/tigase/bosh-extra-headers-file.txt
--bosh-ports = 5280,5281
--filetrans-ports = 2021
--comp-name-1 = http
--comp-class-1 = tigase.http.HttpMessageReceiver
--comp-name-2 = message-archive
--comp-class-2 = tigase.archive.MessageArchiveComponent
--comp-name-3 = pubsub
--comp-class-3 = tigase.pubsub.PubSubComponent
--comp-name-4 = muc
--comp-class-4 = tigase.muc.MUCComponent
--comp-name-5 = filetrans
--comp-class-5 = tigase.filetrans.FileTransComponent
## Monitoring
##monitoring = jmx:9521,http:9522
##stats-history = 2160,10
## User verify
basic-conf/auth-repo-params/conn-valid-query = select 1
basic-conf/auth-repo-params/user-login-query = { call TigUserLoginPlainPw(?, ?) }
basic-conf/auth-repo-params/users-count-query = { call TigAllUsersCount() }
basic-conf/auth-repo-params/add-user-query = { call TigAddUserPlainPw(?, ?) }
basic-conf/auth-repo-params/del-user-query = { call TigRemoveUser(?) }
basic-conf/auth-repo-params/get-password-query = select user_pw from tig_users where user_id = ?
basic-conf/auth-repo-params/update-password-query = update tig_users set user_pw = ? where user_id = ?
basic-conf/auth-repo-params/user-logout-query = update tig_users set online_status = online_status - 1 where user_id = ?
basic-conf/auth-repo-params/non-sasl-mechs = password,digest
basic-conf/auth-repo-params/sasl-mechs = PLAIN,DIGEST-MD5
## Fedora/RHEL changes
## Change locations of certificates to be in line with the rest of the system
c2s/connections/tls/keys-store = /etc/pki/tigase/xmpp_server.jks
c2s/connections/tls/keys-store-password = ''
c2s/connections/tls/def-cert-alias = xmpp_server-cert
s2s/connections/tls/keys-store=/etc/pki/tigase/xmpp_server.jks
s2s/connections/tls/keys-store-password = ''
s2s/connections/tls/def-cert-alias = xmpp_server-cert
bosh/connections/tls/keys-store=/etc/pki/tigase/xmpp_server.jks
bosh/connections/tls/keys-store-password = ''
bosh/connections/tls/def-cert-alias = xmpp_server-cert
## logging should have limits and sane location
basic-conf/logging/java.util.logging.FileHandler.limit = 100000000
basic-conf/logging/java.util.logging.FileHandler.count = 20
basic-conf/logging/java.util.logging.FileHandler.pattern = /var/log/tigase/tigase.log
basic-conf/config-dump-file = /etc/tigase/config-dump.properties
basic-conf/auth-repo-params/sasl-mechs = PLAIN,DIGEST-MD5
## BOSH
bosh/connections/5281/socket = ssl
bosh/connections/5281/type = accept
## Message Archive
message-archive/archive-repo-uri = jdbc:mysql://db_host/db?user=db_user&password=db_password
sess-man/plugins-conf/message-archive-xep-0136/store-muc-messages = true
sess-man/plugins-conf/message-archive-xep-0136/component-jid = message-archive@$HOST
sess-man/plugins-conf/message-archive-xep-0136/required-store-method = message
## PubSub
#pubsub/pubsub-repo-class = tigase.pubsub.repository.PubSubDAOJDBC
#pubsub/pubsub-repo-url = jdbc:mysql://db_host/db?user=db_user&password=db_password
## MUC
muc/muc-repo-url = jdbc:mysql://db_host/db?user=db_user&password=db_password
muc/history-db-uri = jdbc:mysql://db_host/db?user=db_user&password=db_password
#muc/muc-lock-new-room[B]=false
#muc/message-filter-enabled[B] = false
#muc/muc-allow-chat-states[B] = true
## AMP
--amp-repo-uri = jdbc:mysql://db_host/db?user=db_user&password=db_password
--amp-security-level = STRICT
sess-man/plugins-conf/amp/amp-jid = amp@$HOST


Replies (22)

Added by Slava Bendersky over 3 years ago

I found where the problem, but no idea how to call CLASSPATH correctly.

I need load rest missed.

This is not right tigase-message-archive

CLASSPATH=$(build-classpath tigase-muc tigase-pubsub tigase-extras mysql-connector-java)

Added by Andrzej Wójcik IoT 1 CloudTigaseTeam over 3 years ago

It looks like RPM you used to install Tigase XMPP Server on your server is prepared only to install ONLY Tigase XMPP Server without additional Tigase XMPP Server components. This explains why CLASSPATH is not correct - as I assume that RPM was responsible for this CLASSPATH, and also explains issue with missing component - caused by CLASSPATH or by missing JAR file.

Also looking at bug your reported #3256 I suppose that issue here is that as a source for this RPM is used old repository of Tigase XMPP Server as we are no longer using https://repository.tigase.org/reps/tigase-server/trunk/ as we moved from SVN to GIT a long time ago and our project page Tigase XMPP Server - Repository contains new location of our GIT repository.

Added by Slava Bendersky over 3 years ago

Hello Andrzej,

Here directory with all jars,

Can you tell me what names available for CLASSPATH ? I think this the small bug in rpm which not determine CLASSPATH values on fly.

[root@xmpp ~]# ls -la /usr/share/java/
total 4132
drwxr-xr-x.   3 root root    4096 Jun 30 22:47 .
drwxr-xr-x. 119 root root    4096 Jul  4 10:17 ..
lrwxrwxrwx.   1 root root      16 Jun  7  2014 geronimo-jta_1.1_spec.jar -> geronimo-jta.jar
-rw-r--r--.   1 root root   11687 Jun  7  2014 geronimo-jta.jar
lrwxrwxrwx.   1 root root      16 Jun  7  2014 jta.jar -> geronimo-jta.jar
-rw-r--r--.   1 root root  911706 Apr 23  2014 mysql-connector-java.jar
drwxr-xr-x.   2 root root    4096 Jun 30 22:47 slf4j
lrwxrwxrwx.   1 root root      24 Jun 28 17:58 tigase-acs.jar -> tigase-acs.jar-7.0.2.jar
-rw-r--r--.   1 root root   57615 Jun 28 17:58 tigase-acs.jar-7.0.2.jar
lrwxrwxrwx.   1 root root      28 Jun 28 17:58 tigase-acs-muc.jar -> tigase-acs-muc.jar-7.0.2.jar
-rw-r--r--.   1 root root   67422 Jun 28 17:58 tigase-acs-muc.jar-7.0.2.jar
lrwxrwxrwx.   1 root root      31 Jun 28 17:58 tigase-acs-pubsub.jar -> tigase-acs-pubsub.jar-7.0.2.jar
-rw-r--r--.   1 root root   36110 Jun 28 17:58 tigase-acs-pubsub.jar-7.0.2.jar
lrwxrwxrwx.   1 root root      27 Jun 28 17:58 tigase-extras.jar -> tigase-extras.jar-7.0.2.jar
-rw-r--r--.   1 root root   43565 Jun 28 17:58 tigase-extras.jar-7.0.2.jar
lrwxrwxrwx.   1 root root      29 Jun 28 17:58 tigase-http-api.jar -> tigase-http-api.jar-7.0.2.jar
-rw-r--r--.   1 root root  250275 Jun 28 17:58 tigase-http-api.jar-7.0.2.jar
lrwxrwxrwx.   1 root root      35 Jun 28 17:58 tigase-http-api-jetty.jar -> tigase-http-api-jetty.jar-7.0.2.jar
-rw-r--r--.   1 root root   16152 Jun 28 17:58 tigase-http-api-jetty.jar-7.0.2.jar
lrwxrwxrwx.   1 root root      38 Jun 28 17:58 tigase-message-archiving.jar -> tigase-message-archiving.jar-7.0.2.jar
-rw-r--r--.   1 root root   61241 Jun 28 17:58 tigase-message-archiving.jar-7.0.2.jar
lrwxrwxrwx.   1 root root      28 Jun 28 17:58 tigase-mongodb.jar -> tigase-mongodb.jar-7.0.2.jar
-rw-r--r--.   1 root root   57681 Jun 28 17:58 tigase-mongodb.jar-7.0.2.jar
lrwxrwxrwx.   1 root root      24 Jun 28 17:58 tigase-muc.jar -> tigase-muc.jar-7.0.2.jar
-rw-r--r--.   1 root root  156189 Jun 28 17:58 tigase-muc.jar-7.0.2.jar
lrwxrwxrwx.   1 root root      27 Jun 28 17:58 tigase-pubsub.jar -> tigase-pubsub.jar-7.0.2.jar
-rw-r--r--.   1 root root  355461 Jun 28 17:58 tigase-pubsub.jar-7.0.2.jar
lrwxrwxrwx.   1 root root      27 Jun 28 17:58 tigase-server.jar -> tigase-server.jar-7.0.2.jar
-rw-r--r--.   1 root root 2047860 Jun 28 17:58 tigase-server.jar-7.0.2.jar
lrwxrwxrwx.   1 root root      27 Jun 28 17:58 tigase-socks5.jar -> tigase-socks5.jar-7.0.2.jar
-rw-r--r--.   1 root root   59609 Jun 28 17:58 tigase-socks5.jar-7.0.2.jar
lrwxrwxrwx.   1 root root      44 Jun 28 17:58 tigase-stats-collector-library.jar -> tigase-stats-collector-library.jar-7.0.2.jar
-rw-r--r--.   1 root root    8960 Jun 28 17:58 tigase-stats-collector-library.jar-7.0.2.jar
lrwxrwxrwx.   1 root root      45 Jun 28 17:58 tigase-stats-collector-provider.jar -> tigase-stats-collector-provider.jar-7.0.2.jar
-rw-r--r--.   1 root root    8149 Jun 28 17:58 tigase-stats-collector-provider.jar-7.0.2.jar
lrwxrwxrwx.   1 root root      25 Jun 28 17:58 tigase-stun.jar -> tigase-stun.jar-7.0.2.jar
-rw-r--r--.   1 root root   12254 Jun 28 17:58 tigase-stun.jar-7.0.2.jar
lrwxrwxrwx.   1 root root      36 Jun 28 17:58 tigase-unified-archive.jar -> tigase-unified-archive.jar-7.0.2.jar
-rw-r--r--.   1 root root   27464 Jun 28 17:58 tigase-unified-archive.jar-7.0.2.jar
[root@xmpp ~]# ls -la /usr/share/java/slf4j/
total 60
drwxr-xr-x. 2 root root  4096 Jun 30 22:47 .
drwxr-xr-x. 3 root root  4096 Jun 30 22:47 ..
lrwxrwxrwx. 1 root root    13 Jun  8  2014 api.jar -> slf4j-api.jar
lrwxrwxrwx. 1 root root    13 Jun  8  2014 nop.jar -> slf4j-nop.jar
lrwxrwxrwx. 1 root root    16 Jun  8  2014 simple.jar -> slf4j-simple.jar
-rw-r--r--. 1 root root 29314 Jun  8  2014 slf4j-api.jar
-rw-r--r--. 1 root root  4116 Jun  8  2014 slf4j-nop.jar
-rw-r--r--. 1 root root 10710 Jun  8  2014 slf4j-simple.jar
[root@xmpp ~]# 

Added by Andrzej Wójcik IoT 1 CloudTigaseTeam over 3 years ago

In our tigase.sh file which is responsible for starting/stopping Tigase XMPP Server (and available in our Tigase XMPP Server GIT repository) we use following lines to set CLASSPATH:

LIB_DIR=jars
CLASSPATH="${CLASSPATH}${TIGASE_JAR}"
CLASSPATH="`ls -d ${TIGASE_HOME}/${LIB_DIR}/*.jar 2>/dev/null | grep -v wrapper | tr '\n' :`${CLASSPATH}"

which means that we are setting CLASSPATH to list of all jars available in jars directory.

Added by Slava Bendersky over 3 years ago

I corrected CLASSPATH and right now when server starts get this

CLASSPATH=$(build-classpath geronimo-jta jta mysql-connector-java tigase-muc tigase-pubsub tigase-extras tigase-http-api tigase-http-api-jetty tigase-message-archiving tigase-socks5 tigase-stats-collector-library tigase-stats-collector-provider tigase-stun tigase-unified-archive)
Loading component: c2s :: componentInfo{Title=Tigase XMPP Server, Version=7.1.0-SNAPSHOT-b3883/188eaf95 (2015-06-28/22:53:02), Class=tigase.server.xmppclient.ClientConnectionManager}
2015-07-05 10:35:52.858 [main]             ConfigRepository.setProperties()   WARNING:  Items list is not set in the configuration file!!
2015-07-05 10:35:52.867 [main]             ThreadExceptionHandler.uncaughtException()  SEVERE: Uncaught thread: "main" exception
java.lang.NoClassDefFoundError: groovy/lang/GroovyObject
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:760)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
    at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    at tigase.http.rest.RestModule.start(RestModule.java:105)
    at tigase.http.HttpMessageReceiver.setProperties(HttpMessageReceiver.java:269)
    at tigase.conf.ConfiguratorAbstract.setup(ConfiguratorAbstract.java:540)
    at tigase.conf.ConfiguratorAbstract.componentAdded(ConfiguratorAbstract.java:177)
    at tigase.conf.Configurator.componentAdded(Configurator.java:50)
    at tigase.conf.Configurator.componentAdded(Configurator.java:33)
    at tigase.server.AbstractComponentRegistrator.addComponent(AbstractComponentRegistrator.java:116)
    at tigase.server.MessageRouter.addComponent(MessageRouter.java:108)
    at tigase.server.MessageRouter.addRouter(MessageRouter.java:145)
    at tigase.server.MessageRouter.setProperties(MessageRouter.java:705)
    at tigase.conf.ConfiguratorAbstract.setup(ConfiguratorAbstract.java:540)
    at tigase.conf.ConfiguratorAbstract.componentAdded(ConfiguratorAbstract.java:177)
    at tigase.conf.Configurator.componentAdded(Configurator.java:50)
    at tigase.conf.Configurator.componentAdded(Configurator.java:33)
    at tigase.server.AbstractComponentRegistrator.addComponent(AbstractComponentRegistrator.java:116)
    at tigase.server.MessageRouter.addRegistrator(MessageRouter.java:131)
    at tigase.server.MessageRouter.setConfig(MessageRouter.java:604)
    at tigase.server.XMPPServer.start(XMPPServer.java:142)
    at tigase.server.XMPPServer.main(XMPPServer.java:112)
Caused by: java.lang.ClassNotFoundException: groovy.lang.GroovyObject
    at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:760)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
    at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    at tigase.http.rest.RestModule.start(RestModule.java:105)
    at tigase.http.HttpMessageReceiver.setProperties(HttpMessageReceiver.java:269)
    at tigase.conf.ConfiguratorAbstract.setup(ConfiguratorAbstract.java:540)
    at tigase.conf.ConfiguratorAbstract.componentAdded(ConfiguratorAbstract.java:177)
    at tigase.conf.Configurator.componentAdded(Configurator.java:50)
    at tigase.conf.Configurator.componentAdded(Configurator.java:33)
    at tigase.server.AbstractComponentRegistrator.addComponent(AbstractComponentRegistrator.java:116)
    at tigase.server.MessageRouter.addComponent(MessageRouter.java:108)
    at tigase.server.MessageRouter.addRouter(MessageRouter.java:145)
    at tigase.server.MessageRouter.setProperties(MessageRouter.java:705)
    at tigase.conf.ConfiguratorAbstract.setup(ConfiguratorAbstract.java:540)
    at tigase.conf.ConfiguratorAbstract.componentAdded(ConfiguratorAbstract.java:177)
    at tigase.conf.Configurator.componentAdded(Configurator.java:50)
    at tigase.conf.Configurator.componentAdded(Configurator.java:33)
    at tigase.server.AbstractComponentRegistrator.addComponent(AbstractComponentRegistrator.java:116)
    at tigase.server.MessageRouter.addRegistrator(MessageRouter.java:131)
    at tigase.server.MessageRouter.setConfig(MessageRouter.java:604)
    at tigase.server.XMPPServer.start(XMPPServer.java:142)
    at tigase.server.XMPPServer.main(XMPPServer.java:112)

Added by Slava Bendersky over 3 years ago

There are was missing some jars. I fixed in spec file. Right I have more jars in directory and CLASSPATH look this.

But still not starting .

CLASSPATH=$(build-classpath logback-classic logback-core junit jul-to-slf4j slf4j-api jtds org.osgi.core org.apache.felix.shell.remote org.apache.felix.shell org.apache.felix.main org.apache.felix.http.bundle org.apache.felix.configadmin org.apache.felix.bundlerepository  derby derbytools hamcrest-core groovy-all geronimo-jta jta mysql-connector-java tigase-muc tigase-pubsub tigase-extras tigase-http-api tigase-http-api-jetty tigase-message-archiving tigase-socks5 tigase-stats-collector-library tigase-stats-collector-provider tigase-stun tigase-unified-archive)

Error on start

2015-07-05 14:12:45.812 [main]             RequestHandler.registerServlet()   SEVERE:   null
java.lang.NullPointerException: Cannot get property 'length' on null object
    at org.codehaus.groovy.runtime.NullObject.getProperty(NullObject.java:57)
    at org.codehaus.groovy.runtime.InvokerHelper.getProperty(InvokerHelper.java:169)
    at org.codehaus.groovy.runtime.callsite.NullCallSite.getProperty(NullCallSite.java:44)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGetProperty(AbstractCallSite.java:293)
    at tigase.http.rest.RestExtServlet.loadHandlers(RestExtServlet.groovy:56)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSite.invoke(PogoMetaMethodSite.java:166)
    at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:56)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:49)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:151)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:163)
    at tigase.http.rest.RestServlet.init(RestServlet.groovy:64)
    at javax.servlet.GenericServlet.init(GenericServlet.java:241)
    at tigase.http.java.RequestHandler.registerServlet(RequestHandler.java:108)
    at tigase.http.java.RequestHandler.<init>(RequestHandler.java:72)
    at tigase.http.java.JavaStandaloneHttpServer.deploy(JavaStandaloneHttpServer.java:108)
    at tigase.http.java.JavaStandaloneHttpServer.deploy(JavaStandaloneHttpServer.java:86)
    at tigase.http.HttpServer.deploy(HttpServer.java:99)
    at tigase.http.rest.RestModule.start(RestModule.java:143)
    at tigase.http.HttpMessageReceiver.setProperties(HttpMessageReceiver.java:269)
    at tigase.conf.ConfiguratorAbstract.setup(ConfiguratorAbstract.java:540)
    at tigase.conf.ConfiguratorAbstract.componentAdded(ConfiguratorAbstract.java:177)
    at tigase.conf.Configurator.componentAdded(Configurator.java:50)
    at tigase.conf.Configurator.componentAdded(Configurator.java:33)
    at tigase.server.AbstractComponentRegistrator.addComponent(AbstractComponentRegistrator.java:116)
    at tigase.server.MessageRouter.addComponent(MessageRouter.java:108)
    at tigase.server.MessageRouter.addRouter(MessageRouter.java:145)
    at tigase.server.MessageRouter.setProperties(MessageRouter.java:705)
    at tigase.conf.ConfiguratorAbstract.setup(ConfiguratorAbstract.java:540)
    at tigase.conf.ConfiguratorAbstract.componentAdded(ConfiguratorAbstract.java:177)
    at tigase.conf.Configurator.componentAdded(Configurator.java:50)
    at tigase.conf.Configurator.componentAdded(Configurator.java:33)
    at tigase.server.AbstractComponentRegistrator.addComponent(AbstractComponentRegistrator.java:116)
    at tigase.server.MessageRouter.addRegistrator(MessageRouter.java:131)
    at tigase.server.MessageRouter.setConfig(MessageRouter.java:604)
    at tigase.server.XMPPServer.start(XMPPServer.java:142)
    at tigase.server.XMPPServer.main(XMPPServer.java:112)

Added by Slava Bendersky over 3 years ago

I have another few questions.

  1. What available values for saslAllowedMechanisms: null.

  2. How to deploy war file for web ui ? Server is running on 8080, but get 404 on ui/ or empty responses on /

How to specify location config.properties for web server.

[root@xmpp tigase]# lsof -i :8080
COMMAND   PID USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
java    11241 root   78u  IPv6  93022      0t0  TCP *:webcache (LISTEN)  

Added by Slava Bendersky over 3 years ago

One more question.

How I can change scripts directory to /usr/share/tigase/scripts ?

All web apps use scripts/admin

java.io.FileNotFoundException: /scripts/admin/template.html (No such file or directory)

Added by Wojciech Kapcia TigaseTeam over 3 years ago

Slava Bendersky wrote:

There are was missing some jars. I fixed in spec file. Right I have more jars in directory and CLASSPATH look this.

But still not starting .

[...]

Error on start

java.lang.NullPointerException: Cannot get property 'length' on null object

Have you put the REST scripts in correct locations?

Slava Bendersky wrote:

I have another few questions.

  1. What available values for saslAllowedMechanisms: null.

All mechanisms that implement javax.security.sasl.SaslServer or extend tigase.auth.mechanisms.AbstractSasl@. You can check package @tigase.auth.mechanisms for default available mechanisms.

  1. How to deploy war file for web ui ? Server is running on 8080, but get 404 on ui/ or empty responses on /

How to specify location config.properties for web server.

web.ui is included by default in our distribution packages and available in maven repository so while building it will be pulled automatically: http://maven.tigase.org/tigase/sure/web/tigase-web-ui/2.0/

Slava Bendersky wrote:

One more question.

How I can change scripts directory to /usr/share/tigase/scripts ?

All web apps use scripts/admin

[...]

Admin ad-hoc path can be set using @--script-dir=@. If I remember correctly HTTP api scripts location is currently hardcoded.

Added by Slava Bendersky over 3 years ago

Thank you for reply,

Yes, I am trying build RPM where I want set scripts directory to /usr/share/tigase/scripts as default location for RPM 7.0.2

Is possible adjust the path during the build ?

For rest I set this way, but didn't helped.

http/rest-scripts-dir =  /usr/share/tigase/scripts/rest

Current settings for HTTP

http/server-class[S]=tigase.http.jetty.JettyStandaloneHttpServer
http/port[S]=8085
http/rest-scripts-dir[S]=/usr/share/tigase/scripts/rest
http/admin-scripts-dir[S]=/usr/share/tigase/scripts/admin
http/scripts-dir[S]=/usr/share/tigase/scripts

The web.ui war file is present I think again location problem.

Here are ps -ef of tigase.

I tried add -Dfelix.config.properties=file:/etc/tigase/config.properties

[root@xmpp tigase]# ps -ef | grep java
root     17625     1  2 08:02 ?        00:00:09 /bin/java -Dfile.encoding=UTF-8 -Dsun.jnu.encoding=UTF-8 -Dfelix.config.properties=file:/etc/tigase/config.properties -Djdbc.drivers=com.mysql.jdbc.Driver:org.postgresql.Driver:org.apache.derby.jdbc.EmbeddedDriver -server -Xms100M -Xmx200M -XX:PermSize=32m -XX:MaxPermSize=256m -XX:MaxDirectMemorySize=128m -Dlogback.configurationFile=/etc/tigase/logback.xml -cp /usr/share/java/derby-7.0.2.jar:/usr/share/java/derbytools-7.0.2.jar:/usr/share/java/groovy-all-7.0.2.jar:/usr/share/java/hamcrest-core-7.0.2.jar:/usr/share/java/javax.servlet-api-7.0.2.jar:/usr/share/java/jdmkrt-7.0.2.jar:/usr/share/java/jetty-http-7.0.2.jar:/usr/share/java/jetty-io-7.0.2.jar:/usr/share/java/jetty-security-7.0.2.jar:/usr/share/java/jetty-server-7.0.2.jar:/usr/share/java/jetty-servlet-7.0.2.jar:/usr/share/java/jetty-util-7.0.2.jar:/usr/share/java/jstun-7.0.2.jar:/usr/share/java/jtds-7.0.2.jar:/usr/share/java/jul-to-slf4j-7.0.2.jar:/usr/share/java/licence-lib-7.0.2.jar:/usr/share/java/logback-classic-7.0.2.jar:/usr/share/java/logback-core-7.0.2.jar:/usr/share/java/mongo-java-driver-7.0.2.jar:/usr/share/java/mysql-connector-java-7.0.2.jar:/usr/share/java/org.apache.felix.bundlerepository-7.0.2.jar:/usr/share/java/org.apache.felix.configadmin-7.0.2.jar:/usr/share/java/org.apache.felix.main-7.0.2.jar:/usr/share/java/org.apache.felix.shell-7.0.2.jar:/usr/share/java/org.apache.felix.shell.remote-7.0.2.jar:/usr/share/java/org.osgi.core-7.0.2.jar:/usr/share/java/postgresql-7.0.2.jar:/usr/share/java/slf4j-api-7.0.2.jar:/usr/share/java/tigase-acs-7.0.2.jar:/usr/share/java/tigase-acs-muc-7.0.2.jar:/usr/share/java/tigase-acs-pubsub-7.0.2.jar:/usr/share/java/tigase-extras-7.0.2.jar:/usr/share/java/tigase-http-api-7.0.2.jar:/usr/share/java/tigase-http-api-jetty-7.0.2.jar:/usr/share/java/tigase-message-archiving-7.0.2.jar:/usr/share/java/tigase-mongodb-7.0.2.jar:/usr/share/java/tigase-muc-7.0.2.jar:/usr/share/java/tigase-pubsub-7.0.2.jar:/usr/share/java/tigase-server-7.0.2.jar:/usr/share/java/tigase-socks5-7.0.2.jar:/usr/share/java/tigase-stats-collector-library-7.0.2.jar:/usr/share/java/tigase-stats-collector-provider-7.0.2.jar:/usr/share/java/tigase-stun-7.0.2.jar:/usr/share/java/tigase-unified-archive-7.0.2.jar:/usr/share/java/tigase-server-7.0.2.jar tigase.server.XMPPServer --property-file /etc/tigase/init.properties

Added by Slava Bendersky over 3 years ago

Yes, the whole trouble is location of scripts for http. I tried just standard setup in /opt/tigase-server and it started no problem. Will be nice have ability to change it. That RPM will lay into system structure.

There are another few configuration issues which can't find resolution for it.

  1. Bosh get rolled until timeout both port 5281,5280
ConnectionOpenThread]  ConnectionManager$ConnectionListenerImpl.accept()  FINEST: Accept called for service: null@null, port_props: {socket=ssl, type=accept, ifc=[Ljava.lang.String;@36681447, remote-host=localhost, required=false, port-no=5281}
2015-07-07 01:53:51.372 [ConnectionOpenThread]  ConnectionManager.serviceStarted()  FINER: [[bosh]] Connection started: null, type: accept, Socket: TLS: nullSocket[addr=/192.168.10.115,port=37184,localport=5281], jid: null

  1. How to create Roster Groups for User under one organization ? And how to subscribe to it by default specific users.

Added by Wojciech Kapcia TigaseTeam over 3 years ago

Slava Bendersky wrote:

Thank you for reply,

Yes, I am trying build RPM where I want set scripts directory to /usr/share/tigase/scripts as default location for RPM 7.0.2

Is possible adjust the path during the build ?

It's hardcoded so you would have to change the sources.

The web.ui war file is present I think again location problem.

Here are ps -ef of tigase.

I tried add -Dfelix.config.properties=file:/etc/tigase/config.properties

ui.war should be placed in jars/ directory

Slava Bendersky wrote:

Yes, the whole trouble is location of scripts for http. I tried just standard setup in /opt/tigase-server and it started no problem. Will be nice have ability to change it. That RPM will lay into system structure.

I've added issue for it #3275.

There are another few configuration issues which can't find resolution for it.

  1. Bosh get rolled until timeout both port 5281,5280

Can you explain 'get rolled'? What timeout?

  1. How to create Roster Groups for User under one organization ? And how to subscribe to it by default specific users.

I think that Dynamic Rosters should be helpful in this case: http://docs.tigase.org/tigase-server/snapshot/Development_Guide/html_chunk/_experimental.html#DynamicRosters

Added by Slava Bendersky over 3 years ago

1 There are another few configuration issues which can't find resolution for it.

  1. Bosh get rolled until timeout both port 5281,5280

If I open browser to http://ip:5280/http-bind it just sit there are until time out never finish transaction.

  1. How to create Roster Groups for User under one organization ? And how to subscribe to it by default specific users.

Shared Roster Groups. Where admin can create the group and add user to the group, with ability share roster/presence updates and see they status. Most organization will not allow for user to do operation with contact list, they just want that user will log in and see what groups with contacts are assigned/available to him based on departments, teams and so on.

I will follow with ticket 3275, Thank you.

Added by Wojciech Kapcia TigaseTeam over 3 years ago

Slava Bendersky wrote:

1 There are another few configuration issues which can't find resolution for it.

  1. Bosh get rolled until timeout both port 5281,5280

If I open browser to http://ip:5280/http-bind it just sit there are until time out never finish transaction.

Why are you doing that? What are you trying to achieve? Simply opening this in your browser won't do anything. Please peruse XEP-0124: Bidirectional-streams Over Synchronous HTTP (BOSH) and XEP-0206: XMPP Over BOSH

  1. How to create Roster Groups for User under one organization ? And how to subscribe to it by default specific users.

Shared Roster Groups. Where admin can create the group and add user to the group, with ability share roster/presence updates and see they status. Most organization will not allow for user to do operation with contact list, they just want that user will log in and see what groups with contacts are assigned/available to him based on departments, teams and so on.

So Dynamic Roster is perfect fit - please see my previous link.

Added by Slava Bendersky over 3 years ago

Why are you doing that? What are you trying to achieve? Simply opening this in your browser won't do anything. Please peruse XEP-0124: Bidirectional-streams Over Synchronous HTTP and XEP-0206: XMPP Over BOSH

I am trying to connect muc room via bosh from my corporate website. And I tried to test if bosh url correct or not.

So Dynamic Roster is perfect fit - please see my previous link.

What classes is available for dynamic roster ?

Is mysql is involve in it ? If yes how is schema then created ?

#sess-man/plugins-conf/jabber\:iq\:roster/db-uri =
#sess-man/plugins-conf/jabber\:iq\:roster/dynamic-roster-classes =

Added by Slava Bendersky over 3 years ago

I will need help with external component. I am trying connect mod dingaling to tigase server.

https://wiki.freeswitch.org/wiki/Mod_dingaling#Sample_Configuration_.28ejabberd.29

with following configuration

--comp-name-6 = ext
--comp-class-6 = tigase.server.ext.ComponentProtocol
# External component
--external = xmpp.networklab.ca:mypassword:listen:5270

but get this exception

2015-07-18 04:13:18.306 [ConnectionOpenThread]  ConnectionManager$ConnectionListenerImpl.accept()  FINEST: Accept called for service: null@null, port_props: {port-no=5270, local-host=xmpp.networklab.ca, remote-host=null, type=accept, socket=plain, ifc=[Ljava.lang.String;@7b948f3e, max-reconnects=7200000, repo-item=xmpp.networklab.ca:HinLeMY1Yg7Cvb50ySqVn3aUSVhsOw:accept:5270:null:null:tigase.server.ext.lb.ReceiverBareJidLB}
2015-07-18 04:13:18.306 [ConnectionOpenThread]  ConnectionManager.serviceStarted()  FINER: [[ext]] Connection started: null, type: accept, Socket: nullSocket[addr=/pubic_ip,port=36812,localport=5270], jid: null
2015-07-18 04:13:18.306 [ConnectionOpenThread]  ComponentProtocol.serviceStarted()  FINEST: Connection started: pubic_ip, xmlns: null, type: accept, id=10.18.130.29_5270_pubic_ip_36812
2015-07-18 04:13:18.306 [ConnectionOpenThread]  ComponentProtocol.serviceStarted()  FINE: XMLNS not set, accepting a new connection with xmlns auto-detection.
2015-07-18 04:13:18.307 [pool-18-thread-1]  ComponentProtocol.xmppStreamOpened()  FINEST: Stream opened: pubic_ip, xmlns: jabber:client, type: accept, uniqueId=10.18.130.29_5270_pubic_ip_36812, to=xmpp.networklab.ca
2015-07-18 04:13:18.307 [pool-18-thread-1]  ComponentProtocol.xmppStreamOpened()  FINEST: tigase.server.ext.handlers.JabberClientStreamOpenHandler is processing request
2015-07-18 04:13:18.307 [pool-18-thread-1]  XMPPIOService.processSocketData()  INFO:    null, type: accept, Socket: nullSocket[addr=/pubic_ip,port=36812,localport=5270], jid: null, Incorrect XML data: <?xml version='1.0'?><stream:stream xmlns:stream='http://etherx.jabber.org/streams' xmlns='jabber:client' to='xmpp.networklab.ca' version='1.0'>, stopping connection: null, exception: 
java.lang.NullPointerException
    at java.util.concurrent.ConcurrentSkipListMap.doGet(ConcurrentSkipListMap.java:778)
    at java.util.concurrent.ConcurrentSkipListMap.get(ConcurrentSkipListMap.java:1546)
    at tigase.db.comp.ConfigRepository.getItem(ConfigRepository.java:223)
    at tigase.server.ext.ComponentProtocol.getCompRepoItem(ComponentProtocol.java:276)
    at tigase.server.ext.handlers.JabberClientStreamOpenHandler.streamOpened(JabberClientStreamOpenHandler.java:124)
    at tigase.server.ext.ComponentProtocol.xmppStreamOpened(ComponentProtocol.java:679)
    at tigase.server.ext.ComponentProtocol.xmppStreamOpened(ComponentProtocol.java:72)
    at tigase.xmpp.XMPPIOService.xmppStreamOpened(XMPPIOService.java:809)
    at tigase.xmpp.XMPPDomBuilderHandler.startElement(XMPPDomBuilderHandler.java:280)
    at tigase.xml.SimpleParser.parse(SimpleParser.java:314)
    at tigase.xmpp.XMPPIOService.processSocketData(XMPPIOService.java:686)
    at tigase.net.IOService.call(IOService.java:253)
    at tigase.net.IOService.call(IOService.java:93)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
2015-07-18 04:13:18.307 [pool-18-thread-1]  ConnectionManager.serviceStopped()  FINER:  [[ext]] Connection stopped: null, type: accept, Socket: nullSocket[unconnected], jid: null
2015-07-18 04:13:18.307 [pool-18-thread-1]  ComponentProtocol.serviceStopped()  FINER:  Stopped service which hasn't sent initial stream open yet10.18.130.29_5270_pubic_ip_36812

Added by Slava Bendersky over 3 years ago

Hello Everyone,

Tried load stun component, but it no loaded give exception.

tigase 7.02

2015-07-24 19:48:51.446 [main]             Configurator.componentAdded()      WARNING:  ignoring NPE
java.lang.NullPointerException
    at tigase.stun.StunComponent.init(StunComponent.java:167)
    at tigase.stun.StunComponent.setProperties(StunComponent.java:115)
    at tigase.conf.ConfiguratorAbstract.setup(ConfiguratorAbstract.java:540)
    at tigase.conf.ConfiguratorAbstract.componentAdded(ConfiguratorAbstract.java:177)
    at tigase.conf.Configurator.componentAdded(Configurator.java:50)
    at tigase.conf.Configurator.componentAdded(Configurator.java:33)
    at tigase.server.AbstractComponentRegistrator.addComponent(AbstractComponentRegistrator.java:116)
    at tigase.server.MessageRouter.addComponent(MessageRouter.java:108)
    at tigase.server.MessageRouter.addRouter(MessageRouter.java:145)
    at tigase.server.MessageRouter.setProperties(MessageRouter.java:698)
    at tigase.conf.ConfiguratorAbstract.setup(ConfiguratorAbstract.java:540)
    at tigase.conf.ConfiguratorAbstract.componentAdded(ConfiguratorAbstract.java:177)
    at tigase.conf.Configurator.componentAdded(Configurator.java:50)
    at tigase.conf.Configurator.componentAdded(Configurator.java:33)
    at tigase.server.AbstractComponentRegistrator.addComponent(AbstractComponentRegistrator.java:116)
    at tigase.server.MessageRouter.addRegistrator(MessageRouter.java:131)
    at tigase.server.MessageRouter.setConfig(MessageRouter.java:597)
    at tigase.server.XMPPServer.start(XMPPServer.java:142)
    at tigase.server.XMPPServer.main(XMPPServer.java:112)

Added by Slava Bendersky over 3 years ago

Also some web socket issue when it reject connection with message about policy problem. I search information about all those issues, but can't find anything useful yet. Any help will thank you.

2015-07-24 22:58:21.943 [ConnectionOpenThread]  ConnectionManager.serviceStarted()  FINER: [[ws2s]] Connection started: null, type: accept, Socket: TLS: nullSocket[addr=/public_ip,port=60294,localport=5291], jid: null
2015-07-24 22:58:22.192 [pool-18-thread-2]  WebSocketXMPPIOService.processWebSocketHandshake()  FINEST: parsing request = 
GET / HTTP/1.1
Host: webvc.networklab.ca:5291
Connection: Upgrade
Pragma: no-cache
Cache-Control: no-cache
Upgrade: websocket
Origin: http://networklab.global
Sec-WebSocket-Version: 13
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.134 Safari/537.36
Accept-Encoding: gzip, deflate, sdch
Accept-Language: en-GB,en-US;q=0.8,en;q=0.6
Sec-WebSocket-Key: DxJIcfk1NfXIMlm5z1ReuQ==
Sec-WebSocket-Extensions: permessage-deflate; client_max_window_bits
Sec-WebSocket-Protocol: xmpp


2015-07-24 22:58:22.240 [pool-18-thread-1]  ClientConnectionManager.xmppStreamOpened()  FINER: Stream opened: {xmlns:stream=http://etherx.jabber.org/streams, xmlns=jabber:client, to=networklab.ca, version=1.0}
2015-07-24 22:58:22.240 [pool-18-thread-1]  WebSocketXMPPIOService.writeData()  FINEST: sending data = <?xml version='1.0'?><stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='tigase-error-tigase' from='anon.networklab.ca' version='1.0' xml:lang='en'><stream:error><policy-violation xmlns='urn:ietf:params:xml:ns:xmpp-streams'/></stream:error></stream:stream>
2015-07-24 22:58:22.240 [pool-18-thread-1]  WebSocketHybi.encodeFrameAndWrite()  FINEST: sending encoded data size = 293

Added by Andrzej Wójcik IoT 1 CloudTigaseTeam over 3 years ago

As for issue with StunComponent please see https://projects.tigase.org/projects/stun/wiki/Configuration as NullPointerException is cause by missing configuration property which is required by StunComponent to initialize properly.

As for issue with WebSocket, I suppose you configured list of C2S allowed ports in your VHost configuration for anon.networklab.ca domain.

This list if set needs to contain also list of allowed WebSocket ports to use.

Added by Slava Bendersky over 3 years ago

Hello Andrzej,

Thanks for reply websocket is working right now after I corrected the port settings. How to set stun server if tigase box behind NAT (firewall) ?

Do I need interface alias for stun-secondary-ip ? They can be all private ?

Added by Slava Bendersky over 3 years ago

How I can set rules that only admin of the Vhost can create the MUC rooms ?

Added by Andrzej Wójcik IoT 1 CloudTigaseTeam over 3 years ago

I'm not sure if it is possible to restrict MUC room creation only, so only VHost admin could create rooms.

As for IP addresses and STUN, both addresses are used by remote client to detect it's IP external address and type of NAT. So you would need 2 external IP address for this to work properly (so private addresses are not good for this).

    (1-22/22)