0

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
jahayes91
  • 3
  • 3

1 Answers1

0

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

Manuel VACELET
  • 555
  • 4
  • 16
  • Thanks for your reply, I've just checked and I'm running 8.2.99.33 and still experiencing the same issue. I just checked the time and date on the mail and it is as you suggested 00:45 on Sunday. – jahayes91 Jun 09 '15 at 08:13
  • Did you ran the forgeupgrade after having updated the packages ? – Manuel VACELET Jun 09 '15 at 10:30
  • I haven't. I just tried the advice outlined [here](http://tuleap-documentation.readthedocs.org/en/latest/installation-guide/update.html) and still no luck. – jahayes91 Jun 09 '15 at 11:10
  • Could you past here the command you type for forgeupgrade as well as the output ? – Manuel VACELET Jun 09 '15 at 13:26
  • `/usr/lib/forgeupgrade/bin/forgeupgrade --config=/etc/codendi/forgeupgrade/config.ini update` – jahayes91 Jun 09 '15 at 13:52
  • The output is as follows: `INFO - System up-to-date` – jahayes91 Jun 09 '15 at 14:04
  • Could you connect to the database and run "desc user;" – Manuel VACELET Jun 09 '15 at 14:37
  • [The output was too long for a comment so i've copied it to pastebin.](http://pastebin.com/VzvzrMEN) – jahayes91 Jun 09 '15 at 17:05
  • You are lacking some DB updates (password field) that should have been run by forgeupgrade. Could you run `/usr/lib/forgeupgrade/bin/forgeupgrade --config=/etc/codendi/forgeupgrade/config.ini already-applied` – Manuel VACELET Jun 10 '15 at 08:59
  • I've run the script which gave me the following [output](http://pastebin.com/0HXUWR8u). Just tried to change a user password and I still got the same error. – jahayes91 Jun 10 '15 at 10:17
  • The issue is that all the upgrades are marked as skipped, it's normal when you install the platform but it's an issue after: `2015-06-08 19:15:14 00:00:00 Skipped 185 /usr/share/tuleap/src/db/mysql/updates/2015/201505051630_add_new_password_field.php` could you detail how/when you did the install ? – Manuel VACELET Jun 10 '15 at 15:53
  • I did the install around the 25/05/15. I followed [these instructions](https://tuleap-documentation.readthedocs.org/en/latest/installation-guide/full-installation.html) – jahayes91 Jun 10 '15 at 17:04
  • 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 – Manuel VACELET Jun 11 '15 at 14:07
  • Awesome advice. I removed the two entries from the latest update and re-ran the forge upgrade and can now change passwords and create new users. Thank you so much for your help. – jahayes91 Jun 13 '15 at 15:14
  • Great, I pasted the advice in the answer, would be great if you could accept it for following people that may face the same issue – Manuel VACELET Jun 16 '15 at 10:05