Project

General

Profile

Errors when using Tigase with MySQL

Peter Rajcani
Added about 4 years ago

We see the following errors in the log when using Tigase with MySQL:

ConfiguratorAbstract.setProperties()  SEVERE: Can't initialize user default repository: 
tigase.db.DBInitException: Problem initializing jdbc connection: jdbc:mysql://localhost/tigasedb?user=tigase&password=tigase12
    at tigase.db.jdbc.JDBCRepository.initRepository(JDBCRepository.java:851)
    at tigase.db.RepositoryFactory.getUserRepository(RepositoryFactory.java:502)
    at tigase.conf.ConfiguratorAbstract.addUserRepo(ConfiguratorAbstract.java:955)
    at tigase.conf.ConfiguratorAbstract.setProperties(ConfiguratorAbstract.java:875)
    at tigase.conf.ConfiguratorAbstract.setup(ConfiguratorAbstract.java:550)
    at tigase.conf.ConfiguratorAbstract.componentAdded(ConfiguratorAbstract.java:182)
    at tigase.conf.Configurator.componentAdded(Configurator.java:50)
    at tigase.conf.Configurator.componentAdded(Configurator.java:33)
    at tigase.server.AbstractComponentRegistrator.addComponent(AbstractComponentRegistrator.java:115)
    at tigase.server.MessageRouter.addRegistrator(MessageRouter.java:141)
    at tigase.server.MessageRouter.setConfig(MessageRouter.java:696)
    at tigase.server.XMPPServer.start(XMPPServer.java:142)
    at tigase.server.XMPPServer.main(XMPPServer.java:112)
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'tigasedb.tig_pairs' doesn't exist
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
    at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
    at com.mysql.jdbc.Util.getInstance(Util.java:381)
    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1030)
    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)
    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3491)
    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3423)
    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:910)
    at com.mysql.jdbc.MysqlIO.nextRow(MysqlIO.java:1405)
    at com.mysql.jdbc.MysqlIO.readSingleRowSet(MysqlIO.java:2805)
    at com.mysql.jdbc.MysqlIO.getResultSet(MysqlIO.java:467)
    at com.mysql.jdbc.MysqlIO.readResultsForQueryOrUpdate(MysqlIO.java:2510)
    at com.mysql.jdbc.MysqlIO.readAllResults(MysqlIO.java:1746)
    at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2135)
    at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2536)
    at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2465)
    at com.mysql.jdbc.StatementImpl.executeQuery(StatementImpl.java:1383)
    at tigase.db.jdbc.JDBCRepository.checkDBSchema(JDBCRepository.java:1391)
    at tigase.db.jdbc.JDBCRepository.initRepository(JDBCRepository.java:815)
    at tigase.db.RepositoryFactory.getUserRepository(RepositoryFactory.java:502)
    at tigase.conf.ConfiguratorAbstract.addUserRepo(ConfiguratorAbstract.java:955)
    at tigase.conf.ConfiguratorAbstract.setProperties(ConfiguratorAbstract.java:875)
    at tigase.conf.ConfiguratorAbstract.setup(ConfiguratorAbstract.java:550)
    at tigase.conf.ConfiguratorAbstract.componentAdded(ConfiguratorAbstract.java:182)
    at tigase.conf.Configurator.componentAdded(Configurator.java:50)
    at tigase.conf.Configurator.componentAdded(Configurator.java:33)
    at tigase.server.AbstractComponentRegistrator.addComponent(AbstractComponentRegistrator.java:115)
    at tigase.server.MessageRouter.addRegistrator(MessageRouter.java:141)
    at tigase.server.MessageRouter.setConfig(MessageRouter.java:696)
    at tigase.server.XMPPServer.start(XMPPServer.java:142)
    at tigase.server.XMPPServer.main(XMPPServer.java:112)

ocks5ProxyComponent.setProperties()  SEVERE: An error initializing data repository pool: 
java.lang.NullPointerException
    at tigase.db.UserRepositoryMDImpl.getResourceUri(UserRepositoryMDImpl.java:314)
    at tigase.socks5.Socks5ProxyComponent.setProperties(Socks5ProxyComponent.java:442)
    at tigase.conf.ConfiguratorAbstract.setup(ConfiguratorAbstract.java:550)
    at tigase.conf.ConfiguratorAbstract.componentAdded(ConfiguratorAbstract.java:182)
    at tigase.conf.Configurator.componentAdded(Configurator.java:50)
    at tigase.conf.Configurator.componentAdded(Configurator.java:33)
    at tigase.server.AbstractComponentRegistrator.addComponent(AbstractComponentRegistrator.java:115)
    at tigase.server.MessageRouter.addComponent(MessageRouter.java:118)
    at tigase.server.MessageRouter.addRouter(MessageRouter.java:155)
    at tigase.server.MessageRouter.setProperties(MessageRouter.java:797)
    at tigase.conf.ConfiguratorAbstract.setup(ConfiguratorAbstract.java:550)
    at tigase.conf.ConfiguratorAbstract.componentAdded(ConfiguratorAbstract.java:182)
    at tigase.conf.Configurator.componentAdded(Configurator.java:50)
    at tigase.conf.Configurator.componentAdded(Configurator.java:33)
    at tigase.server.AbstractComponentRegistrator.addComponent(AbstractComponentRegistrator.java:115)
    at tigase.server.MessageRouter.addRegistrator(MessageRouter.java:141)
    at tigase.server.MessageRouter.setConfig(MessageRouter.java:696)
    at tigase.server.XMPPServer.start(XMPPServer.java:142)
    at tigase.server.XMPPServer.main(XMPPServer.java:112)

and

2014-12-23 16:57:50.808 [main]             StanzaReceiver.setProperties()     SEVERE:   Can't initialize repository: 
tigase.db.DBInitException: Problem initializing jdbc connection: jdbc:mysql://localhost/tigasedb?user=tigase&password=tigase12
    at tigase.db.jdbc.JDBCRepository.initRepository(JDBCRepository.java:851)
    at tigase.db.RepositoryFactory.getUserRepository(RepositoryFactory.java:502)
    at tigase.server.sreceiver.StanzaReceiver.setProperties(StanzaReceiver.java:670)
    at tigase.conf.ConfiguratorAbstract.setup(ConfiguratorAbstract.java:550)
    at tigase.conf.ConfiguratorAbstract.componentAdded(ConfiguratorAbstract.java:182)
    at tigase.conf.Configurator.componentAdded(Configurator.java:50)
    at tigase.conf.Configurator.componentAdded(Configurator.java:33)
    at tigase.server.AbstractComponentRegistrator.addComponent(AbstractComponentRegistrator.java:115)
    at tigase.server.MessageRouter.addComponent(MessageRouter.java:118)
    at tigase.server.MessageRouter.addRouter(MessageRouter.java:155)
    at tigase.server.MessageRouter.setProperties(MessageRouter.java:797)
    at tigase.conf.ConfiguratorAbstract.setup(ConfiguratorAbstract.java:550)
    at tigase.conf.ConfiguratorAbstract.componentAdded(ConfiguratorAbstract.java:182)
    at tigase.conf.Configurator.componentAdded(Configurator.java:50)
    at tigase.conf.Configurator.componentAdded(Configurator.java:33)
    at tigase.server.AbstractComponentRegistrator.addComponent(AbstractComponentRegistrator.java:115)
    at tigase.server.MessageRouter.addRegistrator(MessageRouter.java:141)
    at tigase.server.MessageRouter.setConfig(MessageRouter.java:696)
    at tigase.server.XMPPServer.start(XMPPServer.java:142)
    at tigase.server.XMPPServer.main(XMPPServer.java:112)
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'tigasedb.tig_pairs' doesn't exist
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
    at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
    at com.mysql.jdbc.Util.getInstance(Util.java:381)
    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1030)
    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)
    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3491)
    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3423)
    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:910)
    at com.mysql.jdbc.MysqlIO.nextRow(MysqlIO.java:1405)
    at com.mysql.jdbc.MysqlIO.readSingleRowSet(MysqlIO.java:2805)
    at com.mysql.jdbc.MysqlIO.getResultSet(MysqlIO.java:467)
    at com.mysql.jdbc.MysqlIO.readResultsForQueryOrUpdate(MysqlIO.java:2510)
    at com.mysql.jdbc.MysqlIO.readAllResults(MysqlIO.java:1746)
    at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2135)
    at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2536)
    at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2465)
    at com.mysql.jdbc.StatementImpl.executeQuery(StatementImpl.java:1383)
    at tigase.db.jdbc.JDBCRepository.checkDBSchema(JDBCRepository.java:1391)
    at tigase.db.jdbc.JDBCRepository.initRepository(JDBCRepository.java:815)
    at tigase.db.RepositoryFactory.getUserRepository(RepositoryFactory.java:502)
    at tigase.server.sreceiver.StanzaReceiver.setProperties(StanzaReceiver.java:670)
    at tigase.conf.ConfiguratorAbstract.setup(ConfiguratorAbstract.java:550)
    at tigase.conf.ConfiguratorAbstract.componentAdded(ConfiguratorAbstract.java:182)
    at tigase.conf.Configurator.componentAdded(Configurator.java:50)
    at tigase.conf.Configurator.componentAdded(Configurator.java:33)
    at tigase.server.AbstractComponentRegistrator.addComponent(AbstractComponentRegistrator.java:115)
    at tigase.server.MessageRouter.addComponent(MessageRouter.java:118)
    at tigase.server.MessageRouter.addRouter(MessageRouter.java:155)
    at tigase.server.MessageRouter.setProperties(MessageRouter.java:797)
    at tigase.conf.ConfiguratorAbstract.setup(ConfiguratorAbstract.java:550)
    at tigase.conf.ConfiguratorAbstract.componentAdded(ConfiguratorAbstract.java:182)
    at tigase.conf.Configurator.componentAdded(Configurator.java:50)
    at tigase.conf.Configurator.componentAdded(Configurator.java:33)
    at tigase.server.AbstractComponentRegistrator.addComponent(AbstractComponentRegistrator.java:115)
    at tigase.server.MessageRouter.addRegistrator(MessageRouter.java:141)
    at tigase.server.MessageRouter.setConfig(MessageRouter.java:696)
    at tigase.server.XMPPServer.start(XMPPServer.java:142)
    at tigase.server.XMPPServer.main(XMPPServer.java:112)

I have run the MySQL database preparation steps described here:

http://docs.tigase.org/tigase-server/snapshot/Administration_Guide/html_chunk/_prepare_the_mysql_database_for_the_tigase_server.html

Our init.properties file:

--comp-class-1 = tigase.muc.MUCComponent
--virt-hosts = tigasetest.com
--user-db-uri = jdbc:mysql://localhost/tigasedb?user=tigase&password=tigase12
--user-db = mysql
--admins = admin@tigasetest.com,http@tigasetest.com,pubsub@tigasetest.com
--comp-name-4 = message-archive
--comp-name-3 = proxy
config-type = --gen-config-all
--comp-name-2 = pubsub
--comp-name-1 = muc
--cluster-mode = true
--sm-plugins = +message-archive-xep-0136
--debug = server
--comp-class-4 = tigase.archive.MessageArchiveComponent
--comp-class-3 = tigase.socks5.Socks5ProxyComponent
--comp-class-2 = tigase.pubsub.PubSubComponent
--comp-name-5 = http
--comp-class-5 = tigase.http.HttpMessageReceiver
--api-keys = open_access

Replies (3)

Added by Peter Rajcani about 4 years ago

The add-user command gives the following error:

./bin/tclmt.sh -u admin@tigasetest.com -p add-user

Dec 23, 2014 11:22:28 AM tigase.xml.db.XMLDB setupNewDB

INFO: Create empty DB.

Exception during connection to tigasetest.com:

java.net.UnknownHostException: tigasetest.com

Added by Wojciech Kapcia TigaseTeam about 4 years ago

Peter Rajcani wrote:

We see the following errors in the log when using Tigase with MySQL:

I have run the MySQL database preparation steps described here:

http://docs.tigase.org/tigase-server/snapshot/Administration_Guide/html_chunk/_prepare_the_mysql_database_for_the_tigase_server.html

From the log entry:

Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'tigasedb.tig_pairs' doesn't exist

it looks like the schema creation wasn't successful. Please verify that all tables and stored procedures are in the database.

Added by Peter Rajcani about 4 years ago

Thanks! We reinstalled the 7.0.0 snapshot version build 3736 and created a new database. This resolved the issue.

    (1-3/3)