Projects tigase _server tigase-mongodb Issues #9
[Crash] Server crashed when creating a new client using Psi (#9)
Gaurav Gupta opened 1 decade ago

Hi,

When creating a new user account using Psi, server crashed with the Arithmetic Exception - divide by 0.

following are the logs:

2014-10-13 11:37:20.732 [ConnectionOpenThread]  SocketThread.<clinit>()       WARNING:  9 socketReadThreads started.
2014-10-13 11:37:20.734 [ConnectionOpenThread]  SocketThread.<clinit>()       WARNING:  9 socketWriteThreads started.
Bare Jid is: tom@ibscomp84
Repo pool size: 10
Index is: 7
Bare Jid is: tom@ibscomp84
Repo pool size: 0
2014-10-13 11:37:36.821 [jabber:iq:register Queue Worker 1]  WorkerThread.run()  SEVERE: tigase.server.xmppsession.SessionManager$ProcessorWorkerThread,(jabber:iq:register Queue Worker 1) Exception during packet processing: from=c2s@ibscomp84/192.168.0.143_5222_192.168.0.143_40700, to=sess-man@ibscomp84, DATA=<iq type="set" id="aab1a" xmlns="jabber:client" to="ibscomp84">
<query xmlns="jabber:iq:register">
<username>tom@ibscomp84</username><password>noida@123</password><email/></query></iq>, SIZE=184, XMLNS=jabber:client, PRIORITY=NORMAL, PERMISSION=NONE, TYPE=set
java.lang.ArithmeticException: / by zero
	at tigase.db.DataRepositoryPool.takeRepo(DataRepositoryPool.java:77)
	at tigase.db.DataRepositoryPool.getPreparedStatement(DataRepositoryPool.java:179)
	at tigase.db.DataRepositoryPool.getPreparedStatement(DataRepositoryPool.java:182)
	at tigase.db.jdbc.TigaseCustomAuth.addUser(TigaseCustomAuth.java:347)
	at tigase.db.AuthRepositoryMDImpl.addUser(AuthRepositoryMDImpl.java:82)
	at tigase.xmpp.RepositoryAccess.register(RepositoryAccess.java:473)
	at tigase.xmpp.impl.JabberIqRegister.process(JabberIqRegister.java:328)
	at tigase.server.xmppsession.SessionManager$ProcessorWorkerThread.process(SessionManager.java:2864)
	at tigase.util.WorkerThread.run(WorkerThread.java:132)

Repo pool size: 0 which causes exception when modulo is performed.

Steps:

  1. start the server.

  2. Go to Psi client.

  3. Register new user.

  4. Click finish.

===User is not registered===

tigase-console.log

Andrzej Wójcik (Tigase) commented 1 decade ago

I just tried to use current version and with my configuration it works fine.

In log file from your instance of Tigase XMPP Server, I see that auth-repo-class property is set to @tigase.db.jdbc.TigaseCustomAuth@. This is value forces usage of TigaseCustomAuth implementation which is designed to use with JDBC data store (such as MySQL, PostgreSQL) but it will not work with MongoDB.

Value of auth-repo-class to tigase.db.jdbc.TigaseCustomAuth can be set in one of two cases:

  1. in etc/init.properties file there is a line --auth-db=tigase.db.jdbc.TigaseCustomAuth which forces usage of this implementation

  2. in etc/init.properties file there is a line like --user-db= which causes Tigase XMPP Server to automatically set auth-repo-class to tigase.db.jdbc.TigaseCustomAuth

At [[Configuration]] wiki page I suggested to omit lines like --user-db= and --auth-db= as Tigase XMPP Server is able to detect proper implementations using data store URI passed as --user-db-uri=.

I suggested to add


If this will not help please provide content of your etc/init.properties file so I could use same configuration in my own installation to diagnose this issue.

Artur Hefczyc commented 10 years ago

Cannot replicate and no feedback from a user, closing issue.

issue 1 of 1
Type
Bug
Priority
Normal
Assignee
RedmineID
2344
Issue Votes (0)
Watchers (0)
Reference
tigase/_server/tigase-mongodb#9
Please wait...
Page is in error, reload to recover