Project

General

Profile

Duplicate key value violates unique constraint "user_id"

Alex Kobzar
Added about 3 years ago

Hi everyone.

I was clean install Tigase XMPP server in console mode.

But i have database error all time. I don't do anything after install - just try to start server.

Database Postgresql 9.4

Error:

[[< 2016-03-14 08:23:06.944 GMT >ERROR: duplicate key value violates unique constraint "user_id"

< 2016-03-14 08:23:06.944 GMT >DETAIL: Key (lower(user_id::text))=(vhost-manager) already exists.

< 2016-03-14 08:23:06.944 GMT >CONTEXT: SQL statement "insert into tig_users (user_id, user_pw) values (_user_id, _user_pw)"

    PL/pgSQL function tigadduser(character varying,character varying) line 1 at SQL statement

    SQL statement "select case _enc when 'MD5-PASSWORD' then TigAddUser(_user_id, MD5(_user_pw)) when 'MD5-USERID-PASSWORD' then TigAddUser(_user_id, MD5(_user_id || _user_pw)) when 'MD5-USERNAME-PASSWORD' then TigAddUser(_user_id, MD5(split_part(_user_id, '@', 1) || _user_pw)) else TigAddUser(_user_id, _user_pw) end"

    PL/pgSQL function tigadduserplainpw(character varying,character varying) line 1 at SQL statement

< 2016-03-14 08:23:06.944 GMT >STATEMENT: select * from TigAddUserPlainPw($1, $2) as result]]

My config:

  1. Hosts

--virt-hosts = xmpp.domain.com

--vhost-anonymous-enabled = false

--vhost-register-enabled = true

--vhost-tls-required = true

--vhost-disable-dns-check = true

  1. Dsatabase

--user-db-uri = jdbc:postgresql://serverip:5432/tigasedb?user=username&password=passwd&useUnicode=true&characterEncoding=UTF-8

--user-db = pgsql

--admins = admin@xmpp.domain.com

--comp-name-5 = message-archive

--comp-name-4 = stun

  1. Proxy

--comp-name-3 = proxy

proxy/component-id=proxy@xmpp.domain.com

  1. Configuration

config-type = --gen-config-def

  1. pubSub

--comp-name-2 = pubsub

--comp-class-2 = tigase.pubsub.cluster.PubSubComponentClustered

  1. Cluster mode

--cluster-mode = false

  1. MUC

--comp-name-1 = muc

--comp-class-1 = tigase.muc.MUCComponent

muc/default_room_config/muc#roomconfig_persistentroom=true

muc/message-filter-enabled[B]=false

  1. Plugins

--sm-plugins = -amp,-message,-msgoffline,+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,+roster-presence,+jabber:iq:version,+http://jabber.org/protocol/stats,+vcard-temp,\

+http://jabber.org/protocol/commands,+jabber:iq:private,+urn:xmpp:ping,+basic-filter,-domain-filter,+pep,-zlib

--comp-class-5 = tigase.archive.MessageArchiveComponent

--comp-class-4 = tigase.stun.StunComponent

--comp-class-3 = tigase.socks5.Socks5ProxyComponent

  1. Debug

--debug =server,db,xmpp.impl

Some error log:

[[Loading component: s2s :: componentInfo{Title=Tigase XMPP Server, Version=7.0.2-b3821/563fcf81 (2015-05-15/00:41:16), Class=tigase.server.xmppserver.S2SConnectionManager}

java.lang.IllegalArgumentException

    at java.util.concurrent.LinkedBlockingQueue.<init>(LinkedBlockingQueue.java:261)

    at tigase.util.PriorityQueueRelaxed.init(PriorityQueueRelaxed.java:82)

    at tigase.util.PriorityQueueRelaxed.<init>(PriorityQueueRelaxed.java:69)

    at tigase.util.PriorityQueueAbstract.getPriorityQueue(PriorityQueueAbstract.java:146)

    at tigase.server.AbstractMessageReceiver.setMaxQueueSize(AbstractMessageReceiver.java:940)

    at tigase.server.AbstractMessageReceiver.setName(AbstractMessageReceiver.java:973)

    at tigase.server.xmppsession.SessionManager.setName(SessionManager.java:765)

    at tigase.server.MessageRouter.setProperties(MessageRouter.java:694)

    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)

2016-03-14 08:22:24.322 [main] Configurator.componentAdded() WARNING: ignoring NPE

java.lang.NullPointerException

    at tigase.stun.StunComponent.init(StunComponent.java:164)

    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:704)

    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)]]

I dont add any rows i database after install manually or do something else.

When database process initialized i see some errors in postgresql LOGS

 2016-03-14 08:38:16.485 GMT >WARNING:  there is no transaction in progress
< 2016-03-14 08:38:16.499 GMT >ERROR:  relation "tig_users" does not exist at character 22
< 2016-03-14 08:38:16.499 GMT >STATEMENT:  select count(*) from tig_users


Replies (21)

Added by Alex Kobzar about 3 years ago

Any updates?

This is important for me, be cause i can't run tigase and must be uses another jabber server at the moment.

Added by Eric Dziewa about 3 years ago

Which version are you using? Can you try a recent build from http://build.xmpp-test.net/nightlies/dists/ ? Here are our installation guides http://docs.tigase.org/tigase-server/snapshot/Administration_Guide/html/#QuickStart .

Added by Alex Kobzar about 3 years ago

I was try the last version.

Installed it and wasn't se errors in database log.

But server still don't worked

this is my error log (config - the same)

@STARTED Tigase Чт мар 17 06:41:34 GMT 2016

componentInfo{Title=Tigase XMPP Server, Version=7.1.0-SNAPSHOT-b4193/dae74d7b (2016-03-17/01:05:38), Class=tigase.xml.XMLUtils}

componentInfo{Title=Tigase XMPP Server, Version=7.1.0-SNAPSHOT-b4193/dae74d7b (2016-03-17/01:05:38), Class=tigase.util.ClassUtil}

componentInfo{Title=Tigase XMPP Server, Version=7.1.0-SNAPSHOT-b4193/dae74d7b (2016-03-17/01:05:38), Class=tigase.server.XMPPServer}

2016-03-17 06:41:34.895 [main] ConfiguratorAbstract.parseArgs() CONFIG: Setting defaults: --property-file = etc/init.properties

2016-03-17 06:41:34.936 [main] ConfiguratorAbstract.parseArgs() CONFIG: Loading initial properties from property file: etc/init.properties

2016-03-17 06:41:34.938 [main] ConfiguratorAbstract.parseArgs() CONFIG: Added default config parameter: (--comp-class-1=tigase.muc.MUCComponent)

2016-03-17 06:41:34.938 [main] ConfiguratorAbstract.parseArgs() CONFIG: Added default config parameter: (--virt-hosts=xmpp.mydomain.com)

2016-03-17 06:41:34.939 [main] ConfiguratorAbstract.parseArgs() CONFIG: Added default config parameter: (-user-db-uri=jdbc:postgresql://my_databse_server_ip/tigasedb?user=kobzar&password=Ujvjcbre1982&useUnicode=true&characterEncoding=UTF-8)

2016-03-17 06:41:34.940 [main] ConfiguratorAbstract.parseArgs() CONFIG: Added default config parameter: (--user-db=pgsql)

2016-03-17 06:41:34.940 [main] ConfiguratorAbstract.parseArgs() CONFIG: Added default config parameter: (--admins=admin@xmpp.mydomain.com)

2016-03-17 06:41:34.941 [main] ConfiguratorAbstract.parseArgs() CONFIG: Added default config parameter: (--vhost-anonymous-enabled=false)

2016-03-17 06:41:34.941 [main] ConfiguratorAbstract.parseArgs() CONFIG: Added default config parameter: (--vhost-tls-required=true)

2016-03-17 06:41:34.942 [main] ConfiguratorAbstract.parseArgs() CONFIG: Added default config parameter: (--comp-name-5=message-archive)

2016-03-17 06:41:34.943 [main] ConfiguratorAbstract.parseArgs() CONFIG: Added default config parameter: (--comp-name-4=stun)

2016-03-17 06:41:34.943 [main] ConfiguratorAbstract.parseArgs() CONFIG: Added default config parameter: (--comp-name-3=proxy)

2016-03-17 06:41:34.944 [main] ConfiguratorAbstract.parseArgs() CONFIG: Added default config parameter: (config-type=--gen-config-def)

2016-03-17 06:41:34.944 [main] ConfiguratorAbstract.parseArgs() CONFIG: Added default config parameter: (--comp-name-2=pubsub)

2016-03-17 06:41:34.945 [main] ConfiguratorAbstract.parseArgs() CONFIG: Added default config parameter: (--comp-name-1=muc)

2016-03-17 06:41:34.946 [main] ConfiguratorAbstract.parseArgs() CONFIG: Added default config parameter: (--cluster-mode=false)

2016-03-17 06:41:34.946 [main] ConfiguratorAbstract.parseArgs() CONFIG: Added default config parameter: (--sm-plugins=-amp,-message,-msgoffline,+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,+roster-presence,+jabber:iq:version,+http://jabber.org/protocol/stats,+vcard-temp,+http://jabber.org/protocol/commands,+jabber:iq:private,+urn:xmpp:ping,+basic-filter,-domain-filter,+pep,-zlib)

2016-03-17 06:41:34.947 [main] ConfiguratorAbstract.parseArgs() CONFIG: Added default config parameter: (--vhost-register-enabled=true)

2016-03-17 06:41:34.947 [main] ConfiguratorAbstract.parseArgs() CONFIG: Added default config parameter: (--debug=server,db,xmpp.impl)

2016-03-17 06:41:34.948 [main] ConfiguratorAbstract.parseArgs() CONFIG: Added default config parameter: (--comp-class-5=tigase.archive.MessageArchiveComponent)

2016-03-17 06:41:34.948 [main] ConfiguratorAbstract.parseArgs() CONFIG: Added default config parameter: (--vhost-disable-dns-check=true)

2016-03-17 06:41:34.949 [main] ConfiguratorAbstract.parseArgs() CONFIG: Added default config parameter: (--comp-class-4=tigase.stun.StunComponent)

2016-03-17 06:41:34.950 [main] ConfiguratorAbstract.parseArgs() CONFIG: Added default config parameter: (--comp-class-3=tigase.socks5.Socks5ProxyComponent)

2016-03-17 06:41:34.950 [main] ConfiguratorAbstract.parseArgs() CONFIG: Added default config parameter: (--comp-class-2=tigase.pubsub.cluster.PubSubComponentClustered)

2016-03-17 06:41:34.969 [main] DNSResolverDefault.() WARNING: Resolving default host name: localhost took: 11

2016-03-17 06:41:34.991 [main] AbstractMessageReceiver.setMaxQueueSize() FINEST: message-router maxQueueSize: 12 863, maxInQueueSize: 200, maxOutQueueSize: 25 726

2016-03-17 06:41:34.999 [main] MessageRouter.addRegistrator() INFO: Adding registrator: Configurator

2016-03-17 06:41:34.999 [main] MessageRouter.addComponent() INFO: Adding component:

2016-03-17 06:41:35.000 [main] ConfiguratorAbstract.componentAdded() CONFIG: component: basic-conf

2016-03-17 06:41:35.001 [main] ConfiguratorAbstract.setup() CONFIG: Setting up component: basic-conf

2016-03-17 06:41:35.488 [main] ConfiguratorAbstract.setup() CONFIG: Component basic-conf defaults: {component-id=basic-conf@localhost, def-hostname=localhost, admins=[Ljava.lang.String;@bae7dc0, scripts-dir=scripts/admin, command/ALL=ADMIN, logging/.level=CONFIG, logging/handlers=java.util.logging.ConsoleHandler java.util.logging.FileHandler, logging/java.util.logging.ConsoleHandler.formatter=tigase.util.LogFormatter, logging/java.util.logging.ConsoleHandler.level=WARNING, logging/java.util.logging.FileHandler.append=true, logging/java.util.logging.FileHandler.count=5, logging/java.util.logging.FileHandler.formatter=tigase.util.LogFormatter, logging/java.util.logging.FileHandler.limit=10000000, logging/java.util.logging.FileHandler.pattern=logs/tigase.log, logging/tigase.useParentHandlers=true, logging/java.util.logging.FileHandler.level=ALL, logging/tigase.server.level=ALL, logging/tigase.db.level=ALL, logging/tigase.xmpp.impl.level=ALL, user-domain-repo-pool=tigase.db.UserRepositoryMDImpl, auth-domain-repo-pool=tigase.db.AuthRepositoryMDImpl, user-repo-pool-size=128, data-repo-pool-size=128, user-repo-class=pgsql, user-repo-url=jdbc:derby:tigase-derbydb;create=true, auth-repo-class=tigase.db.jdbc.TigaseCustomAuth, auth-repo-url=jdbc:derby:tigase-derbydb;create=true, ssl-container-class=tigase.io.jdk18.SNISSLContextContainer, ssl-certs-location=certs/, ssl-def-cert-domain=default, config-dump-file=etc/config-dump.properties}

2016-03-17 06:41:35.489 [main] ConfiguratorAbstract.setup() CONFIG: Component basic-conf configuration: {component-id=basic-conf@localhost, def-hostname=localhost, admins=[Ljava.lang.String;@bae7dc0, scripts-dir=scripts/admin, command/ALL=ADMIN, logging/.level=CONFIG, logging/handlers=java.util.logging.ConsoleHandler java.util.logging.FileHandler, logging/java.util.logging.ConsoleHandler.formatter=tigase.util.LogFormatter, logging/java.util.logging.ConsoleHandler.level=WARNING, logging/java.util.logging.FileHandler.append=true, logging/java.util.logging.FileHandler.count=5, logging/java.util.logging.FileHandler.formatter=tigase.util.LogFormatter, logging/java.util.logging.FileHandler.limit=10000000, logging/java.util.logging.FileHandler.pattern=logs/tigase.log, logging/tigase.useParentHandlers=true, logging/java.util.logging.FileHandler.level=ALL, logging/tigase.server.level=ALL, logging/tigase.db.level=ALL, logging/tigase.xmpp.impl.level=ALL, user-domain-repo-pool=tigase.db.UserRepositoryMDImpl, auth-domain-repo-pool=tigase.db.AuthRepositoryMDImpl, user-repo-pool-size=128, data-repo-pool-size=128, user-repo-class=pgsql, user-repo-url=jdbc:derby:tigase-derbydb;create=true, auth-repo-class=tigase.db.jdbc.TigaseCustomAuth, auth-repo-url=jdbc:derby:tigase-derbydb;create=true, ssl-container-class=tigase.io.jdk18.SNISSLContextContainer, ssl-certs-location=certs/, ssl-def-cert-domain=default, config-dump-file=etc/config-dump.properties}

2016-03-17 06:41:35.491 [main] ConfiguratorAbstract.setProperties() INFO: Propeties size is 35, and here are all propeties: {component-id=basic-conf@localhost, def-hostname=localhost, admins=[Ljava.lang.String;@bae7dc0, scripts-dir=scripts/admin, command/ALL=ADMIN, logging/.level=CONFIG, logging/handlers=java.util.logging.ConsoleHandler java.util.logging.FileHandler, logging/java.util.logging.ConsoleHandler.formatter=tigase.util.LogFormatter, logging/java.util.logging.ConsoleHandler.level=WARNING, logging/java.util.logging.FileHandler.append=true, logging/java.util.logging.FileHandler.count=5, logging/java.util.logging.FileHandler.formatter=tigase.util.LogFormatter, logging/java.util.logging.FileHandler.limit=10000000, logging/java.util.logging.FileHandler.pattern=logs/tigase.log, logging/tigase.useParentHandlers=true, logging/java.util.logging.FileHandler.level=ALL, logging/tigase.server.level=ALL, logging/tigase.db.level=ALL, logging/tigase.xmpp.impl.level=ALL, user-domain-repo-pool=tigase.db.UserRepositoryMDImpl, auth-domain-repo-pool=tigase.db.AuthRepositoryMDImpl, user-repo-pool-size=128, data-repo-pool-size=128, user-repo-class=pgsql, user-repo-url=jdbc:derby:tigase-derbydb;create=true, auth-repo-class=tigase.db.jdbc.TigaseCustomAuth, auth-repo-url=jdbc:derby:tigase-derbydb;create=true, ssl-container-class=tigase.io.jdk18.SNISSLContextContainer, ssl-certs-location=certs/, ssl-def-cert-domain=default, config-dump-file=etc/config-dump.properties, shared-user-repo=null, shared-user-repo-params=null, shared-auth-repo=null, shared-auth-repo-params=null}

2016-03-17 06:41:36.579 [main] DataRepositoryImpl.initRepository() SEVERE: null

java.lang.ClassNotFoundException: org.apache.derby.jdbc.EmbeddedDriver

    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.Class.forName0(Native Method)

    at java.lang.Class.forName(Class.java:348)

    at tigase.db.jdbc.DataRepositoryImpl.initRepository(DataRepositoryImpl.java:262)

    at tigase.db.RepositoryFactory.getDataRepository(RepositoryFactory.java:465)

    at tigase.db.jdbc.JDBCRepository.initRepository(JDBCRepository.java:590)

    at tigase.db.RepositoryFactory.getUserRepository(RepositoryFactory.java:674)

    at tigase.conf.ConfiguratorAbstract.addUserRepo(ConfiguratorAbstract.java:906)

    at tigase.conf.ConfiguratorAbstract.setProperties(ConfiguratorAbstract.java:835)

    at tigase.conf.ConfiguratorAbstract.setup(ConfiguratorAbstract.java:543)

    at tigase.conf.ConfiguratorAbstract.componentAdded(ConfiguratorAbstract.java:179)

    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)

2016-03-17 06:41:36.591 [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:627)

    at tigase.db.RepositoryFactory.getUserRepository(RepositoryFactory.java:674)

    at tigase.conf.ConfiguratorAbstract.addUserRepo(ConfiguratorAbstract.java:906)

    at tigase.conf.ConfiguratorAbstract.setProperties(ConfiguratorAbstract.java:835)

    at tigase.conf.ConfiguratorAbstract.setup(ConfiguratorAbstract.java:543)

    at tigase.conf.ConfiguratorAbstract.componentAdded(ConfiguratorAbstract.java:179)

    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)

Caused by: tigase.db.DBInitException: Database initialization failed

    at tigase.db.jdbc.DataRepositoryImpl.initRepository(DataRepositoryImpl.java:296)

    at tigase.db.RepositoryFactory.getDataRepository(RepositoryFactory.java:465)

    at tigase.db.jdbc.JDBCRepository.initRepository(JDBCRepository.java:590)

    at tigase.db.RepositoryFactory.getUserRepository(RepositoryFactory.java:674)

    at tigase.conf.ConfiguratorAbstract.addUserRepo(ConfiguratorAbstract.java:906)

    at tigase.conf.ConfiguratorAbstract.setProperties(ConfiguratorAbstract.java:835)

    at tigase.conf.ConfiguratorAbstract.setup(ConfiguratorAbstract.java:543)

    at tigase.conf.ConfiguratorAbstract.componentAdded(ConfiguratorAbstract.java:179)

    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)

Caused by: java.sql.SQLException: No suitable driver found for jdbc:derby:tigase-derbydb;create=true

    at java.sql.DriverManager.getConnection(DriverManager.java:689)

    at java.sql.DriverManager.getConnection(DriverManager.java:270)

    at tigase.db.jdbc.DataRepositoryImpl.initRepo(DataRepositoryImpl.java:433)

    at tigase.db.jdbc.DataRepositoryImpl.initRepository(DataRepositoryImpl.java:290)

    at tigase.db.RepositoryFactory.getDataRepository(RepositoryFactory.java:465)

    at tigase.db.jdbc.JDBCRepository.initRepository(JDBCRepository.java:590)

    at tigase.db.RepositoryFactory.getUserRepository(RepositoryFactory.java:674)

    at tigase.conf.ConfiguratorAbstract.addUserRepo(ConfiguratorAbstract.java:906)

    at tigase.conf.ConfiguratorAbstract.setProperties(ConfiguratorAbstract.java:835)

    at tigase.conf.ConfiguratorAbstract.setup(ConfiguratorAbstract.java:543)

    at tigase.conf.ConfiguratorAbstract.componentAdded(ConfiguratorAbstract.java:179)

    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)

2016-03-17 06:41:36.596 [main] DataRepositoryImpl.initRepository() SEVERE: null

java.lang.ClassNotFoundException: org.apache.derby.jdbc.EmbeddedDriver

    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.Class.forName0(Native Method)

    at java.lang.Class.forName(Class.java:348)

    at tigase.db.jdbc.DataRepositoryImpl.initRepository(DataRepositoryImpl.java:262)

    at tigase.db.RepositoryFactory.getDataRepository(RepositoryFactory.java:465)

    at tigase.db.jdbc.TigaseCustomAuth.initRepository(TigaseCustomAuth.java:495)

    at tigase.db.RepositoryFactory.getAuthRepository(RepositoryFactory.java:389)

    at tigase.conf.ConfiguratorAbstract.addAuthRepo(ConfiguratorAbstract.java:875)

    at tigase.conf.ConfiguratorAbstract.setProperties(ConfiguratorAbstract.java:852)

    at tigase.conf.ConfiguratorAbstract.setup(ConfiguratorAbstract.java:543)

    at tigase.conf.ConfiguratorAbstract.componentAdded(ConfiguratorAbstract.java:179)

    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)

2016-03-17 06:41:36.597 [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:583)

    at tigase.db.RepositoryFactory.getAuthRepository(RepositoryFactory.java:389)

    at tigase.conf.ConfiguratorAbstract.addAuthRepo(ConfiguratorAbstract.java:875)

    at tigase.conf.ConfiguratorAbstract.setProperties(ConfiguratorAbstract.java:852)

    at tigase.conf.ConfiguratorAbstract.setup(ConfiguratorAbstract.java:543)

    at tigase.conf.ConfiguratorAbstract.componentAdded(ConfiguratorAbstract.java:179)

    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)

Caused by: tigase.db.DBInitException: Database initialization failed

    at tigase.db.jdbc.DataRepositoryImpl.initRepository(DataRepositoryImpl.java:296)

    at tigase.db.RepositoryFactory.getDataRepository(RepositoryFactory.java:465)

    at tigase.db.jdbc.TigaseCustomAuth.initRepository(TigaseCustomAuth.java:495)

    at tigase.db.RepositoryFactory.getAuthRepository(RepositoryFactory.java:389)

    at tigase.conf.ConfiguratorAbstract.addAuthRepo(ConfiguratorAbstract.java:875)

    at tigase.conf.ConfiguratorAbstract.setProperties(ConfiguratorAbstract.java:852)

    at tigase.conf.ConfiguratorAbstract.setup(ConfiguratorAbstract.java:543)

    at tigase.conf.ConfiguratorAbstract.componentAdded(ConfiguratorAbstract.java:179)

    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)

Caused by: java.sql.SQLException: No suitable driver found for jdbc:derby:tigase-derbydb;create=true

    at java.sql.DriverManager.getConnection(DriverManager.java:689)

    at java.sql.DriverManager.getConnection(DriverManager.java:270)

    at tigase.db.jdbc.DataRepositoryImpl.initRepo(DataRepositoryImpl.java:433)

    at tigase.db.jdbc.DataRepositoryImpl.initRepository(DataRepositoryImpl.java:290)

    at tigase.db.RepositoryFactory.getDataRepository(RepositoryFactory.java:465)

    at tigase.db.jdbc.TigaseCustomAuth.initRepository(TigaseCustomAuth.java:495)

    at tigase.db.RepositoryFactory.getAuthRepository(RepositoryFactory.java:389)

    at tigase.conf.ConfiguratorAbstract.addAuthRepo(ConfiguratorAbstract.java:875)

    at tigase.conf.ConfiguratorAbstract.setProperties(ConfiguratorAbstract.java:852)

    at tigase.conf.ConfiguratorAbstract.setup(ConfiguratorAbstract.java:543)

    at tigase.conf.ConfiguratorAbstract.componentAdded(ConfiguratorAbstract.java:179)

    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)

2016-03-17 06:41:37.102 [main] UserRepositoryMDImpl.userExists() WARNING: Couldn't obtain user repository for domain: vhost-manager, not even default one!

2016-03-17 06:41:37.103 [main] UserRepositoryMDImpl.addUser() WARNING: Couldn't obtain user repository for domain: vhost-manager, not even default one!

2016-03-17 06:41:37.103 [main] UserRepositoryMDImpl.addUser() WARNING: Couldn't obtain user repository for domain: vhost-manager, not even default one!

2016-03-17 06:41:37.103 [main] UserRepositoryMDImpl.getData() WARNING: Couldn't obtain user repository for domain: vhost-manager, not even default one!

2016-03-17 06:41:37.104 [main] VHostManager.setProperties() WARNING: {xmpp.mydomain.com=Domain: xmpp.mydomain.com, enabled: true, anonym: false, register: true, maxusers: 0, tls: true, s2sSecret: 2130bd06-9dc1-44ac-a036-a4834d85b9b9, domainFilter: ALL, domainFilterDomains: null, c2sPortsAllowed: null, saslAllowedMechanisms: null}

2016-03-17 06:41:37.104 [main] UserRepositoryMDImpl.getData() WARNING: Couldn't obtain user repository for domain: vhost-manager, not even default one!

Loading component: amp :: componentInfo{Title=Tigase XMPP Server, Version=7.1.0-SNAPSHOT-b4193/dae74d7b (2016-03-17/01:05:38), Class=tigase.server.amp.AmpComponent}

2016-03-17 06:41:37.553 [main] ConnectionManager.setProperties() WARNING: bosh last_minute_packets_limit = 2500

2016-03-17 06:41:37.553 [main] ConnectionManager.setProperties() WARNING: bosh total_packets_limit = 0

2016-03-17 06:41:37.554 [main] ConnectionManager.setProperties() WARNING: bosh last_minute_bin_limit = 20971520

2016-03-17 06:41:37.554 [main] ConnectionManager.setProperties() WARNING: bosh total_bin_limit = 0

Loading component: bosh :: componentInfo{Title=Tigase XMPP Server, Version=7.1.0-SNAPSHOT-b4193/dae74d7b (2016-03-17/01:05:38), Class=tigase.server.bosh.BoshConnectionManager}

2016-03-17 06:41:37.683 [main] ConnectionManager.setProperties() WARNING: c2s last_minute_packets_limit = 2500

2016-03-17 06:41:37.683 [main] ConnectionManager.setProperties() WARNING: c2s total_packets_limit = 0

2016-03-17 06:41:37.683 [main] ConnectionManager.setProperties() WARNING: c2s last_minute_bin_limit = 20971520

2016-03-17 06:41:37.683 [main] ConnectionManager.setProperties() WARNING: c2s total_bin_limit = 0

Loading component: c2s :: componentInfo{Title=Tigase XMPP Server, Version=7.1.0-SNAPSHOT-b4193/dae74d7b (2016-03-17/01:05:38), Class=tigase.server.xmppclient.ClientConnectionManager}

Loading component: eventbus :: componentInfo{Title=Tigase XMPP Server, Version=7.1.0-SNAPSHOT-b4193/dae74d7b (2016-03-17/01:05:38), Class=tigase.disteventbus.component.EventBusComponent}

2016-03-17 06:41:37.934 [main] MessageArchiveComponent.setProperties() SEVERE: repository uri is NULL!

Loading component: message-archive :: componentInfo{Title=Tigase Message Archiving Component, Version=1.2.0-SNAPSHOT-b110/184697c0-7.1.0-SNAPSHOT-b4193/dae74d7b (2016-03-17/01:05:38), Class=tigase.archive.MessageArchiveComponent}

2016-03-17 06:41:38.010 [main] ConfigRepository.setProperties() WARNING: Items list is not set in the configuration file!!

2016-03-17 06:41:38.010 [main] UserRepositoryMDImpl.userExists() WARNING: Couldn't obtain user repository for domain: tigase-monitor, not even default one!

2016-03-17 06:41:38.010 [main] UserRepositoryMDImpl.addUser() WARNING: Couldn't obtain user repository for domain: tigase-monitor, not even default one!

2016-03-17 06:41:38.010 [main] UserRepositoryMDImpl.addUser() WARNING: Couldn't obtain user repository for domain: tigase-monitor, not even default one!

2016-03-17 06:41:38.011 [main] UserRepositoryMDImpl.getData() WARNING: Couldn't obtain user repository for domain: tigase-monitor, not even default one!

2016-03-17 06:41:38.011 [main] MonitorComponent.setProperties() WARNING: Monitoring Tasks: {} with items: {}

2016-03-17 06:41:38.011 [main] UserRepositoryMDImpl.getData() WARNING: Couldn't obtain user repository for domain: tigase-monitor, not even default one!

Loading component: monitor :: componentInfo{Title=Tigase XMPP Server, Version=7.1.0-SNAPSHOT-b4193/dae74d7b (2016-03-17/01:05:38), Class=tigase.monitor.MonitorComponent}

2016-03-17 06:41:38.193 [main] UserRepositoryMDImpl.setData() WARNING: Couldn't obtain user repository for domain: multi-user-chat, not even default one!

2016-03-17 06:41:38.193 [main] UserRepositoryMDImpl.getSubnodes() WARNING: Couldn't obtain user repository for domain: multi-user-chat, not even default one!

2016-03-17 06:41:38.196 [main] UserRepositoryMDImpl.getKeys() WARNING: Couldn't obtain user repository for domain: multi-user-chat, not even default one!

2016-03-17 06:41:38.197 [main] UserRepositoryMDImpl.setData() WARNING: Couldn't obtain user repository for domain: multi-user-chat, not even default one!

2016-03-17 06:41:38.197 [main] UserRepositoryMDImpl.setData() WARNING: Couldn't obtain user repository for domain: multi-user-chat, not even default one!

2016-03-17 06:41:38.197 [main] UserRepositoryMDImpl.setData() WARNING: Couldn't obtain user repository for domain: multi-user-chat, not even default one!

2016-03-17 06:41:38.197 [main] UserRepositoryMDImpl.setData() WARNING: Couldn't obtain user repository for domain: multi-user-chat, not even default one!

2016-03-17 06:41:38.197 [main] UserRepositoryMDImpl.setData() WARNING: Couldn't obtain user repository for domain: multi-user-chat, not even default one!

2016-03-17 06:41:38.197 [main] UserRepositoryMDImpl.setData() WARNING: Couldn't obtain user repository for domain: multi-user-chat, not even default one!

2016-03-17 06:41:38.197 [main] UserRepositoryMDImpl.setData() WARNING: Couldn't obtain user repository for domain: multi-user-chat, not even default one!

2016-03-17 06:41:38.197 [main] UserRepositoryMDImpl.setData() WARNING: Couldn't obtain user repository for domain: multi-user-chat, not even default one!

2016-03-17 06:41:38.197 [main] UserRepositoryMDImpl.setData() WARNING: Couldn't obtain user repository for domain: multi-user-chat, not even default one!

2016-03-17 06:41:38.197 [main] UserRepositoryMDImpl.setData() WARNING: Couldn't obtain user repository for domain: multi-user-chat, not even default one!

2016-03-17 06:41:38.197 [main] UserRepositoryMDImpl.setData() WARNING: Couldn't obtain user repository for domain: multi-user-chat, not even default one!

2016-03-17 06:41:38.198 [main] UserRepositoryMDImpl.setData() WARNING: Couldn't obtain user repository for domain: multi-user-chat, not even default one!

2016-03-17 06:41:38.198 [main] UserRepositoryMDImpl.setData() WARNING: Couldn't obtain user repository for domain: multi-user-chat, not even default one!

2016-03-17 06:41:38.198 [main] UserRepositoryMDImpl.setData() WARNING: Couldn't obtain user repository for domain: multi-user-chat, not even default one!

2016-03-17 06:41:38.198 [main] UserRepositoryMDImpl.setData() WARNING: Couldn't obtain user repository for domain: multi-user-chat, not even default one!

2016-03-17 06:41:38.198 [main] UserRepositoryMDImpl.setData() WARNING: Couldn't obtain user repository for domain: multi-user-chat, not even default one!

2016-03-17 06:41:38.198 [main] UserRepositoryMDImpl.removeData() WARNING: Couldn't obtain user repository for domain: multi-user-chat, not even default one!

Loading component: muc :: componentInfo{Title=Tigase MUC, Version=2.4.0-SNAPSHOT-b410/aea38bff-7.1.0-SNAPSHOT-b4193/dae74d7b (2016-03-17/01:05:38), Class=tigase.muc.MUCComponent}

2016-03-17 06:41:38.342 [main] Socks5ProxyComponent.setProperties() SEVERE: An error initializing data repository pool:

java.lang.NullPointerException

    at tigase.db.UserRepositoryMDImpl.getResourceUri(UserRepositoryMDImpl.java:215)

    at tigase.socks5.Socks5ProxyComponent.setProperties(Socks5ProxyComponent.java:438)

    at tigase.conf.ConfiguratorAbstract.setup(ConfiguratorAbstract.java:543)

    at tigase.conf.ConfiguratorAbstract.componentAdded(ConfiguratorAbstract.java:179)

    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:543)

    at tigase.conf.ConfiguratorAbstract.componentAdded(ConfiguratorAbstract.java:179)

    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)

Loading component: proxy :: componentInfo{Title=Tigase Socks5 Component, Version=1.2.0-SNAPSHOT-b55/0eb21631, Class=tigase.socks5.Socks5ProxyComponent}

2016-03-17 06:41:38.351 [main] PubSubComponentClustered.() SEVERE: You've tried using Clustered version of the component but cluster-mode is disabled

2016-03-17 06:41:38.352 [main] PubSubComponentClustered.() SEVERE: Shutting down system!

ShutdownThread started...

2016-03-17 06:41:38.352 [MainShutdownThread] MonitorRuntime$MainShutdownThread.run() WARNING: ShutdownThread started...

Total number of threads: 1063

No locked threads.

ShutdownThread finished...@

Added by Eric Dziewa about 3 years ago

Is postgresql.jar in your jars/ directory? Please attach files tigase.log.0, tigase-console.log, init.properties, and tigase.conf.

Added by Alex Kobzar about 3 years ago

Yes. I have this file

@`--# ls -la jars

итого 14

drwxr-xr-x 2 root root 4096 мар 17 06:33 .

drwxr-xr-x 11 root root 4096 мар 17 20:56 ..

rw-r--r- 1 root root 6969675 мар 17 00:12 groovy-all.jar

rw-r--r- 1 root root 45024 мар 17 00:12 hamcrest-core.jar

rw-r--r- 1 root root 2551273 мар 17 00:12 jdmkrt.jar

rw-r--r- 1 root root 67625 мар 17 00:12 jstun.jar

rw-r--r- 1 root root 27240 мар 17 00:12 licence-lib.jar

rw-r--r- 1 root root 607093 мар 17 00:12 postgresql.jar

rw-r--r- 1 root root 61360 мар 17 00:12 tigase-acs.jar

rw-r--r- 1 root root 67842 мар 17 00:12 tigase-acs-muc.jar

rw-r--r- 1 root root 36511 мар 17 00:12 tigase-acs-pubsub.jar

rw-r--r- 1 root root 43576 мар 17 00:12 tigase-extras.jar

rw-r--r- 1 root root 69702 мар 17 00:12 tigase-message-archiving.jar

rw-r--r- 1 root root 160882 мар 17 00:12 tigase-muc.jar

rw-r--r- 1 root root 274716 мар 17 00:11 tigase-pubsub-2.2.0.jar.old

rw-r--r- 1 root root 383645 мар 17 00:12 tigase-pubsub.jar

rw-r--r- 1 root root 2209155 мар 17 00:12 tigase-server.jar

rw-r--r- 1 root root 60372 мар 17 00:12 tigase-socks5.jar

rw-r--r- 1 root root 8679 мар 17 00:12 tigase-stats-collector-library.jar

rw-r--r- 1 root root 7714 мар 17 00:12 tigase-stats-collector-provider.jar

rw-r--r- 1 root root 12508 мар 17 00:12 tigase-stun.jar@

logs.zip (24.9 KB) logs.zip

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

I think there is an error in configuration file etc/init.properties as I see following line in logs:

-user-db-uri=jdbc:postgresql://my_databse_server_ip/tigasedb?user=kobzar&password=Ujvjcbre1982&useUnicode=true&characterEncoding=UTF-8

while it should be:

--user-db-uri=jdbc:postgresql://my_databse_server_ip/tigasedb?user=kobzar&password=Ujvjcbre1982&useUnicode=true&characterEncoding=UTF-8

So --user-db-uri should be used instead of @-user-db-uri@.

Added by Alex Kobzar about 3 years ago

Yes, its really my mistake (i all time try change something)

But after return -- in config i have the same results...

@2016-03-17 21:33:41.962 [main] ConfiguratorAbstract.setProperties() SEVERE: Can't initialize user default repository:

tigase.db.DBInitException: Problem initializing jdbc connection: jdbc:postgresql://database_IP/tigasedb?user=kobzar&password=passwd

    at tigase.db.jdbc.JDBCRepository.initRepository(JDBCRepository.java:627)

    at tigase.db.RepositoryFactory.getUserRepository(RepositoryFactory.java:674)

    at tigase.conf.ConfiguratorAbstract.addUserRepo(ConfiguratorAbstract.java:906)

    at tigase.conf.ConfiguratorAbstract.setProperties(ConfiguratorAbstract.java:835)

    at tigase.conf.ConfiguratorAbstract.setup(ConfiguratorAbstract.java:543)

    at tigase.conf.ConfiguratorAbstract.componentAdded(ConfiguratorAbstract.java:179)

    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)

Caused by: tigase.db.DBInitException: Database initialization failed

    at tigase.db.jdbc.DataRepositoryImpl.initRepository(DataRepositoryImpl.java:296)

    at tigase.db.RepositoryFactory.getDataRepository(RepositoryFactory.java:465)

    at tigase.db.jdbc.JDBCRepository.initRepository(JDBCRepository.java:590)

    at tigase.db.RepositoryFactory.getUserRepository(RepositoryFactory.java:674)

    at tigase.conf.ConfiguratorAbstract.addUserRepo(ConfiguratorAbstract.java:906)

    at tigase.conf.ConfiguratorAbstract.setProperties(ConfiguratorAbstract.java:835)

    at tigase.conf.ConfiguratorAbstract.setup(ConfiguratorAbstract.java:543)

    at tigase.conf.ConfiguratorAbstract.componentAdded(ConfiguratorAbstract.java:179)

    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)

Caused by: org.postgresql.util.PSQLException: FATAL: sorry, too many clients already

    at org.postgresql.core.v3.ConnectionFactoryImpl.doAuthentication(ConnectionFactoryImpl.java:427)

    at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:203)

    at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:65)

    at org.postgresql.jdbc.PgConnection.<init>(PgConnection.java:159)

    at org.postgresql.Driver.makeConnection(Driver.java:416)

    at org.postgresql.Driver.connect(Driver.java:283)

    at java.sql.DriverManager.getConnection(DriverManager.java:664)

    at java.sql.DriverManager.getConnection(DriverManager.java:270)

    at tigase.db.jdbc.DataRepositoryImpl.initRepo(DataRepositoryImpl.java:433)

    at tigase.db.jdbc.DataRepositoryImpl.initRepository(DataRepositoryImpl.java:290)

    at tigase.db.RepositoryFactory.getDataRepository(RepositoryFactory.java:465)

    at tigase.db.jdbc.JDBCRepository.initRepository(JDBCRepository.java:590)

    at tigase.db.RepositoryFactory.getUserRepository(RepositoryFactory.java:674)

    at tigase.conf.ConfiguratorAbstract.addUserRepo(ConfiguratorAbstract.java:906)

    at tigase.conf.ConfiguratorAbstract.setProperties(ConfiguratorAbstract.java:835)

    at tigase.conf.ConfiguratorAbstract.setup(ConfiguratorAbstract.java:543)

    at tigase.conf.ConfiguratorAbstract.componentAdded(ConfiguratorAbstract.java:179)

    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 Andrzej Wójcik IoT 1 CloudTigaseTeam about 3 years ago

This is not same result.

This time your database (PostgreSQL) returns error as Tigase tries to open more connections to database than database will allow.

FATAL: sorry, too many clients already is returned by database server.

This is most likely due to too small number of connections set as limit of number of connections to database in PostgreSQL configuration.

Added by Alex Kobzar about 3 years ago

Yes. It was my mistake. I fixed it, but now i have another issue

Please upgrade database schema now.

Current scheme version is: 5.1, expected: 7.1

Check the schema upgrade guide at the address:

Administration Guide > Tigase Server Schema v7.1 Updates (available locally in docs directory and online http://docs.tigase.org)


It's like a quest :)

I updated scheme - clean logs and restart tigase server!

And now next trouble (config the same)

@STARTED Tigase Чт мар 17 22:30:18 GMT 2016

componentInfo{Title=Tigase XMPP Server, Version=7.1.0-SNAPSHOT-b4193/dae74d7b (2016-03-17/01:05:38), Class=tigase.xml.XMLUtils}

componentInfo{Title=Tigase XMPP Server, Version=7.1.0-SNAPSHOT-b4193/dae74d7b (2016-03-17/01:05:38), Class=tigase.util.ClassUtil}

componentInfo{Title=Tigase XMPP Server, Version=7.1.0-SNAPSHOT-b4193/dae74d7b (2016-03-17/01:05:38), Class=tigase.server.XMPPServer}

2016-03-17 22:30:18.392 [main] ConfiguratorAbstract.parseArgs() CONFIG: Setting defaults: --property-file = etc/init.properties

2016-03-17 22:30:18.433 [main] ConfiguratorAbstract.parseArgs() CONFIG: Loading initial properties from property file: etc/init.properties

2016-03-17 22:30:18.435 [main] ConfiguratorAbstract.parseArgs() CONFIG: Added default config parameter: (--comp-class-1=tigase.muc.MUCComponent)

2016-03-17 22:30:18.435 [main] ConfiguratorAbstract.parseArgs() CONFIG: Added default config parameter: (--virt-hosts=xmpp.mydomain.com)

2016-03-17 22:30:18.436 [main] ConfiguratorAbstract.parseArgs() CONFIG: Added default config parameter: (--user-db-uri=jdbc:postgresql://my_database_ip/tigasedb?user=kobzar&password=Evjhjvj19823&useUnicode=true&characterEncoding=UTF-8)

2016-03-17 22:30:18.437 [main] ConfiguratorAbstract.parseArgs() CONFIG: Added default config parameter: (--user-db=pgsql)

2016-03-17 22:30:18.437 [main] ConfiguratorAbstract.parseArgs() CONFIG: Added default config parameter: (--admins=admin@xmpp.mydomain.com)

2016-03-17 22:30:18.438 [main] ConfiguratorAbstract.parseArgs() CONFIG: Added default config parameter: (--vhost-anonymous-enabled=false)

2016-03-17 22:30:18.439 [main] ConfiguratorAbstract.parseArgs() CONFIG: Added default config parameter: (--vhost-tls-required=true)

2016-03-17 22:30:18.439 [main] ConfiguratorAbstract.parseArgs() CONFIG: Added default config parameter: (--comp-name-5=message-archive)

2016-03-17 22:30:18.440 [main] ConfiguratorAbstract.parseArgs() CONFIG: Added default config parameter: (--comp-name-4=stun)

2016-03-17 22:30:18.440 [main] ConfiguratorAbstract.parseArgs() CONFIG: Added default config parameter: (--comp-name-3=proxy)

2016-03-17 22:30:18.441 [main] ConfiguratorAbstract.parseArgs() CONFIG: Added default config parameter: (config-type=--gen-config-def)

2016-03-17 22:30:18.442 [main] ConfiguratorAbstract.parseArgs() CONFIG: Added default config parameter: (--comp-name-2=pubsub)

2016-03-17 22:30:18.442 [main] ConfiguratorAbstract.parseArgs() CONFIG: Added default config parameter: (--comp-name-1=muc)

2016-03-17 22:30:18.443 [main] ConfiguratorAbstract.parseArgs() CONFIG: Added default config parameter: (--cluster-mode=false)

2016-03-17 22:30:18.443 [main] ConfiguratorAbstract.parseArgs() CONFIG: Added default config parameter: (--sm-plugins=-amp,-message,-msgoffline,+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,+roster-presence,+jabber:iq:version,+http://jabber.org/protocol/stats,+vcard-temp,+http://jabber.org/protocol/commands,+jabber:iq:private,+urn:xmpp:ping,+basic-filter,-domain-filter,+pep,-zlib)

2016-03-17 22:30:18.444 [main] ConfiguratorAbstract.parseArgs() CONFIG: Added default config parameter: (--vhost-register-enabled=true)

2016-03-17 22:30:18.444 [main] ConfiguratorAbstract.parseArgs() CONFIG: Added default config parameter: (--debug=server,db,xmpp.impl)

2016-03-17 22:30:18.445 [main] ConfiguratorAbstract.parseArgs() CONFIG: Added default config parameter: (--comp-class-5=tigase.archive.MessageArchiveComponent)

2016-03-17 22:30:18.446 [main] ConfiguratorAbstract.parseArgs() CONFIG: Added default config parameter: (--vhost-disable-dns-check=true)

2016-03-17 22:30:18.446 [main] ConfiguratorAbstract.parseArgs() CONFIG: Added default config parameter: (--comp-class-4=tigase.stun.StunComponent)

2016-03-17 22:30:18.447 [main] ConfiguratorAbstract.parseArgs() CONFIG: Added default config parameter: (--comp-class-3=tigase.socks5.Socks5ProxyComponent)

2016-03-17 22:30:18.447 [main] ConfiguratorAbstract.parseArgs() CONFIG: Added default config parameter: (--comp-class-2=tigase.pubsub.cluster.PubSubComponentClustered)

2016-03-17 22:30:18.467 [main] DNSResolverDefault.() WARNING: Resolving default host name: localhost took: 12

2016-03-17 22:30:18.488 [main] AbstractMessageReceiver.setMaxQueueSize() FINEST: message-router maxQueueSize: 12 863, maxInQueueSize: 200, maxOutQueueSize: 25 726

2016-03-17 22:30:18.496 [main] MessageRouter.addRegistrator() INFO: Adding registrator: Configurator

2016-03-17 22:30:18.497 [main] MessageRouter.addComponent() INFO: Adding component:

2016-03-17 22:30:18.498 [main] ConfiguratorAbstract.componentAdded() CONFIG: component: basic-conf

2016-03-17 22:30:18.498 [main] ConfiguratorAbstract.setup() CONFIG: Setting up component: basic-conf

2016-03-17 22:30:18.983 [main] ConfiguratorAbstract.setup() CONFIG: Component basic-conf defaults: {component-id=basic-conf@localhost, def-hostname=localhost, admins=[Ljava.lang.String;@bae7dc0, scripts-dir=scripts/admin, command/ALL=ADMIN, logging/.level=CONFIG, logging/handlers=java.util.logging.ConsoleHandler java.util.logging.FileHandler, logging/java.util.logging.ConsoleHandler.formatter=tigase.util.LogFormatter, logging/java.util.logging.ConsoleHandler.level=WARNING, logging/java.util.logging.FileHandler.append=true, logging/java.util.logging.FileHandler.count=5, logging/java.util.logging.FileHandler.formatter=tigase.util.LogFormatter, logging/java.util.logging.FileHandler.limit=10000000, logging/java.util.logging.FileHandler.pattern=logs/tigase.log, logging/tigase.useParentHandlers=true, logging/java.util.logging.FileHandler.level=ALL, logging/tigase.server.level=ALL, logging/tigase.db.level=ALL, logging/tigase.xmpp.impl.level=ALL, user-domain-repo-pool=tigase.db.UserRepositoryMDImpl, auth-domain-repo-pool=tigase.db.AuthRepositoryMDImpl, user-repo-pool-size=128, data-repo-pool-size=128, user-repo-class=pgsql, user-repo-url=jdbc:postgresql://my_database_ip/tigasedb?user=kobzar&password=Evjhjvj19823&useUnicode=true&characterEncoding=UTF-8, auth-repo-class=tigase.db.jdbc.TigaseCustomAuth, auth-repo-url=jdbc:postgresql://my_database_ip/tigasedb?user=kobzar&password=Evjhjvj19823&useUnicode=true&characterEncoding=UTF-8, ssl-container-class=tigase.io.jdk18.SNISSLContextContainer, ssl-certs-location=certs/, ssl-def-cert-domain=default, config-dump-file=etc/config-dump.properties}

2016-03-17 22:30:18.985 [main] ConfiguratorAbstract.setup() CONFIG: Component basic-conf configuration: {component-id=basic-conf@localhost, def-hostname=localhost, admins=[Ljava.lang.String;@bae7dc0, scripts-dir=scripts/admin, command/ALL=ADMIN, logging/.level=CONFIG, logging/handlers=java.util.logging.ConsoleHandler java.util.logging.FileHandler, logging/java.util.logging.ConsoleHandler.formatter=tigase.util.LogFormatter, logging/java.util.logging.ConsoleHandler.level=WARNING, logging/java.util.logging.FileHandler.append=true, logging/java.util.logging.FileHandler.count=5, logging/java.util.logging.FileHandler.formatter=tigase.util.LogFormatter, logging/java.util.logging.FileHandler.limit=10000000, logging/java.util.logging.FileHandler.pattern=logs/tigase.log, logging/tigase.useParentHandlers=true, logging/java.util.logging.FileHandler.level=ALL, logging/tigase.server.level=ALL, logging/tigase.db.level=ALL, logging/tigase.xmpp.impl.level=ALL, user-domain-repo-pool=tigase.db.UserRepositoryMDImpl, auth-domain-repo-pool=tigase.db.AuthRepositoryMDImpl, user-repo-pool-size=128, data-repo-pool-size=128, user-repo-class=pgsql, user-repo-url=jdbc:postgresql://my_database_ip/tigasedb?user=kobzar&password=Evjhjvj19823&useUnicode=true&characterEncoding=UTF-8, auth-repo-class=tigase.db.jdbc.TigaseCustomAuth, auth-repo-url=jdbc:postgresql://my_database_ip/tigasedb?user=kobzar&password=Evjhjvj19823&useUnicode=true&characterEncoding=UTF-8, ssl-container-class=tigase.io.jdk18.SNISSLContextContainer, ssl-certs-location=certs/, ssl-def-cert-domain=default, config-dump-file=etc/config-dump.properties}

2016-03-17 22:30:18.987 [main] ConfiguratorAbstract.setProperties() INFO: Propeties size is 35, and here are all propeties: {component-id=basic-conf@localhost, def-hostname=localhost, admins=[Ljava.lang.String;@bae7dc0, scripts-dir=scripts/admin, command/ALL=ADMIN, logging/.level=CONFIG, logging/handlers=java.util.logging.ConsoleHandler java.util.logging.FileHandler, logging/java.util.logging.ConsoleHandler.formatter=tigase.util.LogFormatter, logging/java.util.logging.ConsoleHandler.level=WARNING, logging/java.util.logging.FileHandler.append=true, logging/java.util.logging.FileHandler.count=5, logging/java.util.logging.FileHandler.formatter=tigase.util.LogFormatter, logging/java.util.logging.FileHandler.limit=10000000, logging/java.util.logging.FileHandler.pattern=logs/tigase.log, logging/tigase.useParentHandlers=true, logging/java.util.logging.FileHandler.level=ALL, logging/tigase.server.level=ALL, logging/tigase.db.level=ALL, logging/tigase.xmpp.impl.level=ALL, user-domain-repo-pool=tigase.db.UserRepositoryMDImpl, auth-domain-repo-pool=tigase.db.AuthRepositoryMDImpl, user-repo-pool-size=128, data-repo-pool-size=128, user-repo-class=pgsql, user-repo-url=jdbc:postgresql://my_database_ip/tigasedb?user=kobzar&password=Evjhjvj19823&useUnicode=true&characterEncoding=UTF-8, auth-repo-class=tigase.db.jdbc.TigaseCustomAuth, auth-repo-url=jdbc:postgresql://my_database_ip/tigasedb?user=kobzar&password=Evjhjvj19823&useUnicode=true&characterEncoding=UTF-8, ssl-container-class=tigase.io.jdk18.SNISSLContextContainer, ssl-certs-location=certs/, ssl-def-cert-domain=default, config-dump-file=etc/config-dump.properties, shared-user-repo=null, shared-user-repo-params=null, shared-auth-repo=null, shared-auth-repo-params=null}

2016-03-17 22:30:21.767 [main] VHostManager.setProperties() WARNING: {xmpp.mydomain.com=Domain: xmpp.mydomain.com, enabled: true, anonym: false, register: true, maxusers: 0, tls: true, s2sSecret: 5d7e78d6-68af-407c-9aa9-4a31cd560c83, domainFilter: ALL, domainFilterDomains: null, c2sPortsAllowed: null, saslAllowedMechanisms: null}

Loading component: amp :: componentInfo{Title=Tigase XMPP Server, Version=7.1.0-SNAPSHOT-b4193/dae74d7b (2016-03-17/01:05:38), Class=tigase.server.amp.AmpComponent}

2016-03-17 22:30:22.282 [main] ConnectionManager.setProperties() WARNING: bosh last_minute_packets_limit = 2500

2016-03-17 22:30:22.282 [main] ConnectionManager.setProperties() WARNING: bosh total_packets_limit = 0

2016-03-17 22:30:22.282 [main] ConnectionManager.setProperties() WARNING: bosh last_minute_bin_limit = 20971520

2016-03-17 22:30:22.282 [main] ConnectionManager.setProperties() WARNING: bosh total_bin_limit = 0

Loading component: bosh :: componentInfo{Title=Tigase XMPP Server, Version=7.1.0-SNAPSHOT-b4193/dae74d7b (2016-03-17/01:05:38), Class=tigase.server.bosh.BoshConnectionManager}

2016-03-17 22:30:22.383 [main] ConnectionManager.setProperties() WARNING: c2s last_minute_packets_limit = 2500

2016-03-17 22:30:22.383 [main] ConnectionManager.setProperties() WARNING: c2s total_packets_limit = 0

2016-03-17 22:30:22.383 [main] ConnectionManager.setProperties() WARNING: c2s last_minute_bin_limit = 20971520

2016-03-17 22:30:22.383 [main] ConnectionManager.setProperties() WARNING: c2s total_bin_limit = 0

Loading component: c2s :: componentInfo{Title=Tigase XMPP Server, Version=7.1.0-SNAPSHOT-b4193/dae74d7b (2016-03-17/01:05:38), Class=tigase.server.xmppclient.ClientConnectionManager}

Loading component: eventbus :: componentInfo{Title=Tigase XMPP Server, Version=7.1.0-SNAPSHOT-b4193/dae74d7b (2016-03-17/01:05:38), Class=tigase.disteventbus.component.EventBusComponent}

Loading component: message-archive :: componentInfo{Title=Tigase Message Archiving Component, Version=1.2.0-SNAPSHOT-b110/184697c0-7.1.0-SNAPSHOT-b4193/dae74d7b (2016-03-17/01:05:38), Class=tigase.archive.MessageArchiveComponent}

2016-03-17 22:30:25.333 [main] ConfigRepository.setProperties() WARNING: Items list is not set in the configuration file!!

2016-03-17 22:30:25.393 [main] MonitorComponent.setProperties() WARNING: Monitoring Tasks: {} with items: {}

Loading component: monitor :: componentInfo{Title=Tigase XMPP Server, Version=7.1.0-SNAPSHOT-b4193/dae74d7b (2016-03-17/01:05:38), Class=tigase.monitor.MonitorComponent}

Loading component: muc :: componentInfo{Title=Tigase MUC, Version=2.4.0-SNAPSHOT-b410/aea38bff-7.1.0-SNAPSHOT-b4193/dae74d7b (2016-03-17/01:05:38), Class=tigase.muc.MUCComponent}

Loading component: proxy :: componentInfo{Title=Tigase Socks5 Component, Version=1.2.0-SNAPSHOT-b55/0eb21631, Class=tigase.socks5.Socks5ProxyComponent}

2016-03-17 22:30:26.047 [main] PubSubComponentClustered.() SEVERE: You've tried using Clustered version of the component but cluster-mode is disabled

2016-03-17 22:30:26.047 [main] PubSubComponentClustered.() SEVERE: Shutting down system!

ShutdownThread started...

Total number of threads: 1064

No locked threads.

ShutdownThread finished...@

And in Postgresql

@< 2016-03-17 22:31:23.352 GMT >ERROR: duplicate key value violates unique constraint "user_id"

< 2016-03-17 22:31:23.352 GMT >DETAIL: Key (lower(user_id::text))=(vhost-manager) already exists.

< 2016-03-17 22:31:23.353 GMT >CONTEXT: SQL statement "insert into tig_users (user_id, user_pw) values (_user_id, _user_pw)"

    PL/pgSQL function tigadduser(character varying,character varying) line 1 at SQL statement

    SQL statement "select case _enc when 'MD5-PASSWORD' then TigAddUser(_user_id, MD5(_user_pw)) when 'MD5-USERID-PASSWORD' then TigAddUser(_user_id, MD5(_user_id || _user_pw)) when 'MD5-USERNAME-PASSWORD' then TigAddUser(_user_id, MD5(split_part(_user_id, '@', 1) || _user_pw)) else TigAddUser(_user_id, _user_pw) end"

    PL/pgSQL function tigadduserplainpw(character varying,character varying) line 1 at SQL statement

< 2016-03-17 22:31:23.353 GMT >STATEMENT: select * from TigAddUserPlainPw($1, $2) as result

< 2016-03-17 22:31:24.224 GMT >ERROR: column "unsubscribed" does not exist at character 45

< 2016-03-17 22:31:24.224 GMT >STATEMENT: insert into tig_ma_msgs ( type ) VALUES ( "unsubscribed" ) RETURNING *

< 2016-03-17 22:31:24.237 GMT >ERROR: relation "tig_ma_jids_domain_index" already exists

< 2016-03-17 22:31:24.237 GMT >STATEMENT: create index tig_ma_jids_domain_index on tig_ma_jids (domain)

< 2016-03-17 22:31:26.987 GMT >ERROR: duplicate key value violates unique constraint "user_id"

< 2016-03-17 22:31:26.987 GMT >DETAIL: Key (lower(user_id::text))=(tigase-monitor) already exists.

< 2016-03-17 22:31:26.987 GMT >CONTEXT: SQL statement "insert into tig_users (user_id, user_pw) values (_user_id, _user_pw)"

    PL/pgSQL function tigadduser(character varying,character varying) line 1 at SQL statement

    SQL statement "select case _enc when 'MD5-PASSWORD' then TigAddUser(_user_id, MD5(_user_pw)) when 'MD5-USERID-PASSWORD' then TigAddUser(_user_id, MD5(_user_id || _user_pw)) when 'MD5-USERNAME-PASSWORD' then TigAddUser(_user_id, MD5(split_part(_user_id, '@', 1) || _user_pw)) else TigAddUser(_user_id, _user_pw) end"

    PL/pgSQL function tigadduserplainpw(character varying,character varying) line 1 at SQL statement

< 2016-03-17 22:31:26.987 GMT >STATEMENT: select * from TigAddUserPlainPw($1, $2) as result@

Added by Eric Dziewa about 3 years ago

What is the issue? Did you try to upgrade the schema? Basically it's database/postgresql-schema-upgrade-to-7-1.sql .

Added by Alex Kobzar about 3 years ago

Yes. I updated previous post.

Added by Eric Dziewa about 3 years ago

Change

--comp-class-2 = tigase.pubsub.cluster.PubSubComponentClustered

to

--comp-class-2 = tigase.pubsub.cluster.PubSubComponent

Added by Alex Kobzar about 3 years ago

O! Its a miracle...

@oading component: sess-man :: componentInfo{Title=Tigase XMPP Server, Version=7.1.0-SNAPSHOT-b4193/dae74d7b (2016-03-17/01:05:38), Class=tigase.server.xmppsession.SessionManager}

2016-03-17 23:41:00.154 [main] Configurator.componentAdded() WARNING: ignoring NPE

java.lang.NullPointerException

    at tigase.stun.StunComponent.init(StunComponent.java:164)

    at tigase.stun.StunComponent.setProperties(StunComponent.java:115)

    at tigase.conf.ConfiguratorAbstract.setup(ConfiguratorAbstract.java:543)

    at tigase.conf.ConfiguratorAbstract.componentAdded(ConfiguratorAbstract.java:179)

    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:543)

    at tigase.conf.ConfiguratorAbstract.componentAdded(ConfiguratorAbstract.java:179)

    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)

Loading component: stun :: componentInfo{Title=Tigase STUN Component, Version=1.1.2-SNAPSHOT-b37/67500783-7.1.0-SNAPSHOT-b4193/dae74d7b (2016-03-17/01:05:38), Class=tigase.stun.StunComponent}

2016-03-17 23:41:00.227 [main] ConnectionManager.setProperties() WARNING: ws2s last_minute_packets_limit = 2500

2016-03-17 23:41:00.227 [main] ConnectionManager.setProperties() WARNING: ws2s total_packets_limit = 0

2016-03-17 23:41:00.227 [main] ConnectionManager.setProperties() WARNING: ws2s last_minute_bin_limit = 20971520

2016-03-17 23:41:00.227 [main] ConnectionManager.setProperties() WARNING: ws2s total_bin_limit = 0

Loading component: ws2s :: componentInfo{Title=Tigase XMPP Server, Version=7.1.0-SNAPSHOT-b4193/dae74d7b (2016-03-17/01:05:38), Class=tigase.server.websocket.WebSocketClientConnectionManager}

2016-03-17 23:41:00.322 [main] ConfigurationCache.store() WARNING: Dumping server configuration to: etc/config-dump.properties

2016-03-17 23:41:02.448 [ConnectionOpenThread] SocketThread.() WARNING: 129 socketReadThreads started.

2016-03-17 23:41:02.492 [ConnectionOpenThread] SocketThread.() WARNING: 129 socketWriteThreads started.

2016-03-17 23:41:03.023 [in_21-c2s] SSLContextContainer.getSSLContext() WARNING: Auto-generated certificate for domain: xmpp.mydomain.com@

But still have error in postgress

@ 2016-03-17 23:41:55.792 GMT >ERROR: duplicate key value violates unique constraint "user_id"

< 2016-03-17 23:41:55.792 GMT >DETAIL: Key (lower(user_id::text))=(vhost-manager) already exists.

< 2016-03-17 23:41:55.792 GMT >CONTEXT: SQL statement "insert into tig_users (user_id, user_pw) values (_user_id, _user_pw)"

    PL/pgSQL function tigadduser(character varying,character varying) line 1 at SQL statement

    SQL statement "select case _enc when 'MD5-PASSWORD' then TigAddUser(_user_id, MD5(_user_pw)) when 'MD5-USERID-PASSWORD' then TigAddUser(_user_id, MD5(_user_id || _user_pw)) when 'MD5-USERNAME-PASSWORD' then TigAddUser(_user_id, MD5(split_part(_user_id, '@', 1) || _user_pw)) else TigAddUser(_user_id, _user_pw) end"

    PL/pgSQL function tigadduserplainpw(character varying,character varying) line 1 at SQL statement

< 2016-03-17 23:41:55.792 GMT >STATEMENT: select * from TigAddUserPlainPw($1, $2) as result

< 2016-03-17 23:41:56.744 GMT >ERROR: column "unsubscribed" does not exist at character 45

< 2016-03-17 23:41:56.744 GMT >STATEMENT: insert into tig_ma_msgs ( type ) VALUES ( "unsubscribed" ) RETURNING *

< 2016-03-17 23:41:56.753 GMT >ERROR: relation "tig_ma_jids_domain_index" already exists

< 2016-03-17 23:41:56.753 GMT >STATEMENT: create index tig_ma_jids_domain_index on tig_ma_jids (domain)

< 2016-03-17 23:41:59.264 GMT >ERROR: duplicate key value violates unique constraint "user_id"

< 2016-03-17 23:41:59.264 GMT >DETAIL: Key (lower(user_id::text))=(tigase-monitor) already exists.

< 2016-03-17 23:41:59.264 GMT >CONTEXT: SQL statement "insert into tig_users (user_id, user_pw) values (_user_id, _user_pw)"

    PL/pgSQL function tigadduser(character varying,character varying) line 1 at SQL statement

    SQL statement "select case _enc when 'MD5-PASSWORD' then TigAddUser(_user_id, MD5(_user_pw)) when 'MD5-USERID-PASSWORD' then TigAddUser(_user_id, MD5(_user_id || _user_pw)) when 'MD5-USERNAME-PASSWORD' then TigAddUser(_user_id, MD5(split_part(_user_id, '@', 1) || _user_pw)) else TigAddUser(_user_id, _user_pw) end"

    PL/pgSQL function tigadduserplainpw(character varying,character varying) line 1 at SQL statement

< 2016-03-17 23:41:59.264 GMT >STATEMENT: select * from TigAddUserPlainPw($1, $2) as result

@

Added by Alex Kobzar about 3 years ago

So, as i understand Tigase don't work with Postgresql database correctly at the moment?

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

No, Tigase XMPP Server works with PostgreSQL - I'm using it all the time for development running mostly with PostgreSQL as database server.

However in some places in code we execute TigaAddUser stored procedure and handle exception thrown when user already exists, instead of checking if user exists before trying to add new user to database.

So current behavior is correct and it should work without an issue as exception is only on PostgreSQL side and is expected by Tigase XMPP Server and handled correctly.

Added by Alex Kobzar about 3 years ago

But as you can see, i all ready have errors. I was try different version of tigase. Every time i am drop database and users from database and do clean installation.

But all time the same issue. About users... when i installed tigase (console mode) i am just one users for admin - thats all. After install i don't do anything - just start server.

So, i can't understand were from my issue....

If you have free time, we can contact with you in skype , started teamviewer and i show you all installation process.

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

What errors are you getting?

You fixed following errors:

  • missing - in --user-db property name

  • to low number of allowed connections to PostgreSQL

From provided data I see that you got following exception:

  • NPE error in StunComponent - STUN component requires additional manual configuration as described at https://projects.tigase.org/projects/stun/wiki/Configuration

  • exception in PostgreSQL during startup (while Tigase XMPP Server tries to create user for internal use by server named 'vhost-manager' which already exists) - this is only exception on database level and is handled correctly during processing on server side - this is not a bug and is not an issue

From that I see that you need to fix StunComponent configuration or you need to disable this component. Except from this issue with configuration (from provided parts of logs) all works correctly.

Added by Alex Kobzar about 3 years ago

Thanks for the NPE issue fixed.

But as you can see my primary trouble with postgresql database.

ERROR: duplicate key value violates unique constraint "user_id"

User for database with SA role. Installations every time is clear.

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

As I already stated ERROR: duplicate key value violates unique constraint "user_id" is an error on database level which is result of our way of adding users to database and is not error of Tigase XMPP Server. Even with this error being reported all works fine.

Added by Wojciech Kapcia TigaseTeam about 3 years ago

In addition to Andrzej commit - the issue with misleading exception being printed in the logs has been fixed in commit e5fd620 and will be included in the upcoming version 7.1.0.

Added by Alex Kobzar about 3 years ago

thanks - i am try it.

    (1-21/21)