Unable to login after upgrade from 1.9.5 to 1.9.9

Moderators: Amaradana, TurboPT, TL Developers

Post Reply
euphxenos
TestLink user
Posts: 6
Joined: Sat Oct 19, 2013 5:18 pm

Unable to login after upgrade from 1.9.5 to 1.9.9

Post by euphxenos »

I'm trying to upgrade from a working installation of 1.9.5 to 1.9.9 (testlink-ga-testlink-code-9993615a8c3dc338946f5466acbf916d6c1898f4.tar.gz). Testlink and its database are running on separate hosts. Both hosts are running Debian Wheezy, and the database host is using Mysql 5.5.28. After the upgrade, when I try to login to Testlink, I am returned to the login page, with the following error added to the top of the page:

==============================================================================

DB Access Error - debug_print_backtrace() OUTPUT START

==============================================================================

#0 database->exec_query() called at [/tools/testlink/lib/functions/database.class.php:555]
#1 database->fetchFirstRow() called at [/tools/testlink/lib/functions/tlUser.class.php:274]
#2 tlUser->readFromDB() called at [/tools/testlink/lib/functions/doAuthorize.php:44]
#3 doAuthorize() called at [/tools/testlink/login.php:45]

==============================================================================

This appears to be where Testlink is trying to connect to the remote mysql database. My config_db.inc.php looks like this (DB_PASS and DB_HOST have been altered):

<?php
// Automatically Generated by TestLink Installer
define('DB_TYPE', 'mysql');
define('DB_USER', 'testlink_admin');
define('DB_PASS', 'password!');
define('DB_HOST', 'some-host02.subdomain.domain.com');
define('DB_NAME', 'testlinkdb');
define('DB_TABLE_PREFIX', '');
?>

When I try to connect from the testlink host to the database on the database host using the mysql command line and the credentials from config_db.inc.php, it works. This config is also working for our production Testlink 1.9.5 server. I didn't see another report of this problem. Is there something that I'm doing wrong in our configuration, or should I open a bug for this in Mantis (and is there more information that would be useful)?


thanks,
--Andrew
TurboPT
Member of TestLink Community
Posts: 343
Joined: Sun Dec 10, 2006 4:51 am

Re: Unable to login after upgrade from 1.9.5 to 1.9.9

Post by TurboPT »

euphxenos wrote:... Testlink and its database are running on separate hosts.

... When I try to connect from the testlink host to the database on the database host using the mysql command line and the credentials from config_db.inc.php, it works...

thanks,
--Andrew
So to be clear about the above post, it is when the credentials from the testlink host are used over on the DB host that is ok, but not when used from the testlink host TO the DB host, is that correct?

If so, then see this post. That sounds like a cross-host connection that needs an additional config on the DB host side.
[note that the post is related to bugzilla, BUT the cross-host connectivity matter is the same]
euphxenos
TestLink user
Posts: 6
Joined: Sat Oct 19, 2013 5:18 pm

Re: Unable to login after upgrade from 1.9.5 to 1.9.9

Post by euphxenos »

TurboPT wrote:
euphxenos wrote:... Testlink and its database are running on separate hosts.

... When I try to connect from the testlink host to the database on the database host using the mysql command line and the credentials from config_db.inc.php, it works...

thanks,
--Andrew
So to be clear about the above post, it is when the credentials from the testlink host are used over on the DB host that is ok, but not when used from the testlink host TO the DB host, is that correct?

If so, then see this post. That sounds like a cross-host connection that needs an additional config on the DB host side.
[note that the post is related to bugzilla, BUT the cross-host connectivity matter is the same]
No. If I run the mysql command line on the testlink host, I am able to establish a connection to the remote instance of mysqld running on the database host, using the credentials provided in config_db.inc.php. When testlink tries this, I get the error in my previous message. I am aware of the need to specify the remote host when granting privileges to a user in mysql to allow for remote connectivity. That has been done, and is not the issue here.
fman
Member of TestLink Community
Posts: 3108
Joined: Tue Nov 15, 2005 7:19 am

Re: Unable to login after upgrade from 1.9.5 to 1.9.9

Post by fman »

1. 1.9.9 does not exists till officially released => refer to it like latest code from gitorious
2. there is no clear indication that you have done all upgrade steps 1.9.5 -> 1.9.6 -> 1.9.7 -> 1.9.8 -> latest code
euphxenos
TestLink user
Posts: 6
Joined: Sat Oct 19, 2013 5:18 pm

Re: Unable to login after upgrade from 1.9.5 to 1.9.9

Post by euphxenos »

Per the README, I extracted the new version of testlink from its tarfile into a new directory, copied in the config_db.inc.php and custom_config.inc.php from the old install, increased max_input_vars in php.ini to 10000. After altering the following four files to remove the unneeded /*prefix*/, I then ran (in order):

install/sql/alter_tables/1.9.6/mysql/DB.1.6/step1/db_schema_update.sql
install/sql/alter_tables/1.9.6/mysql/DB.1.6/stepZ/z_final_step.sql
install/sql/alter_tables/1.9.8/mysql/DB.1.9.8/step1/db_schema_update.sql
install/sql/alter_tables/1.9.8/mysql/DB.1.9.8/stepZ/z_final_step.sql

When I was done, I moved the old install out of the way, renamed the directory I'd extracted this one into to take its place, then restarted apache. I think that's everything. Is there something I missed that would cause this?


thanks,
--Andrew
fman
Member of TestLink Community
Posts: 3108
Joined: Tue Nov 15, 2005 7:19 am

Re: Unable to login after upgrade from 1.9.5 to 1.9.9

Post by fman »

Best thing to do is

1. do a fresh install with lates code from gitorious and check everything is OK
2. after 1. is OK, we are certain new code has no blocking issues.
then
upgrade from 1.9.5 to 1.9.6 and test
upgrade from 1.9.6 to 1.9.7 and test
upgrade from 1.9.7 to 1.9.8 and test

because 1.9.9 has not yet released probably the alter to move db from 1.9.8 to 1.9.9 are not still ready.
best thing is compare sql that create tables for 1.9.8 with same for 1.9.9 to check differences

users table has been changed on what will be 1.9.9 a new field for auth method has been added.
check also the logs file generated by testlink
euphxenos
TestLink user
Posts: 6
Joined: Sat Oct 19, 2013 5:18 pm

Re: Unable to login after upgrade from 1.9.5 to 1.9.9

Post by euphxenos »

When I try upgrading 1.9.5 to 1.9.6, it works. 1.9.6 to 1.9.7 works. 1.9.7 to 1.9.8 is broken, I can't login. 1.9.5 straight to 1.9.8 is similarly broken. I haven't tried a fresh install of 1.9.9 because there doesn't appear to be any way to get my data into it, and I'm trying to look into some performance issues that require having our data in there.
fman
Member of TestLink Community
Posts: 3108
Joined: Tue Nov 15, 2005 7:19 am

Re: Unable to login after upgrade from 1.9.5 to 1.9.9

Post by fman »

>> 1.9.7 to 1.9.8 is broken
this kind of info is useless, because no indication about the problem faced is indicated => no possibility to get help
Post Reply