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

[BUG]: .NET Framework 4.7 required for agent installation as a service #4841

Open
1 of 4 tasks
gt97 opened this issue Jun 13, 2024 · 8 comments
Open
1 of 4 tasks

[BUG]: .NET Framework 4.7 required for agent installation as a service #4841

gt97 opened this issue Jun 13, 2024 · 8 comments

Comments

@gt97
Copy link

gt97 commented Jun 13, 2024

What happened?

Installing the agent on a windows server from powershell as admin I am not able to continue the installation because framework 4.7 is required.

According to documentation (https://learn.microsoft.com/en-us/azure/devops/pipelines/agents/windows-agent?view=azure-devops#check-prerequisites) The agent software installs its own version of .NET so there's no .NET prerequisite.

Immagine

Versions

Azure Devops version 2.329.1/WIN2012

Environment type (Please select at least one enviroment where you face this issue)

  • Self-Hosted
  • Microsoft Hosted
  • VMSS Pool
  • Container

Azure DevOps Server type

dev.azure.com (formerly visualstudio.com)

Azure DevOps Server Version (if applicable)

No response

Operation system

Windows Server 2012

Version controll system

No response

Relevant log output

[2024-06-13 13:23:29Z INFO ProcessInvokerWrapper] Starting process:
[2024-06-13 13:23:29Z INFO ProcessInvokerWrapper]   File name: '"D:\azagent\bin\AgentService.exe"'
[2024-06-13 13:23:29Z INFO ProcessInvokerWrapper]   Arguments: 'init'
[2024-06-13 13:23:29Z INFO ProcessInvokerWrapper]   Working directory: ''
[2024-06-13 13:23:29Z INFO ProcessInvokerWrapper]   Require exit code zero: 'True'
[2024-06-13 13:23:29Z INFO ProcessInvokerWrapper]   Encoding web name:  ; code page: ''
[2024-06-13 13:23:29Z INFO ProcessInvokerWrapper]   Force kill process on cancellation: 'False'
[2024-06-13 13:23:29Z INFO ProcessInvokerWrapper]   Redirected STDIN: 'False'
[2024-06-13 13:23:29Z INFO ProcessInvokerWrapper]   Persist current code page: 'False'
[2024-06-13 13:23:29Z INFO ProcessInvokerWrapper]   Keep redirected STDIN open: 'False'
[2024-06-13 13:23:29Z INFO ProcessInvokerWrapper]   High priority process: 'False'
[2024-06-13 13:23:29Z INFO ProcessInvokerWrapper]   ContinueAfterCancelProcessTreeKillAttempt: 'False'
[2024-06-13 13:23:29Z INFO ProcessInvokerWrapper]   Sigint timeout: '00:00:07.5000000'
[2024-06-13 13:23:29Z INFO ProcessInvokerWrapper]   Sigterm timeout: '00:00:02.5000000'
[2024-06-13 13:23:29Z INFO ProcessInvokerWrapper]   Try to use graceful shutdown: False
[2024-06-13 13:23:29Z INFO ProcessInvokerWrapper] OOM score adjustment is Linux-only.
[2024-06-13 13:23:29Z INFO ProcessInvokerWrapper] Process started with process id 10408, waiting for process exit.
[2024-06-13 13:23:32Z INFO ProcessInvokerWrapper] STDOUT/STDERR stream read finished.
[2024-06-13 13:23:32Z INFO ProcessInvokerWrapper] STDOUT/STDERR stream read finished.
[2024-06-13 13:23:32Z INFO ProcessInvokerWrapper] Exited process 10408 with exit code -2146232576
[2024-06-13 13:23:32Z INFO ProcessInvokerWrapper] Finished process 10408 with exit code -2146232576, and elapsed time 00:00:03.1487455.
[2024-06-13 13:23:33Z ERR  Agent] Microsoft.VisualStudio.Services.Agent.Util.ProcessExitCodeException: Exit code -2146232576 returned from process: file name '"D:\azagent\bin\AgentService.exe"', arguments 'init'.
   at Microsoft.VisualStudio.Services.Agent.Util.ProcessInvoker.ExecuteAsync(String workingDirectory, String fileName, String arguments, IDictionary`2 environment, Boolean requireExitCodeZero, Encoding outputEncoding, Boolean killProcessOnCancel, InputQueue`1 redirectStandardIn, Boolean inheritConsoleHandler, Boolean keepStandardInOpen, Boolean highPriorityProcess, Boolean continueAfterCancelProcessTreeKillAttempt, CancellationToken cancellationToken) in D:\a\_work\1\s\src\Agent.Sdk\ProcessInvoker.cs:line 389
   at Microsoft.VisualStudio.Services.Agent.ProcessInvokerWrapper.ExecuteAsync(String workingDirectory, String fileName, String arguments, IDictionary`2 environment, Boolean requireExitCodeZero, Encoding outputEncoding, Boolean killProcessOnCancel, InputQueue`1 redirectStandardIn, Boolean inheritConsoleHandler, Boolean keepStandardInOpen, Boolean highPriorityProcess, Boolean continueAfterCancelProcessTreeKillAttempt, CancellationToken cancellationToken) in D:\a\_work\1\s\src\Microsoft.VisualStudio.Services.Agent\ProcessInvoker.cs:line 329
   at Microsoft.VisualStudio.Services.Agent.Listener.Configuration.NativeWindowsServiceHelper.InstallService(String serviceName, String serviceDisplayName, String logonAccount, String logonPassword, Boolean setServiceSidTypeAsUnrestricted) in D:\a\_work\1\s\src\Agent.Listener\Configuration.Windows\NativeWindowsServiceHelper.cs:line 500
   at Microsoft.VisualStudio.Services.Agent.Listener.Configuration.WindowsServiceControlManager.ConfigureService(AgentSettings settings, CommandSettings command) in D:\a\_work\1\s\src\Agent.Listener\Configuration.Windows\WindowsServiceControlManager.cs:line 142
   at Microsoft.VisualStudio.Services.Agent.Listener.Configuration.ConfigurationManager.ConfigureAsync(CommandSettings command) in D:\a\_work\1\s\src\Agent.Listener\Configuration\ConfigurationManager.cs:line 442
   at Microsoft.VisualStudio.Services.Agent.Listener.Agent.ExecuteCommand(CommandSettings command) in D:\a\_work\1\s\src\Agent.Listener\Agent.cs:line 103
[2024-06-13 13:23:33Z ERR  Terminal] WRITE ERROR: Exit code -2146232576 returned from process: file name '"D:\azagent\bin\AgentService.exe"', arguments 'init'.
@vmapetr
Copy link
Contributor

vmapetr commented Jul 26, 2024

Hi @gt97 thanks for reporting!
We are working on more prioritized issues at the moment, but will get back to this one soon.

@NenoLoje
Copy link

We are working on more prioritized issues at the moment, but will get back to this one soon.

I got the same issue. Cannot install the latest Agent due to this.

@vishplanet
Copy link

vishplanet commented Sep 19, 2024

is this issue resolved? having the same problem.

@JoshWeepie
Copy link

JoshWeepie commented Sep 19, 2024

Same issue on Server 2016. Agent stopped yesterday and now won't start because it says it needs .NET Framework 4.7.1, yet the Azure Pipelines Self-Hosted Windows docs say "The agent software installs its own version of .NET so there's no .NET prerequisite.".

https://learn.microsoft.com/en-us/azure/devops/pipelines/agents/windows-agent?view=azure-devops#check-prerequisites

Lol.

Manually installing 4.7.1 doesn't fix the issue.

@JoshWeepie
Copy link

JoshWeepie commented Sep 19, 2024

If anyone else runs into this, I installed .NET Framework 4.7.2 manually on the VM, and then I was able to ./config the agent successfully. Tried to install 4.8 first, but 4.8 kept failing with "Cannot find object or property. "

@vishplanet
Copy link

Thanks @JoshWeepie for the feedback. I tried 4.7.1 but it did not work. Let me try 4.7.2. Thanks again.

@gt97
Copy link
Author

gt97 commented Sep 20, 2024

I think this is an issue that has to be solved, otherwise I have to keep the update agent on the agent pool unchecked because maybe the update fails.

@michaerlrob92
Copy link

Getting this issue on Server 2016, .NET 4.7.1 installed, .NET 4.7.2 installed. Fix it please.

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

No branches or pull requests

7 participants