com.microsoft.tfs.core.exceptions.TECoreException: Unknown host <tfshost>

Jenkins JIRA | Stefan Issmer | 1 year ago
  1. 0

    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.

    Jenkins JIRA | 1 year ago | Stefan Issmer
    com.microsoft.tfs.core.exceptions.TECoreException: Unknown host <tfshost>
  2. 0

    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.

    Jenkins JIRA | 1 year ago | Stefan Issmer
    com.microsoft.tfs.core.exceptions.TECoreException: Unknown host <tfshost>
  3. 0

    Android not building on OSX

    GitHub | 2 years ago | ljbade
    java.lang.RuntimeException: java.net.UnknownHostException: services.gradle.org
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Network hickup causes exception

    GitHub | 2 years ago | giray
    cloudsync.exceptions.CloudsyncException: Unexpected error during remote search of folder 'Backup/Docs backup 20021107/unix/1.0userlevel-linux'
  6. 0

    Spring Integration with JMS + ActiveMQ: Messages remain in JDBC Message Store after reconnect

    Stack Overflow | 2 years ago
    org.springframework.messaging.MessageHandlingException: error occurred in message handler [org.springframework.integration.jms.JmsSendingMessageHandler#0]; nested exception is org.springframework.jms.UncategorizedJmsException: Uncategorized exception occured during JMS processing; nested exception is javax.jms.JMSException: Could not connect to broker URL: tcp://my.url.net:61616. Reason: java.net.UnknownHostException: my.url.net

  1. eti22 2 times, last 2 months ago
  2. eti22 8 times, last 2 months ago
  3. serious2monkeys 2 times, last 2 months ago
  4. Andreas Häber 16 times, last 2 months ago
  5. davidvanlaatum 2 times, last 3 months ago
6 more registered users
40 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.net.UnknownHostException

    lei-srv-tfs-2

    at java.net.AbstractPlainSocketImpl.connect()
  2. Java RT
    Socket.connect
    1. java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:184)
    2. java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
    3. java.net.Socket.connect(Socket.java:589)
    3 frames
  3. com.microsoft.tfs
    SOAPService.executeSOAPRequest
    1. com.microsoft.tfs.core.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(DefaultProtocolSocketFactory.java:147)
    2. com.microsoft.tfs.core.httpclient.HttpConnection.open(HttpConnection.java:862)
    3. com.microsoft.tfs.core.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.open(MultiThreadedHttpConnectionManager.java:1690)
    4. com.microsoft.tfs.core.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:495)
    5. com.microsoft.tfs.core.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:197)
    6. com.microsoft.tfs.core.httpclient.HttpClient.executeMethod(HttpClient.java:464)
    7. com.microsoft.tfs.core.httpclient.HttpClient.executeMethod(HttpClient.java:376)
    8. com.microsoft.tfs.core.ws.runtime.client.SOAPService.executeSOAPRequestInternal(SOAPService.java:588)
    9. com.microsoft.tfs.core.ws.runtime.client.SOAPService.executeSOAPRequest(SOAPService.java:473)
    9 frames
  4. ms.tfs.services
    _RegistrationSoap12Service.getRegistrationEntries
    1. ms.tfs.services.registration._03._RegistrationSoap12Service.getRegistrationEntries(_RegistrationSoap12Service.java:105)
    1 frame
  5. com.microsoft.tfs
    IdentityManagementService.<init>
    1. com.microsoft.tfs.core.clients.registration.RegistrationData.newFromServer(RegistrationData.java:65)
    2. com.microsoft.tfs.core.clients.registration.RegistrationClient.getRegistrationData(RegistrationClient.java:645)
    3. com.microsoft.tfs.core.clients.registration.RegistrationClient.getRegistrationEntry(RegistrationClient.java:188)
    4. com.microsoft.tfs.core.clients.registration.RegistrationClient.getRegistrationEntry(RegistrationClient.java:167)
    5. com.microsoft.tfs.core.clients.webservices.IdentityManagementService.<init>(IdentityManagementService.java:65)
    5 frames
  6. hudson.plugins.tfs
    TeamFoundationServerScm.checkout
    1. hudson.plugins.tfs.model.Project.getVCCHistory(Project.java:86)
    2. hudson.plugins.tfs.model.Project.getDetailedHistory(Project.java:130)
    3. hudson.plugins.tfs.actions.CheckoutAction.checkout(CheckoutAction.java:38)
    4. hudson.plugins.tfs.TeamFoundationServerScm.checkout(TeamFoundationServerScm.java:214)
    4 frames
  7. Hudson
    SCM.checkout
    1. hudson.scm.SCM.checkout(SCM.java:473)
    1 frame
  8. org.jenkinsci.plugins
    MultiSCM.checkout
    1. org.jenkinsci.plugins.multiplescms.MultiSCM.checkout(MultiSCM.java:129)
    1 frame
  9. Hudson
    AbstractBuild$AbstractBuildExecution.defaultCheckout
    1. hudson.scm.SCM.checkout(SCM.java:485)
    2. hudson.model.AbstractProject.checkout(AbstractProject.java:1277)
    3. hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:610)
    3 frames
  10. jenkins.scm
    SCMCheckoutStrategy.checkout
    1. jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
    1 frame
  11. Hudson
    Executor.run
    1. hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:532)
    2. hudson.model.Run.execute(Run.java:1741)
    3. hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
    4. hudson.model.ResourceController.execute(ResourceController.java:98)
    5. hudson.model.Executor.run(Executor.java:410)
    5 frames