Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-31191

Jenkins Multiple SCM TFS Unkown Host

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major Major
    • Jenkins 1.634 on Linux
      Jenkins Slave 1.634 on Windows
      Multiple SCM Plugin 0.5
      TFS Plugin 4.0
      TFS 2015

      We have a Jenkins Master set up on linux in a data center and a slave on windows in our company network. There can be no connection from the data center to our network but in the other direction.
      We have a project on a TFS that is in our company network so we set up a jenkins slave on windows in the company network.
      The build works with ant and tf.exe on the windows slave, however we recently updated the TFS to 2015 and thought we might give TFS plugin another try (we already tried it, but the old TFS version was not supported).
      However there are two projects to build so I used the Multiple SCM Plugin to retrieve multiple paths from TFS.
      The first project was downloaded successfully, after finishing the second the build will fail with following error (note I replaced the name of the host with <tfshost>):

      FATAL: Unknown host <tfshost>
      com.microsoft.tfs.core.exceptions.TECoreException: Unknown host <tfshost>
      at com.microsoft.tfs.core.exceptions.mappers.TECoreExceptionMapper.map(TECoreExceptionMapper.java:87)
      at com.microsoft.tfs.core.exceptions.mappers.RegistrationExceptionMapper.map(RegistrationExceptionMapper.java:23)
      at com.microsoft.tfs.core.clients.registration.RegistrationData.newFromServer(RegistrationData.java:70)
      at com.microsoft.tfs.core.clients.registration.RegistrationClient.getRegistrationData(RegistrationClient.java:645)
      at com.microsoft.tfs.core.clients.registration.RegistrationClient.getRegistrationEntry(RegistrationClient.java:188)
      at com.microsoft.tfs.core.clients.registration.RegistrationClient.getRegistrationEntry(RegistrationClient.java:167)
      at com.microsoft.tfs.core.clients.webservices.IdentityManagementService.<init>(IdentityManagementService.java:65)
      at hudson.plugins.tfs.model.Project.getVCCHistory(Project.java:86)
      at hudson.plugins.tfs.model.Project.getDetailedHistory(Project.java:130)
      at hudson.plugins.tfs.actions.CheckoutAction.checkout(CheckoutAction.java:38)
      at hudson.plugins.tfs.TeamFoundationServerScm.checkout(TeamFoundationServerScm.java:214)
      at hudson.scm.SCM.checkout(SCM.java:473)
      at org.jenkinsci.plugins.multiplescms.MultiSCM.checkout(MultiSCM.java:129)
      at hudson.scm.SCM.checkout(SCM.java:485)
      at hudson.model.AbstractProject.checkout(AbstractProject.java:1277)
      at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:610)
      at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
      at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:532)
      at hudson.model.Run.execute(Run.java:1741)
      at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      at hudson.model.ResourceController.execute(ResourceController.java:98)
      at hudson.model.Executor.run(Executor.java:410)
      Caused by: java.net.UnknownHostException: lei-srv-tfs-2
      at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:184)
      at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
      at java.net.Socket.connect(Socket.java:589)
      at com.microsoft.tfs.core.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(DefaultProtocolSocketFactory.java:147)
      at com.microsoft.tfs.core.httpclient.HttpConnection.open(HttpConnection.java:862)
      at com.microsoft.tfs.core.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.open(MultiThreadedHttpConnectionManager.java:1690)
      at com.microsoft.tfs.core.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:495)
      at com.microsoft.tfs.core.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:197)
      at com.microsoft.tfs.core.httpclient.HttpClient.executeMethod(HttpClient.java:464)
      at com.microsoft.tfs.core.httpclient.HttpClient.executeMethod(HttpClient.java:376)
      at com.microsoft.tfs.core.ws.runtime.client.SOAPService.executeSOAPRequestInternal(SOAPService.java:588)
      at com.microsoft.tfs.core.ws.runtime.client.SOAPService.executeSOAPRequest(SOAPService.java:473)
      at ms.tfs.services.registration._03._RegistrationSoap12Service.getRegistrationEntries(_RegistrationSoap12Service.java:105)
      at com.microsoft.tfs.core.clients.registration.RegistrationData.newFromServer(RegistrationData.java:65)
      ... 19 more

      Downgrading to TFS plugin 3.2 does not change anything so it seems to not be a problem on the Java TFS SDK.
      After further investigating I found out, that it was searching the TFS on the linux master machine instead of the windows slave and this obviously failes, due to the network limitation. I don't know, wether it's the TFS plugin (which I guess) or the Multiple SCM plugin that tries to connect directly on the master instead of using the JNLP connection, however this should not be the case. The build runs only on this slave, retrieving the source code is done at this slave, so why should it try to connect to the TFS from the master?

      We tried to retrieve several different projects/folders as well es the Use Update option on TFS plugin. The only difference is, it would not download any source because it is all up to date but fail immediately aftet that.
      The last thing before the error is "Finished getting version 'C19095'" where for the other project it would then delete the workspace.

            jimpanse Stefan Issmer
            jimpanse Stefan Issmer
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: