Hello!
I'd like thank you for what you are doing.
I installed CMake,
registered the agent
created build definition,
and queued a build
It seams the agent did not tried to get sources and gave the log on the web:
What is missing? Could you please give me a hint?
******************************************************************************
Starting: Build
******************************************************************************
API resource location 60aac929-f0cd-4bc8-9ce4-6b30e8f1b1bd is not registered on https://tfs.company.com/tfs/COLLECTION/.
******************************************************************************
Finishing: Build
******************************************************************************
On the VM log looks like that:
2016-05-06 17:02:17Z: Listening for Jobs
2016-05-06 17:02:39Z: Running job: Build
2016-05-06 17:02:46Z: Job Build completed with result: Failed
Worker_* log looks like that:
[2016-05-06 17:02:44Z INFO TaskManager] Ensuring task exists: ID '7d831c3c-3c68-459a-a5c9-bde6e659596c', version '1.0.9', name 'CMake', directory '/home/buildvm/agent/_work/_tasks/CMake_7d831c3c-3c68-459a-a5c9-bde6e659596c/1.0.9'.
[2016-05-06 17:02:44Z INFO TaskManager] Getting task.
[2016-05-06 17:02:44Z ERR JobRunner] Caught exception from TaskManager: Microsoft.VisualStudio.Services.WebApi.VssResourceNotFoundException: API resource location 60aac929-f0cd-4bc8-9ce4-6b30e8f1b1bd is not registered on https://tfs.company.com/tfs/COLLECTION/.
at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.
..
STACK TRACE
..
[2016-05-06 17:02:44Z INFO JobRunner] Shutting down the job server queue.
@rusergeev did you register your agent against an collection url instead of account url? make sure the server url you use for configuration does not have /defaultcollection at the end.
We should try and head this off. Even if we have to make an extra call during config to ensure it's at the right level.url.
@TingluoHuang Hi
I registered against server (maybe default collection)
dsergeev@buildvm:/home/builduser/agent$ cat .Agent
{
"AcceptTeeEula": true,
"AgentId": 252,
"AgentName": "agent_buildvm",
"PoolId": 6,
"PoolName": "PoolName",
"ServerUrl": "https://tfs.company.com/tfs",
"WorkFolder": "_work",
"RunAsService": false
}
Do you think I can try to register it against https://tfs.company.com/tfs/COLLECTION/ and it will work?
No. It looks like you're going against on-prem server? That's not supported yet in the preview. There's on going work to make that possible.
It there any agent from MS we can use on Linux with NTLM auth to OnPrem server?
This one will in a preview version soon ( not current preview). But it will only be against next version of TFS onprem since it needed server side changes as well.
The other side of the problem was git exe and we needed changes in git core to support bearer tokens
@bryanmacfarlane alright. We are waiting for the next preview then.
Also, we do not do git.. yet:) Everything is TFVS
Still does not work on Preview 5 v2.101.0
Here is goes: [https://github.com/Microsoft/vsts-agent/issues/208]
We are seeing the exact same error (API resource location 60aac929-f0cd-4bc8-9ce4-6b30e8f1b1bd is not registered on https://tfs.company.com/tfs/COLLECTION/) using the latest Preview 5 v2.101.0 version with our on-prem TFS instance.
Does it work with all versions of TFS 2015 or just 2015.2? We are still on 2015.1
We've been able to successfully get the agent configured and running on both Ubuntu and Redhat servers, and have tried running both interactively and as a service but still can't actually execute a build. One thing we have noticed is that if we remove all the steps from the build definition the build will run successfully (clone the git repo, post job cleanup, and exit). But as soon as we add any build steps back in (like an npm install or run shell script) it immediately fails with the referenced error.
Any ideas?
@calebcartwright remove COLLECTION part from the url. 'https://tfs.company.com/tfs'
@TingluoHuang That is the text of the error message from TFS, not anything I can change.
We registered the agent using the server URL without the collection, and were able to successfully register and execute jobs that do not have any build steps. When we try to execute real build definitions that have steps the job fails with the provided error message.
@calebcartwright I root cause the issue, it only happen to 2015 or 2015.1. i will talk with my manager and fix it.
@TingluoHuang Awesome! Thanks a ton
Hopefully you guys won't make Update 2 a requirement. It will be at least a few more months before we are able to get our TFS instance upgraded, and we cannot wait that long to have a Linux build agent (need to be able to build docker images, etc.). Update 2 as a requirement will force us to move to an alternative like Jenkins (even though we'd really prefer to keep builds in the same context as everything else in TFS)
We will sure try to support before that
@bryanmacfarlane much appreciated!
So what I souls tell to our ALM/TFS team? Upgrade to to QU1?
It may take a while. What if this does not work?
They are reading this thread.
once #207 merged in, it should work for 2015 RTM+
@TingluoHuang Awesome! Thank you very much for the prompt fix
merged. will be in next update
@bryanmacfarlane - We tried on Ubuntu and RedHat, but the latest release (v2.102.0 Release Candidate 1) did not fix this issue for TFS 2015.1
@calebcartwright - are we sure it's the same issue? can you include the info from the diag log? should be in the corresponding worker diag file. See troubleshooting section in docs
It appears to be exactly the same. Builds without any steps execute without any errors, but as soon as we add any tasks the build immediately fails with the exact same error as before (API resource location 60aac929-f0cd-4bc8-9ce4-6b30e8f1b1bd is not registered on ...)
From the worker diag file:
[‎06/‎14/‎2016 10:22 AM]
Ensuring task exists: ID '6c731c3c-3c68-459a-a5c9-bde6e6595b5b', version '1.0.9', name 'ShellScript', directory '/apps/tfs/_work/_tasks/ShellScript_6c731c3c-3c68-459a-a5c9-bde6e6595b5b/1.0.9'.
[2016-06-14 14:46:57Z INFO TaskManager] Getting task.
[2016-06-14 14:46:57Z ERR JobRunner] Caught exception from TaskManager: Microsoft.VisualStudio.Services.WebApi.VssResourceNotFoundException: API resource location 60aac929-f0cd-4bc8-9ce4-6b30e8f1b1bd is not registered on http://*_.com:8080/tfs/*_/.
at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.
I will take a look.
@calebcartwright I am not able to repro this issue with my windows agent against 2015 RTM tfs. Can you share the full worker log?
@TingluoHuang We are seeing these errors with the agent on Linux and TFS 2015 update 1.
@calebcartwright I get a repro, but not sure how to actually fix it. As a dirty workaround, try set system.taskDefinitionsUri=http://**.com:8080/tfs in your definition variable tab, see whether that help.
sure, will give that a try and let you know
@calebcartwright will have a fix later. :)
@TingluoHuang that's great news! I tried another build specifying the system.taskDefinitionsUri as you recommended. It almost worked, but getting a different error now. The job actually executes (gets sources, runs steps) but it fails with a new error when it tries to execute any of the steps. I tried several different build steps but get this same error with each of them. Error details:
....
Finishing: Get Sources
Starting: Shell Script hello.sh
module.js:341
throw err;
^
Error: Cannot find module 'vso-task-lib'
at Function.Module._resolveFilename (module.js:339:15)
at Function.Module._load (module.js:290:25)
at Module.require (module.js:367:17)
at require (internal/module.js:16:19)
at Object.
at Module._compile (module.js:413:34)
at Object.Module._extensions..js (module.js:422:10)
at Module.load (module.js:357:32)
at Function.Module._load (module.js:314:12)
at Function.Module.runMain (module.js:447:10)
It also has an error about an exit code of 1 returned from executing node shellscript2.js.
@calebcartwright This is because the node module 'vso-task-lib' is not longer delivered by the agent. We start packaging the vso-task-lib with the task since 2015 Update 2, since you are on Update 1, the only workaround i can think of would be create a node_modules folder under agent's _work folder, copy vso-task-lib from your node agent, put into the node_modules folder under _work folder.
@bryanmacfarlane should we update the document to indicate this problem with 2015 RTM and Update 1?
@TingluoHuang the full workaround (setting build variable system.taskDefinitionsUri AND vso-task-lib node module) is working for us, and we're finally able to build! Looking forward to the fix though as this is rather cumbersome to setup on every agent. Thanks again for all the help with this
@calebcartwright we have a plan to fix this. should be in the next version 102.1.
I would like to get @calebcartwright a private to validate. I could even re-release .0 and just drop a new tar.gz with this patched.
@bryanmacfarlane calebcartwright would like that too!
Will re-release .0 tonight or tomorrow
@bryanmacfarlane & @TingluoHuang Awesome! very much appreciated.
OMG! Cannot wait.
Checked v2.102.0 Release Candidate 1. It still cannot schedule a task.

Re-released the 2.102.0 binaries with the fixes. Please redownload
https://github.com/Microsoft/vsts-agent/releases/tag/v2.102.0
It works!
Tested with success on TFS 2015 Update 1.
Great. Thanks for pushing through the issues
Works for us too. Thanks again!
Most helpful comment
Re-released the 2.102.0 binaries with the fixes. Please redownload
https://github.com/Microsoft/vsts-agent/releases/tag/v2.102.0