TL 1.8.5b + Bugzilla RUNNING ON 2 SERVERS = Won't Connect

Ask community to help.

Moderators: Amaradana, TurboPT, TL Developers

Post Reply
jkoebel
TestLink user
Posts: 3
Joined: Mon Aug 23, 2010 10:49 pm

TL 1.8.5b + Bugzilla RUNNING ON 2 SERVERS = Won't Connect

Post by jkoebel »

Hi everyone,

We've switched from HP Quality Center to TestLink internally, and I'm in charge of setting it up. I was able to get the application installed and configured, mostly, in just a couple of minutes but am having trouble getting it to integrate with Bugzilla. It looks to me like the application is insisting to try and either connect locally only, or use a local username only, instead of trying to connect to the other server.

My setup:

TestLink+MySQL: qaloki.example.com
Bugzilla+MySQL: bugzilla.example.com

In my configuration, I have everything set up correctly:

Code: Select all

//Set the bug tracking system Interface
/** DB host to use when connecting to the Bugzilla db */
define('BUG_TRACK_DB_HOST', 'bugzilla.example.com');

/** name of the database that contains the Bugzilla tables */
define('BUG_TRACK_DB_NAME', 'bugs');

/** charset of the database that contains the Bugzilla tables */
define('BUG_TRACK_DB_CHARSET', 'UTF-8');

/** useful if you have several schemas see BUGID 1444*/
// define('BUG_TRACK_DB_SCHEMA', 'bugs');

/** DB type used for the bugtracking db */
define('BUG_TRACK_DB_TYPE','mysql');

/** DB user and password to use for connecting to the Bugzilla db */
define('BUG_TRACK_DB_USER', 'bugs');
define('BUG_TRACK_DB_PASS', '****');
This does not work; it throws the error about being unable to connect to the bug tracking system. In my logfile, I get lines that look like this:

Code: Select all

		E_WARNING
mysql_connect() [<a href='function.mysql-connect'>function.mysql-connect</a>]: Access denied for user 'bugs'@'qaloki.example.com' (using password: YES) - in C:\wampserver\www\testlink\third_party\adodb\drivers\adodb-mysql.inc.php - Line 364
It's trying to connect as @qaloki.example.com for some reason, to the off-site server despite the fact that I told it where the server is. If I change BUG_TRACK_DB_USER to bugs@bugzilla.example.com, it gives me this:

Code: Select all

		E_WARNING
mysql_connect() [<a href='function.mysql-connect'>function.mysql-connect</a>]: Access denied for user 'bugs@bugzilla.ex'@'qaloki.example.com' (using password: YES) - in C:\wampserver\www\testlink\third_party\adodb\drivers\adodb-mysql.inc.php - Line 364
The Bugzilla MySQL server has remote TCP/IP connections enabled and works fine by itself.

Any thoughts?
TurboPT
Member of TestLink Community
Posts: 343
Joined: Sun Dec 10, 2006 4:51 am

Re: TestLink 1.8.5b + Bugzilla = Won't Connect

Post by TurboPT »

Still need help?

The first warning makes sense, as that is a cross-host configuration.
jkoebel
TestLink user
Posts: 3
Joined: Mon Aug 23, 2010 10:49 pm

Re: TestLink 1.8.5b + Bugzilla = Won't Connect

Post by jkoebel »

Am I to understand that I cannot use cross-hosted DBs for this feature, then?

I sort of figured as much myself by now, and am in the process of migrating the Bugzilla installation from its current server onto the same server as Testlink. That's all well and good, but if that is in fact the case, it would not be unwelcome for there to be a note in the documentation about requiring both applications to share the same DB server.
TurboPT
Member of TestLink Community
Posts: 343
Joined: Sun Dec 10, 2006 4:51 am

Re: TestLink 1.8.5b + Bugzilla = Won't Connect

Post by TurboPT »

I was saving my elaboration until I knew if help was still needed [or not], since a couple of days had passed. [and two more days passed before your response]

What you have in the settings appears to be ok.
The bugzilla server CAN be remote, but the user specified in the config setting MUST be able to access that server 'remotely'.

On the bugzilla server, if you run this query: [I'm assuming here that the user to bugzilla is 'bugs', and that you have permissions to the mysql table]

Code: Select all

SELECT user, host FROM mysql.user WHERE user = 'bugs';
I'm betting that only one entry will appear, and it will show bugs and localhost, probably something like this:

Code: Select all

+------+-----------+
| user | host      |
+------+-----------+
| bugs | localhost |
+------+-----------+
1 row in set (0.01 sec)
If that happens to be the case, then another entry needs to be created [the user and host are a combined primary key], so that there is a bugs and 'qaloki.example.com' user/host combination.
[note that the new entry can have an entirely different password than the localhost entry, if desired]

Post again if needed.
fman
Member of TestLink Community
Posts: 3123
Joined: Tue Nov 15, 2005 7:19 am

Re: TL 1.8.5b + Bugzilla RUNNING ON 2 SERVERS = Won't Conne

Post by fman »

Thanks TurboTP, I've added your explanation into standard bugzilla config file distributed with TL
jkoebel
TestLink user
Posts: 3
Joined: Mon Aug 23, 2010 10:49 pm

Re: TL 1.8.5b + Bugzilla RUNNING ON 2 SERVERS = Won't Conne

Post by jkoebel »

Thank you TurboPT, that is exactly what I needed to know! Works good now.

Much appreciated.
poohpeer
TestLink user
Posts: 1
Joined: Tue May 17, 2011 8:35 am

Re: TL 1.8.5b + Bugzilla RUNNING ON 2 SERVERS = Won't Conne

Post by poohpeer »

Can you please give more detailed explanation about user/host combination?
Let's say my user name is bugs and remote host is 192.168.10.10, how should i set my username in order to be able to get access to the remote DB.

Thanks a lot
TurboPT
Member of TestLink Community
Posts: 343
Joined: Sun Dec 10, 2006 4:51 am

Re: TL 1.8.5b + Bugzilla RUNNING ON 2 SERVERS = Won't Conne

Post by TurboPT »

poohpeer wrote: Can you please give more detailed explanation about user/host combination?
Let's say my user name is bugs and remote host is 192.168.10.10, how should i set my username in order to be able to get access to the remote DB.
I'm confused by your remote references, but that is ok, this should help:

At the Bugzilla server, the 'bugs' user is typically only allowed access from localhost, so the user/host combination found there will [initially] only be bugs/localhost. [as shown above, in a previous post]

To allow other host[s] to access Bugzilla DB server 'remotely', another 'bugs' user entry needs to be created with an alternative [known] host.

For example, say that you have this configuration:
Server #1: TestLink+MySQL: 192.168.10.10
Server #2: Bugzilla+MySQL: 10.30.1.1

Server #2 will need to have a new bugs/192.168.10.10 user/host entry combination to allow connections from Server #1.
[note that this new entry can have an entirely different password than the original localhost entry, if desired]

Server #1 will still need 'bugs' as the user, and the BUG_TRACK_DB_HOST setting will be 10.30.1.1

HTH. Post again if needed.
fman
Member of TestLink Community
Posts: 3123
Joined: Tue Nov 15, 2005 7:19 am

Re: TL 1.8.5b + Bugzilla RUNNING ON 2 SERVERS = Won't Conne

Post by fman »

I appreciate very much work done by TurboPT, but completely disagree with having spend time to explain how mysql access system work. This a forum for testlink not for Mysql.
Post Reply