"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?
⚠Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
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?
Run the stop command and then the start command.
https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/v2-linux?view=vsts#commands
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.
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.