Unable to link TeamCity to JIRA issue tracking system

Hi,

I just installed TeamCity on a Windows 2008 Enterprise server, and I'm having trouble trying to setup the issue tracker integration with our JIRA server. The TeamCity server is running under my domain user account.

What I've done so far is gone to the Administration tab and clicked on Issue Tracker under Integrations on the left hand menu. I've added all the details for the server, as follows:

Display Name: JIRA
Server URL: https://www.xyz.net/jira
Username: <blank>
Password: <blank>
Project Keys: 156752

When I click on 'Test connection' and type in Issue id 156752-2142, the following error is displayed:

     Error: sun.security.validator.ValidatorException: PKIX path  building failed: sun.security.provider.certpath.SunCertPathBuilderException:  unable to find valid certification path to requested target

After a bit of research, I found a tool to import the SSL certificate into TeamCity, so I overwrote the TeamCity\jre\lib\security\cacerts file with the one generated from the tool (see http://therightstuff.de/CommentView,guid,2e19b03d-6ee1-49c1-b8c9-da5f3db7826f.aspx for more info).

I then restarted the TeamCity server service and tried testing the connection again.

This time, I got the following error:

     Error: server URL is incorrect or cannot be resolved

I can navigate to https://www.xyz.net/jira/si/jira.issueviews:issue-xml/156752-2142/156752-2142.xml using a web browser on the server just fine, and I can see the XML with the issue details embedded.

I went to the Diagnostics page and changed the 'Active logging preset' to debug-all, then repeated the test above.

Here's the log output from teamcity-server.log:

[2013-02-27 12:44:28,160]  DEBUG - ueTracker.AbstractIssueFetcher - Performing HTTP request: "https://www.xyz.net/jira/si/jira.issueviews:issue-xml/156752-2142/156752-2142.xml"
[2013-02-27 12:44:28,183]  DEBUG - ueTracker.AbstractIssueFetcher - HTTP response: 200, length: -1
[2013-02-27 12:44:28,187]  DEBUG - eTracker.AbstractIssueProvider - Error during issue-tracker connection test
java.net.UnknownHostException: www.w3.org
 at java.net.PlainSocketImpl.connect(Unknown Source)
 at java.net.SocksSocketImpl.connect(Unknown Source)
 at java.net.Socket.connect(Unknown Source)
 at java.net.Socket.connect(Unknown Source)
 at sun.net.NetworkClient.doConnect(Unknown Source)
 at sun.net.www.http.HttpClient.openServer(Unknown Source)
 at sun.net.www.http.HttpClient.openServer(Unknown Source)
 at sun.net.www.http.HttpClient.<init>(Unknown Source)
 at sun.net.www.http.HttpClient.New(Unknown Source)
 at sun.net.www.http.HttpClient.New(Unknown Source)
 at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown Source)
 at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
 at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
 at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
 at org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown Source)
 at org.apache.xerces.impl.XMLEntityManager.startEntity(Unknown Source)
 at org.apache.xerces.impl.XMLEntityManager.startDTDEntity(Unknown Source)
 at org.apache.xerces.impl.XMLDTDScannerImpl.setInputSource(Unknown Source)
 at org.apache.xerces.impl.XMLDocumentScannerImpl$DTDDispatcher.dispatch(Unknown Source)
 at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
 at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
 at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
 at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
 at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
 at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
 at org.jdom.input.SAXBuilder.build(SAXBuilder.java:489)
 at org.jdom.input.SAXBuilder.build(SAXBuilder.java:807)
 at jetbrains.buildServer.util.FileUtil.parseDocument(FileUtil.java:207)
 at jetbrains.buildServer.issueTracker.jira.JiraIssueFetcher.doGetIssuesFromRss(JiraIssueFetcher.java:161)
 at jetbrains.buildServer.issueTracker.jira.JiraIssueFetcher.getIssuesFromRss(JiraIssueFetcher.java:150)
 at jetbrains.buildServer.issueTracker.jira.JiraIssueFetcher.fetchOneIssueViaRss(JiraIssueFetcher.java:117)
 at jetbrains.buildServer.issueTracker.jira.JiraIssueFetcher.access$000(JiraIssueFetcher.java:36)
 at jetbrains.buildServer.issueTracker.jira.JiraIssueFetcher$1.fetch(JiraIssueFetcher.java:90)
 at jetbrains.buildServer.issueTracker.AbstractIssueFetcher.getFromCacheOrFetch(AbstractIssueFetcher.java:226)
 at jetbrains.buildServer.issueTracker.jira.JiraIssueFetcher.getIssue(JiraIssueFetcher.java:87)
 at jetbrains.buildServer.issueTracker.AbstractIssueProvider$3.testConnection(AbstractIssueProvider.java:317)
 at jetbrains.buildServer.controllers.admin.issues.TestConnectionController.doPost(TestConnectionController.java:23)
 at jetbrains.buildServer.controllers.BaseFormXmlController$1.handleRequest(BaseFormXmlController.java:54)
 at jetbrains.buildServer.controllers.AjaxRequestProcessor.processRequest(AjaxRequestProcessor.java:45)
 at jetbrains.buildServer.controllers.BaseFormXmlController.doHandle(BaseFormXmlController.java:52)
 at jetbrains.buildServer.controllers.BaseController.handleRequestInternal(BaseController.java:73)
 at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
 at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
 at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:790)
 at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719)
 at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644)
 at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:560)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
 at jetbrains.buildServer.maintenance.TeamCityDispatcherServlet.service(TeamCityDispatcherServlet.java:31)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
 at jetbrains.buildServer.web.ParametersProviderCalculationContextFilter.doFilter(ParametersProviderCalculationContextFilter.java:7)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
 at jetbrains.buildServer.web.DisableSessionIdFromUrlFilter.doFilter(DisableSessionIdFromUrlFilter.java:0)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
 at jetbrains.buildServer.web.DiagnosticFilter.doFilter(DiagnosticFilter.java:56)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
 at jetbrains.buildServer.web.ResponseFragmentFilter.doFilter(ResponseFragmentFilter.java:19)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
 at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)
 at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
 at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
 at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
 at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
 at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
 at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:987)
 at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:539)
 at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:300)
 at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
 at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
 at java.lang.Thread.run(Unknown Source)



I can copy the URL from the following line in the log:

     [2013-02-27 12:44:28,160]  DEBUG - ueTracker.AbstractIssueFetcher - Performing HTTP request: "https://www.xyz.net/jira/si/jira.issueviews:issue-xml/156752-2142/156752-2142.xml"

paste it into a web browser, and it will work perfectly fine.

Any ideas on what's going wrong here?

Please sign in to leave a comment.