Projects tigase _server server-core Issues #217
CM and SM on separate machines (#217)
wojciech.kapcia@tigase.net opened 1 decade ago
  • verify that the setup works correctly (in cluster environment?)

  • verify that correct external component is used for the connection (--ext-comp vs --external)

Artur Hefczyc commented 10 years ago

Eric, please verify that this configuration works. There should be some documentation on how to setup this but it may be outdated. Please update the docs if necessary.

Eric Dziewa commented 10 years ago
Artur Hefczyc commented 10 years ago

Eric, we are not talking about the cluster mode. We are talking about non-clustered Tigase but with connection managers separate from SessionManager. This is more or less common use-case when you want to have parts of the system which keep critical data (database, SessionManager) in protected network (DMZ), while allowing for connectivity from the internet - connection managers.

In theory it should work as it was designed that way. But the last time I checked that configuration was maybe 5 or more years ago. A lot has changed since than and I am no longer sure if Tigase works that way. Therefore, please deploy Tigase in a following way:

  1. Tigase with SessionManager, MessageArchive, MUC and PubSub on one machine

  2. All connection managers: s2s, c2s, Bosh, Websockets on a different machine.

While you do this, please document all the configuration details so at the end of the task (assuming it is possible to run it that way) we have ready to use step-by-step guide.

Eric Dziewa commented 10 years ago

Doesn't seem to work. Maybe I am doing something wrong. Here is what I did...

Running with --gen-config-sm on tpub.xmpp-test.net

init.properties:

config-type=--gen-config-sm
--admins = admin@tpub.xmpp-test.net
--virt-hosts = tpub.xmpp-test.net
--debug=server,xmpp.impl,ext,muc,component
--packet.debug.full=true
basic-conf/logging/java.util.logging.FileHandler.limit=100000000
basic-conf/logging/java.util.logging.FileHandler.count=20

--auth-db = tigase-custom
--auth-db-uri=jdbc:mysql://localhost/tpub?user=tigase&password=nonprivatethread
--user-db=mysql
--user-db-uri=jdbc:mysql://localhost/tpub?user=tigase&password=nonprivatethread&autoCreateUser=true

--comp-name-1=ext
--comp-class-1=tigase.server.ext.ComponentProtocol
--external=t4.tigase.org:secret:listen:5678

bosh/concurrent-requests[I]=16

I've tried "listen" and "accept" on --external, don't see a difference.

The open ports look to be correct:

tigase@tpub.xmpp-test.net tigase-issue #7.0.0-SNAPSHOT-b3755/ $ lsof -i -P
COMMAND   PID   USER   FD   TYPE   DEVICE SIZE/OFF NODE NAME
java    28299 tigase   65u  IPv6 23377332      0t0  TCP localhost:37780->localhost:3306 (ESTABLISHED)
...
java    28299 tigase   84u  IPv6 23377368      0t0  TCP localhost:37799->localhost:3306 (ESTABLISHED)
java    28299 tigase   89u  IPv6 23376870      0t0  TCP *:5678 (LISTEN)
java    28299 tigase   90u  IPv6 23376871      0t0  TCP *:5555 (LISTEN)

No exceptions in the logs, no mention of connection manager trying to connect.

For connection manager I'm using t4.tigase.org.

init.properties:

config-type=--gen-config-cs
--admins = admin@tpub.xmpp-test.net
--virt-hosts = tpub.xmpp-test.net
--debug=server,xmpp.impl,ext,muc,component
--packet.debug.full=true
basic-conf/logging/java.util.logging.FileHandler.limit=100000000
basic-conf/logging/java.util.logging.FileHandler.count=20

--comp-name-1=ext
--comp-class-1=tigase.server.ext.ComponentProtocol
--external=tpub.xmpp-test.net:secret:connect:5678
--bind-ext-hostnames=t4.tigase.org

bosh/concurrent-requests[I]=16

I don't see mention of trying to connect to tpub in logfiles. Tried with and without --bind-ext-hostnames. I know I will have to add the rest of the components but for now this should connect SessionManager. I see exceptions of this instance trying to connect to Derby DB. I removed DB "DRV" line from tigase.conf and it still happens.

2015-01-20 14:25:36.118 [main]             DataRepositoryImpl.initRepository()  INFO:   Table schema found: jdbc:derby:tigase-derbydb;create=true, database type: derby, database driver: org.apache.derby.jdbc.EmbeddedDriver
2015-01-20 14:25:36.540 [main]             DataRepositoryImpl.initRepository()  INFO:   Initialized database connection: jdbc:derby:tigase-derbydb;create=true
2015-01-20 14:25:36.540 [main]             DataRepositoryImpl.initRepository()  INFO:   Table schema found: jdbc:derby:tigase-derbydb;create=true, database type: derby, database driver: org.apache.derby.jdbc.EmbeddedDriver
2015-01-20 14:25:36.542 [main]             DataRepositoryImpl.initRepository()  INFO:   Initialized database connection: jdbc:derby:tigase-derbydb;create=true
2015-01-20 14:25:36.543 [main]             DataRepositoryImpl.initRepository()  INFO:   Table schema found: jdbc:derby:tigase-derbydb;create=true, database type: derby, database driver: org.apache.derby.jdbc.EmbeddedDriver
2015-01-20 14:25:36.544 [main]             DataRepositoryImpl.initRepository()  INFO:   Initialized database connection: jdbc:derby:tigase-derbydb;create=true
2015-01-20 14:25:36.544 [main]             DataRepositoryImpl.initRepository()  INFO:   Table schema found: jdbc:derby:tigase-derbydb;create=true, database type: derby, database driver: org.apache.derby.jdbc.EmbeddedDriver
2015-01-20 14:25:36.546 [main]             DataRepositoryImpl.initRepository()  INFO:   Initialized database connection: jdbc:derby:tigase-derbydb;create=true
2015-01-20 14:25:36.546 [main]             DataRepositoryImpl.initRepository()  INFO:   Table schema found: jdbc:derby:tigase-derbydb;create=true, database type: derby, database driver: org.apache.derby.jdbc.EmbeddedDriver
2015-01-20 14:25:36.548 [main]             DataRepositoryImpl.initRepository()  INFO:   Initialized database connection: jdbc:derby:tigase-derbydb;create=true
2015-01-20 14:25:36.548 [main]             DataRepositoryImpl.initRepository()  INFO:   Table schema found: jdbc:derby:tigase-derbydb;create=true, database type: derby, database driver: org.apache.derby.jdbc.EmbeddedDriver
2015-01-20 14:25:36.549 [main]             DataRepositoryImpl.initRepository()  INFO:   Initialized database connection: jdbc:derby:tigase-derbydb;create=true
2015-01-20 14:25:36.550 [main]             DataRepositoryImpl.initRepository()  INFO:   Table schema found: jdbc:derby:tigase-derbydb;create=true, database type: derby, database driver: org.apache.derby.jdbc.EmbeddedDriver
2015-01-20 14:25:36.551 [main]             DataRepositoryImpl.initRepository()  INFO:   Initialized database connection: jdbc:derby:tigase-derbydb;create=true
2015-01-20 14:25:36.551 [main]             DataRepositoryImpl.initRepository()  INFO:   Table schema found: jdbc:derby:tigase-derbydb;create=true, database type: derby, database driver: org.apache.derby.jdbc.EmbeddedDriver
2015-01-20 14:25:36.553 [main]             DataRepositoryImpl.initRepository()  INFO:   Initialized database connection: jdbc:derby:tigase-derbydb;create=true
2015-01-20 14:25:36.553 [main]             DataRepositoryImpl.initRepository()  INFO:   Table schema found: jdbc:derby:tigase-derbydb;create=true, database type: derby, database driver: org.apache.derby.jdbc.EmbeddedDriver
2015-01-20 14:25:36.554 [main]             DataRepositoryImpl.initRepository()  INFO:   Initialized database connection: jdbc:derby:tigase-derbydb;create=true
2015-01-20 14:25:36.554 [main]             DataRepositoryImpl.initRepository()  INFO:   Table schema found: jdbc:derby:tigase-derbydb;create=true, database type: derby, database driver: org.apache.derby.jdbc.EmbeddedDriver
2015-01-20 14:25:36.556 [main]             DataRepositoryImpl.initRepository()  INFO:   Initialized database connection: jdbc:derby:tigase-derbydb;create=true
2015-01-20 14:25:36.585 [main]             ConfiguratorAbstract.setProperties()  SEVERE: Can't initialize user default repository:
tigase.db.DBInitException: Problem initializing jdbc connection: jdbc:derby:tigase-derbydb;create=true
        at tigase.db.jdbc.JDBCRepository.initRepository(JDBCRepository.java:612)
        at tigase.db.RepositoryFactory.getUserRepository(RepositoryFactory.java:660)
        at tigase.conf.ConfiguratorAbstract.addUserRepo(ConfiguratorAbstract.java:903)
        at tigase.conf.ConfiguratorAbstract.setProperties(ConfiguratorAbstract.java:832)
        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:603)
        at tigase.server.XMPPServer.start(XMPPServer.java:142)
        at tigase.server.XMPPServer.main(XMPPServer.java:112)
Caused by: java.sql.SQLSyntaxErrorException: 'TIGGETDBPROPERTY' is not recognized as a function or procedure.
        at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown Source)
        at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown Source)
        at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(Unknown Source)
        at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(Unknown Source)
        at org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unknown Source)
        at org.apache.derby.impl.jdbc.ConnectionChild.handleException(Unknown Source)
        at org.apache.derby.impl.jdbc.EmbedStatement.execute(Unknown Source)
        at org.apache.derby.impl.jdbc.EmbedStatement.executeQuery(Unknown Source)
        at tigase.db.jdbc.JDBCRepository.checkDBSchema(JDBCRepository.java:1020)
        at tigase.db.jdbc.JDBCRepository.initRepository(JDBCRepository.java:576)
        at tigase.db.RepositoryFactory.getUserRepository(RepositoryFactory.java:660)
        at tigase.conf.ConfiguratorAbstract.addUserRepo(ConfiguratorAbstract.java:903)
        at tigase.conf.ConfiguratorAbstract.setProperties(ConfiguratorAbstract.java:832)
        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:603)
        at tigase.server.XMPPServer.start(XMPPServer.java:142)
        at tigase.server.XMPPServer.main(XMPPServer.java:112)
Caused by: java.sql.SQLException: 'TIGGETDBPROPERTY' is not recognized as a function or procedure.
        at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)
        at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown Source)
        at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown Source)
        at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown Source)
        at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(Unknown Source)
        at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(Unknown Source)
        at org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unknown Source)
        at org.apache.derby.impl.jdbc.ConnectionChild.handleException(Unknown Source)
        at org.apache.derby.impl.jdbc.EmbedStatement.execute(Unknown Source)
        at org.apache.derby.impl.jdbc.EmbedStatement.executeQuery(Unknown Source)
        at tigase.db.jdbc.JDBCRepository.checkDBSchema(JDBCRepository.java:1020)
        at tigase.db.jdbc.JDBCRepository.initRepository(JDBCRepository.java:576)
        at tigase.db.RepositoryFactory.getUserRepository(RepositoryFactory.java:660)
        at tigase.conf.ConfiguratorAbstract.addUserRepo(ConfiguratorAbstract.java:903)
        at tigase.conf.ConfiguratorAbstract.setProperties(ConfiguratorAbstract.java:832)
        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:603)
        at tigase.server.XMPPServer.start(XMPPServer.java:142)
        at tigase.server.XMPPServer.main(XMPPServer.java:112)
Caused by: ERROR 42Y03: 'TIGGETDBPROPERTY' is not recognized as a function or procedure.
        at org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
        at org.apache.derby.impl.sql.compile.StaticMethodCallNode.bindExpression(Unknown Source)
        at org.apache.derby.impl.sql.compile.JavaToSQLValueNode.bindExpression(Unknown Source)
        at org.apache.derby.impl.sql.compile.ResultColumn.bindExpression(Unknown Source)
        at org.apache.derby.impl.sql.compile.ResultColumnList.bindExpressions(Unknown Source)
        at org.apache.derby.impl.sql.compile.RowResultSetNode.bindExpressions(Unknown Source)
        at org.apache.derby.impl.sql.compile.DMLStatementNode.bindExpressions(Unknown Source)
        at org.apache.derby.impl.sql.compile.DMLStatementNode.bind(Unknown Source)
        at org.apache.derby.impl.sql.compile.CursorNode.bindStatement(Unknown Source)
        at org.apache.derby.impl.sql.GenericStatement.prepMinion(Unknown Source)
        at org.apache.derby.impl.sql.GenericStatement.prepare(Unknown Source)
        at org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext.prepareInternalStatement(Unknown Source)
        at org.apache.derby.impl.jdbc.EmbedStatement.execute(Unknown Source)
        at org.apache.derby.impl.jdbc.EmbedStatement.executeQuery(Unknown Source)
        at tigase.db.jdbc.JDBCRepository.checkDBSchema(JDBCRepository.java:1020)
        at tigase.db.jdbc.JDBCRepository.initRepository(JDBCRepository.java:576)
        at tigase.db.RepositoryFactory.getUserRepository(RepositoryFactory.java:660)
        at tigase.conf.ConfiguratorAbstract.addUserRepo(ConfiguratorAbstract.java:903)
        at tigase.conf.ConfiguratorAbstract.setProperties(ConfiguratorAbstract.java:832)
        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:603)
        at tigase.server.XMPPServer.start(XMPPServer.java:142)
        at tigase.server.XMPPServer.main(XMPPServer.java:112)
2015-01-20 14:25:36.589 [main]             TigaseCustomAuth.getParamWithDef()  CONFIG:  Default query loaded for 'init-db-query': '{ call TigInitdb() }'
2015-01-20 14:25:36.599 [main]             ConfiguratorAbstract.setProperties()  SEVERE: Can't initialize auth default repository:
tigase.db.DBInitException: Problem initializing jdbc connection: jdbc:derby:tigase-derbydb;create=true
        at tigase.db.jdbc.TigaseCustomAuth.initRepository(TigaseCustomAuth.java:548)
        at tigase.db.RepositoryFactory.getAuthRepository(RepositoryFactory.java:382)
        at tigase.conf.ConfiguratorAbstract.addAuthRepo(ConfiguratorAbstract.java:872)
        at tigase.conf.ConfiguratorAbstract.setProperties(ConfiguratorAbstract.java:849)
        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:603)
        at tigase.server.XMPPServer.start(XMPPServer.java:142)
        at tigase.server.XMPPServer.main(XMPPServer.java:112)
Caused by: java.sql.SQLSyntaxErrorException: 'TIGINITDB' is not recognized as a function or procedure.
        at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown Source)
        at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown Source)
        at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(Unknown Source)
        at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(Unknown Source)
        at org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unknown Source)
        at org.apache.derby.impl.jdbc.ConnectionChild.handleException(Unknown Source)
        at org.apache.derby.impl.jdbc.EmbedPreparedStatement.<init>(Unknown Source)
        at org.apache.derby.impl.jdbc.EmbedCallableStatement.<init>(Unknown Source)
        at org.apache.derby.impl.jdbc.EmbedCallableStatement20.<init>(Unknown Source)
        at org.apache.derby.impl.jdbc.EmbedCallableStatement30.<init>(Unknown Source)
        at org.apache.derby.impl.jdbc.EmbedCallableStatement40.<init>(Unknown Source)
        at org.apache.derby.jdbc.Driver40.newEmbedCallableStatement(Unknown Source)
        at org.apache.derby.impl.jdbc.EmbedConnection.prepareCall(Unknown Source)
        at org.apache.derby.impl.jdbc.EmbedConnection.prepareCall(Unknown Source)
        at tigase.db.jdbc.DataRepositoryImpl.prepareQuery(DataRepositoryImpl.java:451)
        at tigase.db.jdbc.DataRepositoryImpl.initStatement(DataRepositoryImpl.java:406)
        at tigase.db.jdbc.DataRepositoryImpl.initPreparedStatement(DataRepositoryImpl.java:204)
        at tigase.db.DataRepositoryPool.initPreparedStatement(DataRepositoryPool.java:163)
        at tigase.db.jdbc.TigaseCustomAuth.initRepository(TigaseCustomAuth.java:482)
        at tigase.db.RepositoryFactory.getAuthRepository(RepositoryFactory.java:382)
        at tigase.conf.ConfiguratorAbstract.addAuthRepo(ConfiguratorAbstract.java:872)
        at tigase.conf.ConfiguratorAbstract.setProperties(ConfiguratorAbstract.java:849)
        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:603)
        at tigase.server.XMPPServer.start(XMPPServer.java:142)
        at tigase.server.XMPPServer.main(XMPPServer.java:112)
Caused by: java.sql.SQLException: 'TIGINITDB' is not recognized as a function or procedure.
        at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)
        at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown Source)
        at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown Source)
        at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown Source)
        at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(Unknown Source)
        at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(Unknown Source)
        at org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unknown Source)
        at org.apache.derby.impl.jdbc.ConnectionChild.handleException(Unknown Source)
        at org.apache.derby.impl.jdbc.EmbedPreparedStatement.<init>(Unknown Source)
        at org.apache.derby.impl.jdbc.EmbedCallableStatement.<init>(Unknown Source)
        at org.apache.derby.impl.jdbc.EmbedCallableStatement20.<init>(Unknown Source)
        at org.apache.derby.impl.jdbc.EmbedCallableStatement30.<init>(Unknown Source)
        at org.apache.derby.impl.jdbc.EmbedCallableStatement40.<init>(Unknown Source)
        at org.apache.derby.jdbc.Driver40.newEmbedCallableStatement(Unknown Source)
        at org.apache.derby.impl.jdbc.EmbedConnection.prepareCall(Unknown Source)
        at org.apache.derby.impl.jdbc.EmbedConnection.prepareCall(Unknown Source)
        at tigase.db.jdbc.DataRepositoryImpl.prepareQuery(DataRepositoryImpl.java:451)
        at tigase.db.jdbc.DataRepositoryImpl.initStatement(DataRepositoryImpl.java:406)
        at tigase.db.jdbc.DataRepositoryImpl.initPreparedStatement(DataRepositoryImpl.java:204)
        at tigase.db.DataRepositoryPool.initPreparedStatement(DataRepositoryPool.java:163)
        at tigase.db.jdbc.TigaseCustomAuth.initRepository(TigaseCustomAuth.java:482)
        at tigase.db.RepositoryFactory.getAuthRepository(RepositoryFactory.java:382)
        at tigase.conf.ConfiguratorAbstract.addAuthRepo(ConfiguratorAbstract.java:872)
        at tigase.conf.ConfiguratorAbstract.setProperties(ConfiguratorAbstract.java:849)
        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:603)
        at tigase.server.XMPPServer.start(XMPPServer.java:142)
        at tigase.server.XMPPServer.main(XMPPServer.java:112)
Caused by: ERROR 42Y03: 'TIGINITDB' is not recognized as a function or procedure.
        at org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
        at org.apache.derby.impl.sql.compile.StaticMethodCallNode.bindExpression(Unknown Source)
        at org.apache.derby.impl.sql.compile.JavaToSQLValueNode.bindExpression(Unknown Source)
        at org.apache.derby.impl.sql.compile.CallStatementNode.bindStatement(Unknown Source)
        at org.apache.derby.impl.sql.GenericStatement.prepMinion(Unknown Source)
        at org.apache.derby.impl.sql.GenericStatement.prepare(Unknown Source)
        at org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext.prepareInternalStatement(Unknown Source)
        at org.apache.derby.impl.jdbc.EmbedPreparedStatement.<init>(Unknown Source)
        at org.apache.derby.impl.jdbc.EmbedCallableStatement.<init>(Unknown Source)
        at org.apache.derby.impl.jdbc.EmbedCallableStatement20.<init>(Unknown Source)
        at org.apache.derby.impl.jdbc.EmbedCallableStatement30.<init>(Unknown Source)
        at org.apache.derby.impl.jdbc.EmbedCallableStatement40.<init>(Unknown Source)
        at org.apache.derby.jdbc.Driver40.newEmbedCallableStatement(Unknown Source)
        at org.apache.derby.impl.jdbc.EmbedConnection.prepareCall(Unknown Source)
        at org.apache.derby.impl.jdbc.EmbedConnection.prepareCall(Unknown Source)
        at tigase.db.jdbc.DataRepositoryImpl.prepareQuery(DataRepositoryImpl.java:451)
        at tigase.db.jdbc.DataRepositoryImpl.initStatement(DataRepositoryImpl.java:406)
        at tigase.db.jdbc.DataRepositoryImpl.initPreparedStatement(DataRepositoryImpl.java:204)
        at tigase.db.DataRepositoryPool.initPreparedStatement(DataRepositoryPool.java:163)
        at tigase.db.jdbc.TigaseCustomAuth.initRepository(TigaseCustomAuth.java:482)
        at tigase.db.RepositoryFactory.getAuthRepository(RepositoryFactory.java:382)
        at tigase.conf.ConfiguratorAbstract.addAuthRepo(ConfiguratorAbstract.java:872)
        at tigase.conf.ConfiguratorAbstract.setProperties(ConfiguratorAbstract.java:849)
        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:603)
        at tigase.server.XMPPServer.start(XMPPServer.java:142)
        at tigase.server.XMPPServer.main(XMPPServer.java:112)

The log keeps repeating the following every 2 seconds:

2015-01-20 15:22:03.732 [scheduler_pool-5-thread-1-ext]  ConnectionManager$1.run()  FINE: Reconnecting service for component: ext, to remote host: null on port: 5678
2015-01-20 15:22:03.733 [scheduler_pool-6-thread-1-ext-comp]  ConnectionManager$1.run()  FINE: Reconnecting service for component: ext-comp, to remote host: ext-comp.localhost on port: 5555
2015-01-20 15:22:03.733 [ConnectionOpenThread]  ConnectionManager$ConnectionListenerImpl.accept()  FINEST: Accept called for service: null@null
2015-01-20 15:22:03.734 [ConnectionOpenThread]  ConnectionManager$ConnectionListenerImpl.accept()  FINEST: Problem reconnecting the service: null, type: connect, Socket: null, jid: null, cid: null@null
2015-01-20 15:22:03.734 [ConnectionOpenThread]  ConnectionManager.reconnectService()  FINER: Reconnecting service for: ext, scheduling next try in 2secs, cid: null@null
2015-01-20 15:22:03.734 [ConnectionOpenThread]  ConnectionManager$ConnectionListenerImpl.accept()  FINEST: Accept called for service: null@null
2015-01-20 15:22:03.734 [ConnectionOpenThread]  ConnectionManager$ConnectionListenerImpl.accept()  FINEST: Problem reconnecting the service: null, type: connect, Socket: null, jid: null, cid: null@null
2015-01-20 15:22:03.734 [ConnectionOpenThread]  ConnectionManager.reconnectService()  FINER: Reconnecting service for: ext-comp, scheduling next try in 2secs, cid: null@null

Changing init.properties to config-type=--gen-config-comp and adding muc component results in same Derby DB errors and this every 2 seconds:

2015-01-20 15:40:00.978 [scheduler_pool-3-thread-1-ext]  ConnectionManager$1.run()  FINE: Reconnecting service for component: ext, to remote host: null on port: 5678
2015-01-20 15:40:00.979 [ConnectionOpenThread]  ConnectionManager$ConnectionListenerImpl.accept()  FINEST: Accept called for service: null@null
2015-01-20 15:40:00.980 [ConnectionOpenThread]  ConnectionManager$ConnectionListenerImpl.accept()  FINEST: Problem reconnecting the service: null, type: connect, Socket: null, jid: null, cid: null@null
2015-01-20 15:40:00.980 [ConnectionOpenThread]  ConnectionManager.reconnectService()  FINER: Reconnecting service for: ext, scheduling next try in 2secs, cid: null@null
2015-01-20 15:40:02.980 [scheduler_pool-3-thread-1-ext]  ConnectionManager$1.run()  FINE: Reconnecting service for component: ext, to remote host: null on port: 5678
2015-01-20 15:40:02.981 [ConnectionOpenThread]  ConnectionManager$ConnectionListenerImpl.accept()  FINEST: Accept called for service: null@null
2015-01-20 15:40:02.981 [ConnectionOpenThread]  ConnectionManager$ConnectionListenerImpl.accept()  FINEST: Problem reconnecting the service: null, type: connect, Socket: null, jid: null, cid: null@null
2015-01-20 15:40:02.982 [ConnectionOpenThread]  ConnectionManager.reconnectService()  FINER: Reconnecting service for: ext, scheduling next try in 2secs, cid: null@null

I am following instructions at these URLs

http://docs.tigase.org/tigase-server/5.2.2/properties_guide/webhelp/configType.html

http://docs.tigase.org/tigase-server/5.2.0/admin_guide/html_chunk/_configuration_wizards.html

http://docs.tigase.org/tigase-server/5.2.2/properties_guide/webhelp/external.html

Artur Hefczyc commented 10 years ago

Wojciech, please verify the setup is possible at all in our current code. It does not have to use --gen-config-cs, --gen-config-sm. It may use any configuration combination that actually works. Please dedicate to this no more than 16 hours. If after this time you won't find a way, assign it back to me.

wojciech.kapcia@tigase.net commented 10 years ago

I was able to have such setup working (with working muc as an example component):

tigase@node1:~/tigase-server$ lsof -iTCP -P -n | grep 5678
java    22816 tigase  118u  IPv6 8042196      0t0  TCP *:5678 (LISTEN)
java    22816 tigase  119u  IPv6 8042197      0t0  TCP 198.27.120.214:5678->198.27.120.215:59312 (ESTABLISHED)
tigase@node2:~/tigase-server$ lsof -iTCP -P -n | grep 5678
java    17756 tigase   68u  IPv6 8115991      0t0  TCP 198.27.120.215:59312->198.27.120.214:5678 (ESTABLISHED)

Please note, this still uses the old tigase.server.xmppcomponent.ComponentConnectionManager (from --ext-comp@) instead of @tigase.server.ext.ComponentProtocol entailed by @--external@.

I've spend on this less then 16h limit (ca 3,5h) - should I spend remaining time on clarifying the documentation and/or rework it to use tigase.server.ext.ComponentProtocol and remove old solution altogether?

EDIT:

configs for reference:

  • node1:
tigase@node1:~/tigase-server$ cat etc/init.properties
#config-type=--gen-config-def
config-type=--gen-config-sm

--ext-comp=xmpp-test.com,node2.xmpp-test.net,5678,very-secret,plain,accept

--admins=admin@xmpp-test.net,admin@xmpp-test.org,admin@xmpp-test.biz,admin@xmpp-test.com
--virt-hosts=xmpp-test.com,xmpp-test.biz

--packet.debug.full=true
--debug=debug,server,xmpp.impl,net,io,cluster
basic-conf/logging/java.util.logging.FileHandler.limit=500000000
basic-conf/logging/java.util.logging.FileHandler.count=20

--auth-db=tigase-auth
--user-db=mysql
--user-db-uri=jdbc:mysql://db1.xmpp-test.net/tigasedb_cl1?user=tigase&password=tigase1442&autoCreateUser=true

--comp-name-2 = muc
--comp-class-2 = tigase.muc.MUCComponent
  • node2:
tigase@node2:~/tigase-server$ cat etc/init.properties
#config-type=--gen-config-def
config-type=--gen-config-cs

--ext-comp=xmpp-test.com,node1.xmpp-test.net,5678,very-secret,plain,connect

--admins=admin@xmpp-test.net,admin@xmpp-test.org,admin@xmpp-test.biz,admin@xmpp-test.com
--virt-hosts=xmpp-test.com,xmpp-test.biz

--packet.debug.full=true
--debug=debug,server,xmpp.impl,net,io,cluster
basic-conf/logging/java.util.logging.FileHandler.limit=500000000
basic-conf/logging/java.util.logging.FileHandler.count=20

--auth-db=tigase.db.DummyRepository
--user-db=tigase.db.DummyRepository
#--user-db-uri=jdbc:mysql://db1.xmpp-test.net/tigasedb_cl1?user=tigase&password=tigase1442&autoCreateUser=true
Artur Hefczyc commented 10 years ago

Yes, please continue on this task. The most important thing is a documentation which describes step-by-step how to setup such a configuration. Using ext.ComponentProtocol is not critical but if it is not a lot of work, it would be good to have it, so we could drop the old implementation in the future versions.

Also, I think it is important that the SM server works in a cluster mode. This was not mentioned before, but this is what a customer would expect to have. CS server does not need to be in a cluster mode I think.

Referenced from commit 9 months ago
wojciech.kapcia@tigase.net batch edited 6 months ago
Name Previous Value Current Value
Iterations
empty
Candidate for next major release
issue 1 of 1
Type
Task
Priority
Minor
Assignee
RedmineID
1478
Version
Candidate for next major release
Spent time
145h 30m
Issue Votes (0)
Watchers (2)
Reference
tigase/_server/server-core#217
Please wait...
Page is in error, reload to recover