tuleap

Unable to change user password or create new user in Tuleap


I am unable to change a user password as the logged in user, as the admin or in the recover password section. I am also unable to create a new user. I get the error "Internal error: Could not update password." when trying to change a users password through administration.

In the /var/log/messages i have found the following error:

nscd: libnss-mysql: mysql_query failed: MySQL server has gone away, trying again (2)

I don't understand how the rest of the site content is still working and I can create and add stuff if the mysql database isn't working?!

The database is running and I can login using the credentials for both the dbauthuser and codendiadm database users.

Some other logs relating to this include:

/var/spool/mail/code

Fatal error: Uncaught exception 'DataAccessException' with message 'Unable to access the 
database ( - 2013). Please contact your administrator.' in
/usr/share/tuleap/src/common/dao/include/DataAccess.class.php:88
Stack trace:
#0 /usr/share/tuleap/src/common/dao/include/DataAccess.class.php(71):
 DataAccess->reconnect()
#1 /usr/share/tuleap/src/common/dao/CodendiDataAccess.class.php(41):
 DataAccess->DataAccess(Object(DataAccessCredentials), 0)
#2 /usr/share/tuleap/src/common/dao/CodendiDataAccess.class.php(48):
  CodendiDataAccess->__construct()
#3 /usr/share/tuleap/src/common/dao/include/DataAccessObject.class.php(49):
  CodendiDataAccess::instance()
#4 /usr/share/tuleap/src/common/Config/ForgeConfig.php(53):
  DataAccessObject->__construct()
#5 /usr/share/tuleap/src/www/include/pre.php(40):
  ForgeConfig::loadFromDatabase()
#6 /usr/share/tuleap/src/utils/process_system_events.php(23):
  require_once('/usr/share/tule...')
#7 {main}
thrown in /usr/share/tuleap/src/common/dao/include/DataAccess.class.php on line 88

/var/log/httpd/error.log

PHP Notice:  DB error ==> UPDATE user SET password='<passwordhash>',
user_pw='<passwordhash>', unix_pw='<passwordhash>', last_pwd_update=1433785478 
WHERE user_id = 102 @@ 
/usr/share/tuleap/src/common/dao/include/DataAccessObject.class.php
at line 147 in /usr/share/tuleap/src/common/dao/include/DataAccessObject.class.php 
on  155, referer: https://domain.com/account/login.php?return_to=%2Fmy%2F

Solution

  • Regarding nscd: libnss-mysql: mysql_query failed: MySQL server has gone away, trying again (2), it sounds suspicious but it's actually the way libnss-mysql tells you that it disconnects from the database. It's the normal way of working and harmless.

    Last, about the mail, it would be interesting to know the date / time. By default, every sunday at 00:45 the database is stopped for maintenance and this message can arise.

    EDIT: (from comments)

    According to the logs you set, the install was done partially May the 14th, 15th, 19th and 20th! It's hard to tell what is the correct DB state. To force the "replay" of the db upgrade you should delete the correponding entries in forge_upgrade_bucket table (nb 185 for password issues). If I was at your place, I would review all db upgrades after may 14th and check if my DB is coherent with that