Welcome to Telelogic Product Support
  Home Downloads Knowledgebase Case Tracking Licensing Help Telelogic Passport
Telelogic SYNERGY (steve huntington)
Decrease font size
Increase font size
Topic Title: API - error mesasge "login failed"
Topic Summary:
Created On: 22-Jan-2006 07:42
Status: Read Only
Linear : Threading : Single : Branch
Search Topic Search Topic
Topic Tools Topic Tools
Subscribe to this topic Subscribe to this topic
E-mail this topic to someone. E-mail this topic
Bookmark this topic Bookmark this topic
View similar topics View similar topics
View topic in raw text format. Print this topic.
Answer This question was answered by Brian Barde, on Monday, January 23, 2006 1:59 PM

Answer:

I was getting a very similar error. I found it was the database path in the following statement:

------------------------------------------------------------------------------------
#Login to the ChangeSynegy server. (user, password, role, database);
my $aUser = $csapi->Login("ronenb", "password", "User", "\\\\cmtest\\ccmdb\\comsys");
------------------------------------------------------------------------------------

What I did was login to Synergy as admin and copied the exact path of the database and pasted that into my Perl script without the double backslashes (I used this format ==> "/path/to/the/database") (we are using a unix server). To get the exact path goto Administration --> Server Configuration --> then select the database you want to connect to in the Databases list box. The Database Configuration shows up  on the right and at the top is the path to the database. That seemed to work for me. Not sure if you are getting the same problem.

On a side note if you do not want to hardcode your username and password into the perl script, I ask for it when the script is run (I attached a snippet):

One thing to remember this code will set the echo to on even if it was off!

Hope this helps! And I hope we see many more Perl API questions on this forum because I am certainly going to need some help in the furture.

Thanks,
Brian

 22-Jan-2006 07:42
User is offline View Users Profile Print this message


Ronen Ben-Chamo

Posts: 84
Joined: 1-Dec-2005

Hi, I would like to run perl script
I set the vairable PATH & PERL5LIB
I updated the example from the api doc to match my parameters and I'm getting error message
"The fault code: 2
The fault string: Login failed"


#Include the ChangeSynergy csapi module.
use ChangeSynergy::csapi;

#Create a new instance of the csapi object.
my $csapi = new ChangeSynergy::csapi();

#Create the queryString variable. Query for all problems that are assigned to ronenb
my $queryString = "(cvtype='problem') and ((resolver = 'ronenb') and (crstatus='assigned'))";

#Eval block is used for error handling.
eval
{
#Setup the connection parameters for connecting to the ChangeSynergy Server.
#Note however that no connection to the server is made at this point.
$csapi->setUpConnection("http", "cmtest", 8600 );
printf "=======\n";
#Login to the ChangeSynegy server. (user, password, role, database);
my $aUser = $csapi->Login("ronenb", "password", "User", "\\\\cmtest\\ccmdb\\comsys");

#Run the ImmediateQueryHtml method to recieve an HTML page.
#Pass in the user object, report name, query string, query name and the title for the report.
my $results = $csapi->ImmediateQueryHtml($aUser, "Basic Summary", $queryString, undef, "Report of my assigned CR's");

#Open a file called report.html for output.
open (OUTPUT, ">report.html");

#Write the contents of the returned result to the report.html file.
print(OUTPUT $results->getResponseData());

#Close the output stream.
close(OUTPUT);
};

#If any errors occured, print them to the screen.
if ($@)
{
print $@;
}

I could'nt find the problem
Any idea?

Thanks,
Ronen


-------------------------
Ronen Ben-Chamo
Configuration Managment
Report this to a Moderator Report this to a Moderator
 22-Jan-2006 18:20
User is offline View Users Profile Print this message


Brian Barde

Posts: 39
Joined: 24-Sep-2004

Answer Answer

I was getting a very similar error. I found it was the database path in the following statement:

------------------------------------------------------------------------------------
#Login to the ChangeSynegy server. (user, password, role, database);
my $aUser = $csapi->Login("ronenb", "password", "User", "\\\\cmtest\\ccmdb\\comsys");
------------------------------------------------------------------------------------

What I did was login to Synergy as admin and copied the exact path of the database and pasted that into my Perl script without the double backslashes (I used this format ==> "/path/to/the/database") (we are using a unix server). To get the exact path goto Administration --> Server Configuration --> then select the database you want to connect to in the Databases list box. The Database Configuration shows up  on the right and at the top is the path to the database. That seemed to work for me. Not sure if you are getting the same problem.

On a side note if you do not want to hardcode your username and password into the perl script, I ask for it when the script is run (I attached a snippet):

One thing to remember this code will set the echo to on even if it was off!

Hope this helps! And I hope we see many more Perl API questions on this forum because I am certainly going to need some help in the furture.

Thanks,
Brian



-------------------------
Thanks,
Brian

Edited: 23-Jan-2006 at 11:03 by Brian Barde
Report this to a Moderator Report this to a Moderator
 23-Jan-2006 13:57
User is offline View Users Profile Print this message


Ronen Ben-Chamo

Posts: 84
Joined: 1-Dec-2005

You right!!!!!!!!!!!!!!!!!
I so happy, I working on this case several days and you solved my problem
Thank you very much
The server path is \\\\Cmtest\CCMDB\comsys
I should add '\' before ech folder "\\\\Cmtest\\CCMDB\\comsys"

Ronen

-------------------------
Ronen Ben-Chamo
Configuration Managment
Report this to a Moderator Report this to a Moderator
 23-Jan-2006 14:03
User is offline View Users Profile Print this message


Brian Barde

Posts: 39
Joined: 24-Sep-2004

I am glad I could help.

-------------------------
Thanks,
Brian
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic SYNERGY forum.
There are currently 0 users logged in.
The most users ever online was 15 on 15-Jan-2009 at 15:34.
There are currently 0 guests browsing this forum, which makes a total of 0 users using this forum.
You have posted 0 messages to this forum. 0 overall.

FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.