1

I am new to DevOps and having a difficulty deploying an application. I have created a Release in VSTS and added my Latest Build and Latest Code in the Artifiacts section. In the stages area, I have created a one stage and it contains few tasks:

 1. Agent Job: 
    In this task, I am providing my on-premises agent that I have created on my local machine.
 2. PowerShell Script: 
    Providing a path of powershell script file from my Latest Code artifact.

I am using a on-premises agent, that I have configured on my local machine. Before deploying the application, from my Powershell window I make sure to run the agent so it status get Online (In case if the status is offline)

When I create deployment to deploy this release, it successfully initializes the agent and move to the next step i.e. download Artifacts. Downloading Artifacts takes longer time to execute about more than 9 minutes and at the same time, my Powershell Console window, automatically closed itself.

When I check the status of my agent in Agent Pools, it shows as Offline.

Can anyone help me, why my agent get offline while running deployment?
Faisal
  • 23
  • 3
  • While not directly helping your problem, have you considered running your agent as a service instead? Assuming you are running on Windows? Is there anything in the Event Log about the crash? – Matt Feb 22 '19 at 18:15
  • How can i check the event log?? Also how can i change it to run as a service? – Faisal Feb 22 '19 at 18:39
  • You can search for "Event Viewer" and then application errors to see if something crashed your powershell Window. From your agent folder if you do .\config it will prompt you through several options. One of the last ones asks if you'd like to run as a service and provide a user account for that. If you run as a service, you don't have to start/stop/watch the agent window running on your self-hosted server. – Matt Feb 22 '19 at 18:52
  • Thanks Matt for guiding on this issue. Found an issue, I have a BitDefender installed on my machine, it's blocking the powershell to execute from vsts I beleive. When I see the bitdefender, it consider it as a threat... Thanks really appreciated. – Faisal Feb 22 '19 at 20:33

0 Answers0