Project

General

Profile

use maridb, failed!!!

Added by liu shiyi 11 days ago

init.properties

config-type=--gen-config-def
--admins=admin@hotdoor18-laptop
--virt-hosts = hotdoor18-laptop
--debug=server

--comp-name-1=http
--comp-class-1=tigase.http.HttpMessageReceiver
--user-db=mariadb
--user-db-uri = jdbc:mariadb://10.0.55.118:3306/tigasedb?user=root&password=123456

http/setup/admin-credentials=admin:tigase


when start it error as followings:

..............

2017-08-10 19:12:26.396 [main]             BasicComponent.loadScripts()       CONFIG:   basic-conf: Loading scripts from directory: scripts/admin/basic-conf
2017-08-10 19:12:26.405 [main]             SSLContextContainer.init()         CONFIG:   Loading predefined server certificates
2017-08-10 19:12:26.406 [main]             SSLContextContainer.init()         CONFIG:   Loading server certificates from PEM directory: certs/
2017-08-10 19:12:26.474 [main]             SSLContextContainer.init()         CONFIG:   Loaded server certificate for domain: hotdoor18-laptop from file: certs/hotdoor18-laptop.pem
2017-08-10 19:12:26.480 [main]             AuthRepositoryMDImpl.initRepository()  INFO: Multi-domain repository pool initialized: jdbc:mariadb://10.0.55.118:3306/tigasedb?user=root&password=123456, params: {}
2017-08-10 19:12:26.481 [main]             UserRepositoryMDImpl.initRepository()  INFO: Multi-domain repository pool initialized: jdbc:mariadb://10.0.55.118:3306/tigasedb?user=root&password=123456, param
2017-08-10 19:12:26.485 [main]             ConfiguratorAbstract.setProperties()  SEVERE: Can't initialize user default repository: 
java.lang.ClassNotFoundException: mariadb
    at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    at tigase.osgi.ModulesManagerImpl.forName(ModulesManagerImpl.java:187)
    at tigase.db.RepositoryFactory.getUserRepository(RepositoryFactory.java:671)
    at tigase.conf.ConfiguratorAbstract.addUserRepo(ConfiguratorAbstract.java:888)
    at tigase.conf.ConfiguratorAbstract.setProperties(ConfiguratorAbstract.java:817)
    at tigase.conf.ConfiguratorAbstract.setup(ConfiguratorAbstract.java:519)
    at tigase.conf.ConfiguratorAbstract.componentAdded(ConfiguratorAbstract.java:152)
    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:138)
    at tigase.server.MessageRouter.setConfig(MessageRouter.java:644)
    at tigase.server.XMPPServer.start(XMPPServer.java:142)
    at tigase.server.XMPPServer.main(XMPPServer.java:112)
2017-08-10 19:12:26.487 [Thread-1]         SSLContextContainer.loadTrustedCerts()  CONFIG: Loading trustKeyStore from location: /usr/java/jdk1.8.0_144/jre/lib/security/cacerts
2017-08-10 19:12:26.512 [main]             ConfiguratorAbstract.setProperties()  SEVERE: Can't initialize auth default repository: 
tigase.db.DBInitException: Problem initializing jdbc connection: jdbc:mariadb://10.0.55.118:3306/tigasedb?user=root&password=123456
    at tigase.db.jdbc.TigaseCustomAuth.initRepository(TigaseCustomAuth.java:583)
    at tigase.db.RepositoryFactory.getAuthRepository(RepositoryFactory.java:387)
    at tigase.conf.ConfiguratorAbstract.addAuthRepo(ConfiguratorAbstract.java:857)
    at tigase.conf.ConfiguratorAbstract.setProperties(ConfiguratorAbstract.java:834)
    at tigase.conf.ConfiguratorAbstract.setup(ConfiguratorAbstract.java:519)
    at tigase.conf.ConfiguratorAbstract.componentAdded(ConfiguratorAbstract.java:152)
    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:138)
    at tigase.server.MessageRouter.setConfig(MessageRouter.java:644)
    at tigase.server.XMPPServer.start(XMPPServer.java:142)
    at tigase.server.XMPPServer.main(XMPPServer.java:112)
Caused by: tigase.db.DBInitException: Database not supported
    at tigase.db.jdbc.DataRepositoryImpl.initRepository(DataRepositoryImpl.java:233)
    at tigase.db.RepositoryFactory.getDataRepository(RepositoryFactory.java:463)
    at tigase.db.jdbc.TigaseCustomAuth.initRepository(TigaseCustomAuth.java:495)
    at tigase.db.RepositoryFactory.getAuthRepository(RepositoryFactory.java:387)
    at tigase.conf.ConfiguratorAbstract.addAuthRepo(ConfiguratorAbstract.java:857)
    at tigase.conf.ConfiguratorAbstract.setProperties(ConfiguratorAbstract.java:834)
    at tigase.conf.ConfiguratorAbstract.setup(ConfiguratorAbstract.java:519)
    at tigase.conf.ConfiguratorAbstract.componentAdded(ConfiguratorAbstract.java:152)
    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:138)
    at tigase.server.MessageRouter.setConfig(MessageRouter.java:644)
    at tigase.server.XMPPServer.start(XMPPServer.java:142)
    at tigase.server.XMPPServer.main(XMPPServer.java:112)
2017-08-10 19:12:26.528 [main]             ConfiguratorAbstract.componentAdded()  CONFIG:  component: message-router
2017-08-10 19:12:26.528 [main]             ConfiguratorAbstract.setup()       CONFIG:   Setting up component: message-router
2017-08-10 19:12:26.529 [main]             MessageRouterConfig.getDefaults()  CONFIG:   Cluster mode: null
2017-08-10 19:12:26.529 [main]             MessageRouterConfig.getDefaults()  CONFIG:   Cluster mode is off.
2017-08-10 19:12:26.530 [main]             MessageRouterConfig.getDefaults()  CONFIG:   Configured type: --gen-config-def, loading components: [amp, bosh, c2s, eventbus, monitor, s2s, sess-man, ws2s]
2017-08-10 19:12:26.530 [main]             ConfiguratorAbstract.setup()       CONFIG:   Component message-router defaults: {component-id=message-router@hotdoor18-laptop, def-hostname=hotdoor18-laptop, admins=[Ljava.lang.String;@2f508f3c, scripts-dir=scripts/admin, command/ALL=ADMIN, max-queue-size=10680, scheduler-threads=2, incoming-filters=tigase.server.filters.PacketCounter, outgoing-filters=tigase.server.filters.PacketCounter, packet-delivery-retry-count=15, components/msg-receivers/http.class=tigase.http.HttpMessageReceiver, components/msg-receivers/http.active=true, components/msg-receivers/id-names=[Ljava.lang.String;@3ed03652, components/msg-receivers/amp.class=tigase.server.amp.AmpComponent, components/msg-receivers/amp.active=true, components/msg-receivers/bosh.class=tigase.server.bosh.BoshConnectionManager, components/msg-receivers/bosh.active=true, components/msg-receivers/c2s.class=tigase.server.xmppclient.ClientConnectionManager, components/msg-receivers/c2s.active=true, components/msg-receivers/eventbus.class=tigase.disteventbus.component.EventBusComponent, components/msg-receivers/eventbus.active=true, components/msg-receivers/monitor.class=tigase.monitor.MonitorComponent, components/msg-receivers/monitor.active=true, components/msg-receivers/s2s.class=tigase.server.xmppserver.S2SConnectionManager, components/msg-receivers/s2s.active=true, components/msg-receivers/sess-man.class=tigase.server.xmppsession.SessionManager, components/msg-receivers/sess-man.active=true, components/msg-receivers/ws2s.class=tigase.server.websocket.WebSocketClientConnectionManager, components/msg-receivers/ws2s.active=true, components/registrators/id-names=[Ljava.lang.String;@4aedaf61, components/registrators/vhost-man.class=tigase.vhosts.VHostManager, components/registrators/vhost-man.active=true, components/registrators/stats.class=tigase.stats.StatisticsCollector, components/registrators/stats.active=true, hostnames=[Ljava.lang.String;@173797f0, disco-name=Tigase, disco-show-version=true, updates-checking=true, updates-checking-interval=7}
2017-08-10 19:12:26.530 [main]             ConfiguratorAbstract.setup()       CONFIG:   Component message-router configuration: {component-id=message-router@hotdoor18-laptop, def-hostname=hotdoor18-laptop, admins=[Ljava.lang.String;@2f508f3c, scripts-dir=scripts/admin, command/ALL=ADMIN, max-queue-size=10680, scheduler-threads=2, incoming-filters=tigase.server.filters.PacketCounter, outgoing-filters=tigase.server.filters.PacketCounter, packet-delivery-retry-count=15, components/msg-receivers/http.class=tigase.http.HttpMessageReceiver, components/msg-receivers/http.active=true, components/msg-receivers/id-names=[Ljava.lang.String;@3ed03652, components/msg-receivers/amp.class=tigase.server.amp.AmpComponent, components/msg-receivers/amp.active=true, components/msg-receivers/bosh.class=tigase.server.bosh.BoshConnectionManager, components/msg-receivers/bosh.active=true, components/msg-receivers/c2s.class=tigase.server.xmppclient.ClientConnectionManager, components/msg-receivers/c2s.active=true, components/msg-receivers/eventbus.class=tigase.disteventbus.component.EventBusComponent, components/msg-receivers/eventbus.active=true, components/msg-receivers/monitor.class=tigase.monitor.MonitorComponent, components/msg-receivers/monitor.active=true, components/msg-receivers/s2s.class=tigase.server.xmppserver.S2SConnectionManager, components/msg-receivers/s2s.active=true, components/msg-receivers/sess-man.class=tigase.server.xmppsession.SessionManager, components/msg-receivers/sess-man.active=true, components/msg-receivers/ws2s.class=tigase.server.websocket.WebSocketClientConnectionManager, components/msg-receivers/ws2s.active=true, components/registrators/id-names=[Ljava.lang.String;@4aedaf61, components/registrators/vhost-man.class=tigase.vhosts.VHostManager, components/registrators/vhost-man.active=true, components/registrators/stats.class=tigase.stats.StatisticsCollector, components/registrators/stats.active=true, hostnames=[Ljava.lang.String;@173797f0, disco-name=Tigase, disco-show-version=true, updates-checking=true, updates-checking-interval=7}

......


Replies (5)

RE: use maridb, failed!!! - Added by Wojciech Kapcia 10 days ago

You have an error in your config:

--user-db-uri = jdbc:mariadb://10.0.55.118:3306/tigasedb?user=root&password=123456

You must not use mariadb in JDBC url and simply use there mysql as they are compatible.

RE: use maridb, failed!!! - Added by liu shiyi 10 days ago

thank you ! but i want to use mariadb,dose the tigase server supporttt mariadb?what should i do ?
thank you!

RE: use maridb, failed!!! - Added by Artur Hefczyc 9 days ago

You just configure Tigase as like for MySQL database but connect mariadb instead.

RE: use maridb, failed!!! - Added by liu shiyi 8 days ago

config-type=--gen-config-def
--admins=admin@hotdoor18-laptop
--virt-hosts = hotdoor18-laptop
--debug=server

--comp-name-1=http
--comp-class-1=tigase.http.HttpMessageReceiver
--user-db=mysql
--user-db-uri = jdbc:mariadb://10.0.55.118:3306/mysql?user=root&password=123456

like this?

tigase server can not start!!!

RE: use maridb, failed!!! - Added by Wojciech Kapcia 7 days ago

liu shiyi wrote:

--user-db-uri = jdbc:mariadb://10.0.55.118:3306/mysql?user=root&password=123456

like this?

NO! This is not correct.

Change from:

--user-db-uri = jdbc:mariadb://10.0.55.118:3306/mysql?user=root&password=123456

to:
--user-db-uri = jdbc: mysql://10.0.55.118:3306/mysql?user=root&password=123456
(mariadb to mysql)

    (1-5/5)