如何防止Azure Devops机代理停止服务?

发布于 2025-02-05 17:36:10 字数 535 浏览 2 评论 0原文

我在Azure DevOps中创建了一个部署组,并在Windows 2016服务器计算机上注册了Azure Pipelines代理。注册机器后,该服务成功开始,并且机加工在Azure DevOps中以在线出现。但是,几个小时后,该服务关闭了,几个小时后无法发现代理商

我重新启动了该服务(在Yeloow中突出显示),但是该机器在Azure DevOps中脱机出现。

您能帮忙吗?

I created a deployment group in Azure DevOps and registered an Azure Pipelines agent on a windows 2016 Server machine. After registering the machine, the service started successfully and the machined appeared as online in Azure DevOps. However, the service turned itself off after few hours and the agent was not discoverable after few hours as in the picture
enter image description here

I restarted the service (highlighted in yeloow) but the still the machine appears offline in Azure DevOps.

enter image description here

Can you please help?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

深海夜未眠 2025-02-12 17:36:10

从您的描述来看,问题可能是由TLS1.0 / TLS 1.1的贬值引起的。

根据博客,根据微软防止加密攻击的立场,我们宣布Azure DevOps服务将不再接受跨越TLS 1.0 / TLS 1.1的连接,并且最少需要TLS 1.2。

如果您的本地机器使用TLS 1.0 / TLS 1.1,则可能导致代理保持离线。

请参阅下面的以下步骤检查并在计算机中启用TLS 1.2:

  1. 运行此脚本: powerShell脚本以检查TLS 1.2 在您的PowerShell中检查当前的TLS 1.2设置。

如果您已成功启用了TLS 1.2,则应该看到与下图相同的结果:

“在此处输入图像说明”

如果不是,请按照步骤2启用TLS 1.2。

  1. 运行此powerShell脚本: powerShell脚本启用TLS 1.2 启用TLS 1.2。启用TLS 1.2后,请在步骤1中运行脚本以检查并确保已成功启用了TLS 1.2。请与我们分享结果的屏幕截图。

  2. 启用TLS 1.2后,您需要在密码套件下启用:(请在此处找到密码套件: https://devblogs.microsoft.com/devops /折旧 - 晶体标准标准-TLS-1-0-1-1-1-1-1-1-1-1-1-1-1-1-驱动器服务/#如何启用-TLS-1-2

路径:hkey_local_machine \ system \ system \ currentcontrolset \ control \ securityProviders \ Schannel \ ciphers \ ciphers \

右键单击密码,并添加一个名为
tls_dhe_rsa_with_aes_aes_128_gcm_sha256(*),右键单击此键并启用dword值启用:00000001:00000001

它是OS上的钥匙,在下面的四个TLS 1.2 Cipher suits之一上,启用了四个TLS 1.2 cipher sublable:

TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
TLS_DHE_RSA_WITH_AES_256_GCM_SHA384 (*)
TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 (*)
  1. open opent open opable:

    .MSC(本地组策略)并设置以下组策略:计算机配置,管理模板,网络,SSL配置设置> SSL密码套件订单。设置启用策略。
    请确保这里存在所需的密码,否则空的密码将覆盖注册表密钥中的密码。

  2. 在管理模式下运行“ gpupdate.exe/force”。

  1. 重新启动本地机器。

  2. 通过下面的命令检查连接:
    (Indoke -webrequest -uri status.dev.azure.com).statusdescription
    它返回确定意味着本地机器和AzureDevops之间的连接运行良好。

From your description, the issue could be caused by the deprecation of TLS1.0 / TLS 1.1.

According to the blog, per Microsoft’s position to protect against cryptographic attacks, we are announcing that Azure DevOps services will no longer accept connections coming over TLS 1.0 / TLS 1.1 and require TLS 1.2 at a minimum.

If your local machine is using TLS 1.0 / TLS 1.1, it can cause the agent keeping offline.

Refer to the following steps below to check and enable TLS 1.2 in your machine:

  1. Run this script:PowerShell script to check TLS 1.2 in your Powershell to check the current TLS 1.2 settings.

If you have enabled TLS 1.2 successfully, you are supposed to see the same result as the picture below:

enter image description here

If not, please follow Step 2 to enable TLS 1.2.

  1. Run this Powershell script:PowerShell script to enable TLS 1.2 to enable TLS 1.2. After enabling TLS 1.2, please run the script in Step 1 to check and make sure you have enabled TLS 1.2 successfully. Please also kindly share a screenshot of the result with us.

  2. After enabling TLS 1.2, you need to enable below cipher suites: (Please find the cipher suites here: https://devblogs.microsoft.com/devops/deprecating-weak-cryptographic-standards-tls-1-0-and-1-1-in-azure-devops-services/#how-to-enable-tls-1-2 )

Path:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Ciphers\

Right-click on Ciphers and add a new key named
TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 (*), right-click on this key and add a DWORD value Enabled:00000001

It is key that on the OS one of the four TLS 1.2 cipher suites below is enabled:

TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
TLS_DHE_RSA_WITH_AES_256_GCM_SHA384 (*)
TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 (*)
  1. Open Gpedit.msc (local group policy) and set the following Group policy: Computer Configuration, Administrative Templates, Network, SSL Configuration Settings > SSL Cipher Suite Order. Set the policy to enabled.
    (Please make sure the required cipher exists here, otherwise the empty cipher will overwrite the cipher in the registry key.)

  2. Run “GPupdate.exe /force” in Admin mode.

enter image description here

  1. Restart the local machine.

  2. Check the connection by below command:
    (Invoke-WebRequest -Uri status.dev.azure.com).StatusDescription
    It returns OK means the connection between local machine and AzureDevOps is working well.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文