Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unconfig remove service registration should be best effort #901

Closed
RangerDjanger-zz opened this issue Apr 5, 2017 · 4 comments
Closed

Comments

@RangerDjanger-zz
Copy link

Have you try trouble shooting doc?

Yes

VSTS type and version

On-Prem TFS


TFS 2017.1

What's not working?

Attempting to reconfigure an agent after the public TFS URL has changed. Is there a way to change the TFS URL with the agent once configured? Where is it stored?

Tried to run config remove but it cannot find the TFS endpoint and fails.

config.cmd remve
Removing Service
Removing Agent from the server
Enter Auth>
Failed: Removing agent from the server
Page not found.

In the logs it reports:

[2017-04-05 ERR Agent] Microsoft.VisualStudio.Services.WebApi.VssServiceResponseException: Page not found.

I now have to manually remove the WIndows Service.

@ericsciple
Copy link
Contributor

What do you mean you have to manually remove the Windows Service? The Windows service is uninstalled before the attempt to remove the TFS server registration (in console output above Removing Service appears to have successfully happened and then failed removing from server).

We do plan to make unconfig best effort if fromving TFS server registration fails. What you can do for now is delete the hidden . files in the root of the agent dir and then reconfigure. During config, if using the same agent name, you will be asked whether to replace server registration, answer yes to take over the old registration.

@ericsciple ericsciple changed the title Cannot remove or reconfigure agent if TFS public URL as changed Unconfig remove service registration should be best effort Apr 5, 2017
@RangerDjanger-zz
Copy link
Author

Hi Eric,

The windows service in my case wasnt actually being removed from services. I had to manually remove it. I did realise that I could have just edited the .agent file and changed the URL.

Proposed functionality sounds great. Thanks!

@ericsciple
Copy link
Contributor

OK I peeked through the code a little and it does not appear that removing the service is best effort. Do you have the agent diag log (under _diag folder) from when you tried unconfigure. If so please zip and send it to ersciple and I can take a look through it. Also do you remember which service name you manually removed? I'm curious whether it was actually the same agent.

@TingluoHuang
Copy link
Contributor

@RangerDjanger I am not able to repro the issue you hit, i modify my .agent file before i run ./config.cmd remove, change serverUrl in .agent to point a nonexist location, ./config.cmd remove is still able to remove the windows service first for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants