Rally Software

  • 1.  Error connecting to CA Agile Central Database Connector for MS SQL

    Posted Dec 13, 2018 08:31 PM

    While connecting to CA Agile using the CA Agile Central Database Connector for MS SQL, I get the following error in the log file :

    The Current workspace "XYZ" does not contain a project with the name of "None"

     

    I changed the workspace as well as the Project but keep getting the same error.

    Any help here will be appreciated. Thank you!

     

     

    Log Trace:

    [2018-12-14 00:49:53 Z] DEBUG: EnvironmentalKey.identVector - Obtained conf_owner_id as: 1,688
    [2018-12-14 00:49:53 Z] DEBUG: EnvironmentalKey.identVector - Obtained config_name as: test.yml
    [2018-12-14 00:49:53 Z]  INFO: DBConnector - Agile Central DBConnector version 1.1.0
    [2018-12-14 00:49:53 Z]  INFO: DBConnector - Python platform: Windows 7
    [2018-12-14 00:49:53 Z]  INFO: DBConnector - Python  version: 3.7.0
    [2018-12-14 00:49:53 Z]  INFO: AgileCentralConnection - Initializing dbeif.AgileCentralConnection connection version 1.1.0
    [2018-12-14 00:49:53 Z]  INFO: AgileCentralConnection - Rally WSAPI Version v2.0
    [2018-12-14 00:49:53 Z]  INFO: MSSQLDBConnection - Initializing dbeif.DBConnection connection version 1.1.0
    [2018-12-14 00:49:53 Z]  INFO: DBConnector.establishConnections - Connected to ('Microsoft SQL Server 2014 (SP2-GDR) (KB4057120) - 12.0.5214.6 (X64) \n\tJan  9 2018 15:03:12 \n\tCopyright (c) Microsoft Corporation\n\tExpress Edition (64-bit) on Windows NT 6.1 <X64> (Build 7601: Service Pack 1)\n', ) on CS-PC8898:80  database name: CaAgileDB
    [2018-12-14 00:49:53 Z]  INFO: AgileCentralConnection.connect - Connecting to AgileCentral
    [2018-12-14 00:49:54 Z] FATAL: AgileCentralConnection.connect(128) - <ConfigurationError> Unable to connect to Agile Central at rally1.rallydev.com: The current Workspace 'XYZ' does not contain a Project with the name of 'None'
    [2018-12-14 00:49:54 Z]  INFO: DBConnectorRunner.run - run completed



  • 2.  Re: Error connecting to CA Agile Central Database Connector for MS SQL

    Broadcom Employee
    Posted Dec 14, 2018 05:28 PM

    Hi Vishal,

     

    I'm not able to reproduce the exact error you're getting, however I'm seeing that you're using an older build of the db connector.  Current version is 1.1.3 I believe (there's a 1.1.5 version on my computer but I'm not sure if that's released to the public).

     

    Also, I'm curious to see the output of 

    pip3 list

    or

    pip list (if the above doesn't work)

     

    I know we were using an outdated version of pyral on one of our connector pages for a while.

     

    Thanks,

    David



  • 3.  Re: Error connecting to CA Agile Central Database Connector for MS SQL

    Posted Dec 19, 2018 02:52 PM

    Hello David,

    Thank you for your response.

    I really don't know what that error means.

    Its trying to refer to an older workspace "XYZ" even after I change it to a different workspace in the config.yml .

    Wondering if the connector uses some kind of caching mechanism that I have to delete to make it point to the correct workspace.

     

    here is the output of your command:

    Package      Version
    ------------ -------
    asn1crypto   0.24.0
    cffi         1.11.5
    cryptography 2.3.1
    idna         2.7
    pip          10.0.1
    pycparser    2.18
    pyodbc       4.0.24
    pyral        1.4.1
    PyYAML       3.12
    requests     2.12.5
    setuptools   39.0.1
    six          1.11.0
    You are using pip version 10.0.1, however version 18.1 is available.
    You should consider upgrading via the 'python -m pip install --upgrade pip' command.



  • 4.  Re: Error connecting to CA Agile Central Database Connector for MS SQL
    Best Answer

    Broadcom Employee
    Posted Dec 19, 2018 06:06 PM

    That looks fine.  I can't think of a reason why there would be no effect on changing the workspace.

     

    I've seen strange behavior with the connector if there was a custom Portfolio Item type that was the same name as a project.  But I don't feel like this is the issue here.

     

    Are you using an API key or user/password combination?  The only thing I can think of in this situation is that the owner of the API key or the user account you're using is restricted to a single workspace that is called XYZ.

     

    If you log in as that user, can you see the project you're trying to access?



  • 5.  Re: Error connecting to CA Agile Central Database Connector for MS SQL

    Posted Dec 20, 2018 06:27 PM

    Hello David,

    You were right, the default project I was connecting to was moved in Rally and hence the issue.

    Thank you so much for your help.

     

    One follow on question:

    I use API key to connect to Rally, however after every run the API /UserName Password gets encrypted.

    Next time i try and run the same script it gives an error stating to type in the correct API key / UserName & Password.

     

    I don't want to reset the API Key/ User Name & Pwd  after every run in the config.yml?

    Is there a way to do that ?



  • 6.  Re: Error connecting to CA Agile Central Database Connector for MS SQL

    Broadcom Employee
    Posted Dec 20, 2018 06:42 PM

    Hi Vishal,

     

    Glad that worked for you.

     

    Regarding the encryption, it is very sensitive to any change in the environment.  We use a number of environmental attributes like IP address, config location, username, and more to form the key.  If any of those change, then the key is not valid to decrypt.

     

    I've seen one situation in Windows where there was a job created to run the connector on a schedule.  That job was using credentials that were in uppercase and it would create the key referencing an uppercase user name.  Then, when the customer tried to run it from the command line, they were logged in using lower case and they would get decryption problems.

     

    I suspect you're encountering something very similar.  The log file in debug mode should show all of the values that it has used for consideration when encrypting the username/passwords and should show the same when decrypting.  So any differences there should be observable, but again it could be something as basic as one single letter being uppercased when it should be lowercased.



  • 7.  Re: Error connecting to CA Agile Central Database Connector for MS SQL

    Posted Jan 04, 2019 07:12 PM

    Hi David,

    For some reason the connector is unable to run the same config file a second time and requests that the credentials be reset to clear text. Not sure what is going wrong. Any thoughts what this log entry means :

     

    Snippets from the log file:

     

    [2019-01-04 23:53:34 Z] DEBUG: EnvironmentalKey.identVector - Obtained mac address as:  00-1E-4F-C3-30-59
    [2019-01-04 23:53:34 Z] DEBUG: EnvironmentalKey.identVector - Obtained conn_user_id as: vchopdekar
    [2019-01-04 23:53:34 Z] DEBUG: EnvironmentalKey.identVector - Obtained app_base_dir as: c:\dbeif-1.1.0
    [2019-01-04 23:53:34 Z] DEBUG: EnvironmentalKey.identVector - Obtained config_dir as: configs

     

    [2019-01-04 23:53:34 Z] DEBUG: EnvironmentalKey.identVector - Obtained app_owner_id as: WLRACON-WP\vchopdekar.

     

    <ConfigurationError> EnvironmentalKey ident_vector not valid for decryption target value.  Reset all credential values to clear text in config file!



  • 8.  Re: Error connecting to CA Agile Central Database Connector for MS SQL

    Broadcom Employee
    Posted Jan 08, 2019 12:56 PM

    Hi Vishal,

     

    Yes this tells me that the decryption key is not the same as the encryption key.  Again, this can be due to things like a different user running the connector each time.  I would pay very close attention to those log entries when the file is being encrypted and then compare those values in the log when you encounter that error.  Where ever there is a difference, that will cause a decryption problem and you'll need to fix that.