Cannot login with own UserRepository and AuthRepository

Robert Larsen
Added about 5 years ago


I have been trying to get Tigase to use my own database by implementing my own classes implementing the UserRepository and AuthRepository interfaces.

They both load fine and a logging in the beginning of every method is invoked...I have something similar to this in the top of every method implemented:

public boolean userExists(BareJID user) {
    if (log.isLoggable(Level.INFO)) {
        log.log(Level.INFO, "userExists(\"{0}\")", new Object[] { user });

They load fine and even seem to be invoked:

$ tail -f logs/tigase.log.0 | grep -E 'Cego((User)|(Auth))Repo\.'
2014-03-06 11:54:06.748 [main]             CegoUserRepo.initRepository()      INFO:     initRepository()
2014-03-06 11:54:06.750 [main]             CegoAuthRepo.initRepository()      INFO:     initRepository: jdbc:mysql://localhost/playtopia?user=root&password=blar
2014-03-06 11:54:07.158 [main]             CegoAuthRepo.getUsersCount()       INFO:     getUsersCount()
2014-03-06 11:54:07.160 [main]             CegoAuthRepo.initRepository()      INFO:     Total user count: 1,997,041
2014-03-06 11:54:07.160 [main]             CegoAuthRepo.initRepository()      INFO:     Done initializing
2014-03-06 11:54:07.446 [main]             CegoUserRepo.userExists()          INFO:     userExists("vhost-manager")
2014-03-06 11:54:07.446 [main]             CegoUserRepo.addUser()             INFO:     addUser("vhost-manager")
2014-03-06 11:54:07.446 [main]             CegoUserRepo.addUser()             INFO:     addUser("vhost-manager")
2014-03-06 11:54:07.446 [main]             CegoUserRepo.getData()             INFO:     getData("vhost-manager","vhosts-lists")
2014-03-06 11:54:08.186 [main]             CegoUserRepo.userExists()          INFO:     userExists("rest")
2014-03-06 11:54:08.186 [main]             CegoUserRepo.addUser()             INFO:     addUser("rest")
2014-03-06 11:54:08.186 [main]             CegoUserRepo.addUser()             INFO:     addUser("rest")
2014-03-06 11:54:08.187 [main]             CegoUserRepo.getData()             INFO:     getData("rest","items-lists")
2014-03-06 11:54:19.918 [stats-cache]      CegoUserRepo.getUsersCount()       INFO:     getUsersCount()

However, I cannot log in, and nothing is logged when I try, so it seems like my two classes are not involved in the failed login attempt. I attempted both BOSH to port 5280 and directly to 5222 without any luck.

I get this on the client when connecting with BOSH:

<stream:features xmlns="jabber:client">
  <ver xmlns="urn:xmpp:features:rosterver"/>
  <starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls"/>
  <mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl">
  <register xmlns=""/>
  <auth xmlns=""/>

<auth xmlns="urn:ietf:params:xml:ns:xmpp-sasl" mechanism="PLAIN">

<failure xmlns="urn:ietf:params:xml:ns:xmpp-sasl">
  <text xml:lang="en">
    Password not verified

However, my classes don't log anything during the login attempt so they are not the ones that decied that the login should fail.

What am I missing?

Replies (4)

Added by nurnabi siddique about 5 years ago

if i am not wrong you have to mention your repository class name in

--user-db= xx.yy.repository.CustomJDBCRepository

--auth-db= xx.yy.repository.CustomAuthRepository

it will fix the issue


Added by Robert Larsen about 5 years ago

I have those two lines in Otherwise the classes wouldn't have been instantiated.

Added by Wojciech Kapcia TigaseTeam about 5 years ago

Which Tigase do you use? Can you share your whole and (could be privately, if you prefer) your implementation? Have you correctly implemented @tigase.db.AuthRepository.otherAuth()@?

Added by Robert Larsen about 5 years ago

This is embarrassing...I had another server running on those ports on IPv6 and for some reason it got the connections.

I'll shut up now