It's all about the answers!

Ask a question

7.1.1.x CQ integration on UNIX/Linux - errors


Christopher Snyder (811111) | asked Jan 05 '11, 3:46 p.m.
We've installed Build Forge 7.1.1.4, ClearQuest 7.0.1 client, and MySql on a Linux VM server (Red Hat 5.4).

We also followed the ClearQuest / Build Forge Integration White Paper procedure in: http://www.ibm.com/support/docview.wss?rs=3330&context=SSG2E5&dc=DA400&uid=swg27015041&loc=en_US&cs=UTF-8&lang=en&rss=ct3330rational

We want to run a project and see a new BTRecord created in ClearQuest, but get the following error in an email alert when running a Build Forge project:
Error communicating with ClearQuest, invalid record id returned - got .

It looks like this issue (PM11590) was resolved in 7.1.1.4 according to http://www-01.ibm.com/support/docview.wss?uid=swg24026250, but not in our instance, since that is the version we have.

Any help would be appreciated ...

thanks,

12 answers



permanent link
Sean G Wilbur (87222421) | answered Jan 12 '11, 5:21 p.m.
JAZZ DEVELOPER
Chris,

* Is the CQ client working as expected?
* Can you run cqperl?
* Do you see any more information with BFCQDEBUG enabled?
* Alternatively as the BF console OS user, can you run /opt/rational/clearquest/bin/cqperl <BF>/integration/bfcqbuild.pl script you can just setup your shell with the same environment variables via export/set to emulate what is going on in BF?

So something like this, with the environment variables with default to a submit.
/opt/rational/clearquest/bin/cqperl /opt/buildforge/integration/bfcqbuild.pl

The most common issue I have seem is more of a generic one where there is s PERL5LIB var set that breaks cqperl so definitely give that a look, but give these suggestions a try and post your results.

-Sean

permanent link
Christopher Snyder (811111) | answered Jan 12 '11, 5:56 p.m.
Sean,
Thanks for the reply ...
Yes, our CQ client and cqperl works
We don't have PERL5LIB set.

I had tried a couple different fixes, our original error in this thread was with a Build Forge environment variable: CQ_INTERACTION=ON, something I seen elsewhere in devWorks, but not in the IBM whitepaper.

I removed that var and the BF project step will now pass, but the BF_RECORD is never set, nor is a CQ BTrecord created in ClearQuest.

Might there need to be an adaptor set up?

-Chris

permanent link
Sean G Wilbur (87222421) | answered Jan 12 '11, 11:25 p.m.
JAZZ DEVELOPER
Yeah unfortunately the change in behavior that requires the new CQ_INTERACTION piece came after the whitepaper but has made it into the latest documentation.
http://publib.boulder.ibm.com/infocenter/bldforge/v7r1m2/index.jsp?topic=/com.ibm.rational.buildforge.doc/topics/adaptor_clearquest_build_records.html

Once that is enabled, you *should* be atleast calling the bfcqbuild.pl script to generate the BTBuild records, but if you are still not seeing the BF_CQ_RECORD_ID variable get created there may still be a problem where the engine is not triggering the call.

As for any additional debugging, you might want to try the standalone call via the shell, I was able to test that by setting up the env and a few variables that BF normally would provide, this will atleast validate that the script will work when it is called, then it is just a matter of figuring out why BF is not calling it.

Here is a version I just tried on Windows to verify:
http://pastebin.com/YzXgByVt

-Sean

permanent link
Christopher Snyder (811111) | answered Jan 25 '11, 2:26 p.m.
Thanks Sean,
Following the instructions in the link, the project fails with:
1 01/25/11 01:07PM STEP Step using selector 'testserver'.
2 01/25/11 01:07PM EXEC Build cancelled via Management Console.


So I tried running `cqperl bfcqbuild.pl` from the command line, it's not liking my %ENV:

/opt/rational/clearquest/bin/cqperl ./bfcqbuild.pl
ERROR: The required environment parameter for operation was not set at ./bfcqbuild.pl line 267.

Could not connect to ClearQuest - Invalid Initialization Data

$ export CQ_DBNAME=ProdT
$ /opt/rational/clearquest/bin/cqperl ./bfcqbuild.pl
ERROR: The required environment parameter for operation was not set at ./bfcqbuild.pl line 267.

Could not connect to ClearQuest - Invalid Initialization Data

env | grep DBNAME
CQ_DBNAME=ProdT


thanks,
Chris

permanent link
Christopher Snyder (811111) | answered Jan 25 '11, 2:39 p.m.
Actually, I had some success, I was setting the vars as myself and running bfcqbuild.pl with sudo. When I run bfcqbuild.pl as myself I get passed that.

DEBUG: DBSET:BFSchema
DEBUG: Curstate Is:
DEBUG: Reqstate Now: Submit
LOG: Release Record Created:
TEST_BASE_BF_CQ_INT
Parentheses missing around "my" list at (eval 1) line 518.
Parentheses missing around "my" list at (eval 1) line 519.
Useless use of a variable in void context at (eval 1) line 518.
Useless use of a variable in void context at (eval 1) line 518.
Useless use of a variable in void context at (eval 1) line 518.
Useless use of a variable in void context at (eval 1) line 518.
Useless use of a variable in void context at (eval 1) line 519.
Useless use of a variable in void context at (eval 1) line 519.
Useless use of a variable in void context at (eval 1) line 519.
Useless use of a variable in void context at (eval 1) line 519.
"my" variable $my_id masks earlier declaration in same scope at (eval 1) line 1205.
"my" variable $my_id masks earlier declaration in same scope at (eval 1) line 1395.
Possible unintended interpolation of @owner in string at (eval 1) line 1528.
ERROR: Failed condition: GetState() == AD_VALIDATED
Location: ClearQuest Core:adeditaction.cpp:742
GetState()=PREPARED at /apps/rational/clearquest/linux_x86/shlib/CQPerlExt.pm line 52.

Could not submit build record to ClearQuest

permanent link
Sean G Wilbur (87222421) | answered Jan 25 '11, 7:40 p.m.
JAZZ DEVELOPER
Chris,

Can you submit them directly in your CQ client on Linux ? Try with the same value you set in the environment vars to ensure they are valid lengths.
Also jic did you change the records or code that the packages added ?

-Sean

permanent link
Christopher Snyder (811111) | answered Jan 26 '11, 10:24 a.m.
Yes, I am able to log into CQ and submit a BTBuild record :)
and no, we did not modify any CQ or BF code/packages :(

thanks,
Chris

permanent link
Sean G Wilbur (87222421) | answered Jan 27 '11, 9:34 a.m.
JAZZ DEVELOPER
Chris,

Well those were the low hanging fruit, what I would suggest next is to setup CQ tracing to at least see what is being set in CQ and why we are failing with an validation error, you can set these environment variables on the cli before running the script and post your output.


$ export CQ_DIAG_TRACE="API;HOOKS=2;PERL;THROW"
$ export CQ_DIAG_REPORT="MESSAGE_INFO=0xffff;DIAG_FLAGS=-1"
$ export CQ_DIAG_OUTPUT=~/cq_trace.log
$ cqperl bfcqbuild.pl


Or modify the bfcqbuild.pl script to add output statements, namely around Commit to first perform a Validate and view the output with print statements.

-Sean

permanent link
Christopher Snyder (811111) | answered Mar 03 '11, 10:56 a.m.
The problem was found to be that the bfcqbuild.pl has a 'cqperl interpreter' of "#!/usr/bin/cqperl".

I resovled it by softlinking /usr/bin/cqperl to /opt/rational/clearquest/bin/cqperl.

I'm thinking the default install location for cqperl is usually in /opt/rational/clearquest/bin, so Build Forge should expect it there.

Perhaps during Build Forge installation, the install should ask "If integrating with ClearQuest, where is cqperl located?"; like it does for the other dependencies like database files.

thanks,

permanent link
Sean G Wilbur (87222421) | answered Mar 06 '11, 10:15 p.m.
JAZZ DEVELOPER
You should file a defect for that if you have not already, in the least to document the issue.

-Sean

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.