0

使用 TeamCity 和 WebDeploy,我将网站远程发布到生产服务器。这是部署的示例日志:

[15:48:24][Step 11/18] Deploying to Web Server 1 (2s)
[15:48:24][Deploying to Web Server 1] Deploying to Web Server 1:
[15:48:24][Deploying to Web Server 1] Info: Using ID 'e7a113e6-5dbd-4ed4-887a-156af88f7403' for connections to the remote server.
[15:48:25][Deploying to Web Server 1] Info: Using ID 'ad9a7a1a-0adb-45f6-bdde-e4d7157b4eb1' for connections to the remote server.
[15:48:26][Deploying to Web Server 1] Total changes: 0 (0 added, 0 deleted, 0 updated, 0 parameters changed, 0 bytes copied)
[15:48:26][Step 11/18] Deploying to Web Server 2 (3s)
[15:48:26][Deploying to Web Server 2] Deploying to Web Server 2:
[15:48:26][Deploying to Web Server 2] Info: Using ID 'b8218d7a-5fa0-4152-8e6b-c467ee86267e' for connections to the remote server.
[15:48:28][Deploying to Web Server 2] Info: Using ID '2f02aa87-5e5c-4305-90d5-f82a549ffca3' for connections to the remote server.
[15:48:29][Deploying to Web Server 2] Total changes: 0 (0 added, 0 deleted, 0 updated, 0 parameters changed, 0 bytes copied)
[15:48:29][Step 11/18] Deploying to Web Server 3 (2s)
[15:48:29][Deploying to Web Server 3] Deploying to Web Server 3:
[15:48:29][Deploying to Web Server 3] Info: Using ID 'e5457237-4632-46da-a7b6-3cb1a7d5078e' for connections to the remote server.
[15:48:31][Deploying to Web Server 3] Info: Using ID '28b3725e-00e6-43b4-a014-523279678d9b' for connections to the remote server.
[15:48:32][Deploying to Web Server 3] Total changes: 0 (0 added, 0 deleted, 0 updated, 0 parameters changed, 0 bytes copied)

我们将部署代理移到了新机器上,但现在在我们所有站点上运行 WebDeploy 时出现了巨大的延迟,即使它(有效地)没有部署任何东西:

[15:46:53][Step 11/18] Deploying to Web Server 1 (17s)
[15:46:53][Deploying to Web Server 1] Deploying to Web Server 1:
[15:46:54][Deploying to Web Server 1] Info: Using ID 'e55ed14a-0557-4300-b25d-3fbb39907b3b' for connections to the remote server.
[15:47:10][Deploying to Web Server 1] Info: Using ID '0cdfb2b4-e435-492a-9157-caee13b27962' for connections to the remote server.
[15:47:11][Deploying to Web Server 1] Total changes: 0 (0 added, 0 deleted, 0 updated, 0 parameters changed, 0 bytes copied)
[15:47:11][Step 11/18] Deploying to Web Server 2 (18s)
[15:47:11][Deploying to Web Server 2] Deploying to Web Server 2:
[15:47:12][Deploying to Web Server 2] Info: Using ID '53691c36-9c65-4ce4-aad9-3f8e52fefd87' for connections to the remote server.
[15:47:28][Deploying to Web Server 2] Info: Using ID 'afccf558-e1f4-4abf-90c6-c1bbef6c4434' for connections to the remote server.
[15:47:29][Deploying to Web Server 2] Total changes: 0 (0 added, 0 deleted, 0 updated, 0 parameters changed, 0 bytes copied)
[15:47:29][Step 11/18] Deploying to Web Server 3 (18s)
[15:47:29][Deploying to Web Server 3] Deploying to Web Server 3:
[15:47:30][Deploying to Web Server 3] Info: Using ID '35a92c74-ac2b-4d02-af1d-6eac7a53405a' for connections to the remote server.
[15:47:46][Deploying to Web Server 3] Info: Using ID '0e73566a-8692-4849-9a79-3c4afec7089b' for connections to the remote server.
[15:47:47][Deploying to Web Server 3] Total changes: 0 (0 added, 0 deleted, 0 updated, 0 parameters changed, 0 bytes copied)

第一个“使用 ID [guid] 连接到远程服务器”步骤似乎每次都有一个非常可预测且一致的 15 秒延迟。

使用 NETSTAT,这条信息脱颖而出:

TCP    192.168.XXX.XXX:58265    23.47.144.26:80        SYN_SENT
[msdeploy.exe] 

在旧机器上,它不会尝试访问这个 IP,所以这是出乎意料的。我们将尝试在下一个维护窗口中修复防火墙规则,让它通过,看看这是否可行,但 Web Deploy 在这里试图做什么?

4

1 回答 1

0

打开Port 80允许msdeploy.exe打电话回家(或在那里做的任何事情)修复了 15 秒的延迟问题。部署时间现在已降至前一台机器上所见的时间(每台服务器 2-3 秒)。

于 2017-09-02T16:55:58.277 回答