CA Agile Central connector for Jira failed to issue GET request for endpoint: //rest/api/2/user

Document ID : KB000057571
Last Modified Date : 14/02/2018
Show Technical Document Details

Issue

When running the CA Agile Central connector for Jira an error message states that it could not connect to Jira since the host is unknown as seen below:
?
[2014-03-13 19:40:40 Z] DEBUG : RallyJest::JiraProxy.initialize - JiraProxy config arg content: {:url=>"http://orca-ubujira2:8080/", :user=>"supp_hugo", :password=>"*****", :project=>"SUHU", :logger=>RallyEIF::WRK::RallyLogger, :proxy_password=>"*****"}
[2014-03-13 19:40:40 Z] DEBUG : RallyJest::JiraComm.block in execute_request - issuing a GET request for endpoint: //rest/api/2/user?username=supp_hugo
[2014-03-13 19:40:47 Z] ERROR : RallyEIF::WRK::JiraRestConnection.rescue in connect - Could not log in to JIRA
[2014-03-13 19:40:47 Z] ERROR : RallyEIF::WRK::JiraRestConnection.initialize - getaddrinfo: No such host is known.?

Cause

CA Agile Central connector for Jira will fail to issue a GET request to Jira's API service if the string in the <Url> tag for the <JiraRestConnection> contains an extra slash at the end of the string.
?
?<JiraRestConnection>
? ? <Url>http://orca-ubujira2:8080/</Url>
? ? ?...
?</JiraRestConnection>

Below is an example of the log output if the slash character is added to the <Url> string:

************************************************************************************************************
?
? ? ?rally2_jira-rest_connector
? ? ? ? ?pid: 2332
? ? ? ? ?starting at: 2014-03-13 19:40:40 Z
? ? ? ? ?cwd: C:/Program Files (x86)/RallyConnectorforJiraInstall-4.3.2-master-94
? ? ? ? ?configs: jira_test.xml
? ? ? ? ?interval: -1
? ? ? ? ?connector-version: Connector Hub version: 0.2.2-94-master/master-471a5ed915022cf37e8400fb99856649673fb9ef
? ? ? ? ?rally-version: CA Agile Central Spoke version 4.0.2 using rally_api gem version 0.9.25
? ? ? ? ?other-spoke: JiraRestConnection version: 4.3.2-94-master-e6833e999aeb067d6f12d54d0797153a172ca2bc using rally_jest gem version 1.2.4
?
************************************************************************************************************
?
[2014-03-13 19:40:40 Z] ? ANY : RallyEIF::WRK::ConnectorRunner.block in run - processing to commence using content from jira_test.xml
[2014-03-13 19:40:40 Z] ? ANY : Class.read_config_file - jira_test.xml last modified 2014-03-13 19:37:49 UTC, size: 4777 chars
[2014-03-13 19:40:40 Z] ? ANY : RallyEIF::WRK::RallyConnection.initialize - Initializing CA Agile Central connection version 4.0.2
[2014-03-13 19:40:40 Z] ?INFO : RallyEIF::WRK::RallyConnection.initialize - CA Agile Central Web Services version 1.42
[2014-03-13 19:40:40 Z] ? ANY : RallyEIF::WRK::JiraRestConnection.initialize - Initializing JIRA connection version 4.3.2
[2014-03-13 19:40:40 Z] ?INFO : Class.read_workflow_file - jira_workflow.xml
[2014-03-13 19:40:40 Z] ?INFO : RallyEIF::WRK::Connector.initialize - Ruby platform i386-mingw32
[2014-03-13 19:40:40 Z] ?INFO : RallyEIF::WRK::Connector.initialize - Ruby version 2.0.0
[2014-03-13 19:40:40 Z] ?INFO : RallyEIF::WRK::JiraRestConnection.connect - Connecting to JIRA at http://orca-ubujira2:8080/
[2014-03-13 19:40:40 Z] DEBUG : RallyJest::JiraProxy.initialize - JiraProxy config arg content: {:url=>"http://orca-ubujira2:8080/", :user=>"supp_hugo", :password=>"*****", :project=>"SUHU", :logger=>RallyEIF::WRK::RallyLogger, :proxy_password=>"*****"}
[2014-03-13 19:40:40 Z] DEBUG : RallyJest::JiraComm.block in execute_request - issuing a GET request for endpoint: //rest/api/2/user?username=supp_hugo
[2014-03-13 19:40:47 Z] ERROR : RallyEIF::WRK::JiraRestConnection.rescue in connect - Could not log in to JIRA
[2014-03-13 19:40:47 Z] ERROR : RallyEIF::WRK::JiraRestConnection.initialize - getaddrinfo: No such host is known.?
[2014-03-13 19:40:47 Z] ?INFO : RallyEIF::WRK::JiraRestConnection.disconnect - Disconnected from JIRA
[2014-03-13 19:40:47 Z] ? ANY : RallyEIF::WRK::ConnectorRunner.log_service_statistics - jira_test.xml: service run took 7 seconds
?

Resolution

To solve this problem, just remove the extra slash at the end of the <Url> string as seen below:
?
?<JiraRestConnection>
? ? <Url>http://orca-ubujira2:8080</Url>
? ? ?...
?</JiraRestConnection>

Below is an example of the log output if the slash character is removed:

************************************************************************************************************
?
? ? ?rally2_jira-rest_connector
? ? ? ? ?pid: 2352
? ? ? ? ?starting at: 2014-03-13 20:07:22 Z
? ? ? ? ?cwd: C:/Program Files (x86)/RallyConnectorforJiraInstall-4.3.2-master-94
? ? ? ? ?configs: jira_test.xml
? ? ? ? ?interval: -1
? ? ? ? ?connector-version: Connector Hub version: 0.2.2-94-master/master-471a5ed915022cf37e8400fb99856649673fb9ef
? ? ? ? ?rally-version: CA Agile Central Spoke version 4.0.2 using rally_api gem version 0.9.25
? ? ? ? ?other-spoke: JiraRestConnection version: 4.3.2-94-master-e6833e999aeb067d6f12d54d0797153a172ca2bc using rally_jest gem version 1.2.4
?
************************************************************************************************************
?
[2014-03-13 20:07:22 Z] ? ANY : RallyEIF::WRK::ConnectorRunner.block in run - processing to commence using content from jira_test.xml
[2014-03-13 20:07:22 Z] ? ANY : Class.read_config_file - jira_test.xml last modified 2014-03-13 20:06:51 UTC, size: 4776 chars
[2014-03-13 20:07:22 Z] ? ANY : RallyEIF::WRK::RallyConnection.initialize - Initializing CA Agile Central connection version 4.0.2
[2014-03-13 20:07:23 Z] ?INFO : RallyEIF::WRK::RallyConnection.initialize - CA Agile Central Web Services version 1.42
[2014-03-13 20:07:23 Z] ? ANY : RallyEIF::WRK::JiraRestConnection.initialize - Initializing JIRA connection version 4.3.2
[2014-03-13 20:07:23 Z] ?INFO : Class.read_workflow_file - jira_workflow.xml
[2014-03-13 20:07:23 Z] ?INFO : RallyEIF::WRK::Connector.initialize - Ruby platform i386-mingw32
[2014-03-13 20:07:23 Z] ?INFO : RallyEIF::WRK::Connector.initialize - Ruby version 2.0.0
[2014-03-13 20:07:23 Z] ?INFO : RallyEIF::WRK::JiraRestConnection.connect - Connecting to JIRA at http://orca-ubujira2:8080
[2014-03-13 20:07:23 Z] DEBUG : RallyJest::JiraProxy.initialize - JiraProxy config arg content: {:url=>"http://orca-ubujira2:8080", :user=>"supp_hugo", :password=>"*****", :project=>"SUHU", :logger=>RallyEIF::WRK::RallyLogger, :proxy_password=>"*****"}
[2014-03-13 20:07:23 Z] DEBUG : RallyJest::JiraComm.block in execute_request - issuing a GET request for endpoint: /rest/api/2/user?username=supp_hugo
[2014-03-13 20:07:23 Z] DEBUG : RallyJest::JiraComm.execute_request - {