Azure-devops-docs: How to you restart a build agent?

Created on 9 Apr 2018  Â·  7Comments  Â·  Source: MicrosoftDocs/azure-devops-docs

"After you install new software on a agent, you must restart the agent for the new capability to show up." So how do you restart an agent?


Document Details

⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Pri2 unspecifiesvc

Most helpful comment

If you're running the agent as a service, then run services.msc, and look for "VSTS Agent (name of your agent)". Right-click the entry and then choose restart. If you're running the agent interactively, then go to the PowerShell console in which it's running and press Ctrl+C to stop it and then run run.cmd to start it again.

All 7 comments

If you're running the agent as a service, then run services.msc, and look for "VSTS Agent (name of your agent)". Right-click the entry and then choose restart. If you're running the agent interactively, then go to the PowerShell console in which it's running and press Ctrl+C to stop it and then run run.cmd to start it again.

Good to know. Thanks. It might be helpful if "restart" either linked to
that explanation or summarized it as you have in the email.

Henry Wyckoff
henry.[email protected]

On Tue, Apr 10, 2018 at 7:59 AM, andyjlewis notifications@github.com
wrote:

If you're running the agent as a service, then run services.msc, and look
for "VSTS Agent (name of your agent)". Right-click the entry and then
choose restart. If you're running the agent interactively, then go to the
PowerShell console in which it's running and press Ctrl+C to stop it and
then run run.cmd to start it again.

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/MicrosoftDocs/vsts-docs/issues/509#issuecomment-380132570,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ARLhUC-O19m0MVBJQlTnzVPKTfDV8Qbrks5tnMjJgaJpZM4TNMJt
.

How do you restart an agent that is running as a service on Linux?

I've added @vtbassmatt to confirm.

Ah, I looked through that page, but I was searching for keyword "restart". It appears there is script to update the environment variables: ./env.sh.

https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/v2-linux?view=vsts#service-update-environment-variables

Thanks!

@andyjlewis is there a way to restart an environment agent through a pipeline?

Currently I do the following:

cd ../../..
pwd
./env.sh
# Unfortunately the following will signal a hard stop to the running pipeline: 
./svc.sh stop
# So this command will never get fired:
./svc.sh start

Unfortunately the start command never gets executed.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Naphier picture Naphier  Â·  3Comments

o-o00o-o picture o-o00o-o  Â·  3Comments

dannyvv picture dannyvv  Â·  3Comments

adnanebrahimi picture adnanebrahimi  Â·  3Comments

sevaa picture sevaa  Â·  3Comments