1

我正在尝试从控制台将应用程序部署到 Swisscom App Cloud。它报告进度,直到最后,报告了没有进一步解释的 504:

Updating app helloclass-fe-develop in org UCID-Bern Team / space HELLOCLASS-TEST as christian.cueni@iterativ.ch...
OK

Uploading helloclass-fe-develop...
FAILED
Error processing app files: Error uploading application.
Server error, status code: 504, error code: 0, message: 

该应用程序的日志报告该应用程序已更新:

2017-01-03 09:37:39 [RTR/0] OUT helloclass-develop.scapp.io - [03/01/2017:08:37:39.584 +0000] "GET / HTTP/1.1" 200 0 594 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.75 Safari/537.36 Google Favicon" 66.249.93.201:50868 10.0.18.35:64341 x_forwarded_for:"83.76.152.96" x_forwarded_proto:"https" vcap_request_id:8a8adcc7-9e97-4bd9-4492-68e92883ee3d response_time:0.001739219 app_id:310166b4-f3a6-4168-a9ac-530e45dbfb10 app_index:0
2017-01-03 09:37:39 [APP/PROC/WEB/0] OUT 83.76.152.96, 66.249.93.201, 66.249.93.201 - - - [03/Jan/2017:08:37:39 +0000] "GET / HTTP/1.1" 200 606
2017-01-03 10:05:50 [API/2] OUT Updated app with guid 310166b4-f3a6-4168-a9ac-530e45dbfb10 ({"name"=>"helloclass-fe-develop"})
2017-01-03 10:57:15 [API/1] OUT Updated app with guid 310166b4-f3a6-4168-a9ac-530e45dbfb10 ({"state"=>"STOPPED"})
2017-01-03 10:57:15 [CELL/0] OUT Exit status 0
2017-01-03 10:57:15 [APP/PROC/WEB/0] OUT Exit status 0
2017-01-03 10:57:15 [CELL/0] OUT Destroying container
2017-01-03 10:57:15 [CELL/0] OUT Successfully destroyed container
2017-01-03 10:57:16 [API/1] OUT Updated app with guid 310166b4-f3a6-4168-a9ac-530e45dbfb10 ({"state"=>"STARTED"})
2017-01-03 10:57:16 [CELL/0] OUT Creating container
2017-01-03 10:57:16 [CELL/0] OUT Successfully created container
2017-01-03 10:57:17 [CELL/0] OUT Starting health monitoring of container
2017-01-03 10:57:19 [CELL/0] OUT Container became healthy

尽管有这些消息表明该应用程序已更新,但我仍然看到正在提供该应用程序的旧版本。


编辑

运行带-v参数的命令后,我看到失败的原因是网关超时:

RESPONSE: [2017-01-03T13:32:39+01:00]
HTTP/1.1 504 Gateway Timeout
Connection: close
Content-Length: 176
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Content-Type: text/html
Date: Tue, 03 Jan 2017 12:32:39 GMT
Expires: 0
Pragma: no-cache
Strict-Transport-Security: max-age=15768000; includeSubDomains
X-Content-Type-Options: nosniff
X-Frame-Options: DENY
X-Vcap-Request-Id: 3ac831ef-e70b-4f4e-7c56-e308806f039e
X-Xss-Protection: 1; mode=block

<html>
<head><title>504 Gateway Time-out</title></head>
<body bgcolor="white">
<center><h1>504 Gateway Time-out</h1></center>
<hr><center>nginx</center>
</body>
</html>

FAILED
Error processing app files: Error uploading application.
Server error, status code: 504, error code: 0, message: 

这是 cloudfoundry 特有的还是与 Swisscom AppCloud 相关的东西?是否有 cloudfoundry 固有的超时限制?

4

1 回答 1

2

您可以运行cf push-v启用 CF_TRACE 以查看 CLI 与您的 CF 端点的更多交互。
错误消息类似于https://github.com/cloudfoundry/cli/issues/1042:云控制器无法及时完成请求,将 API 请求路由到云控制器的路由器不再等待并返回504(网关超时)到 CLI。

跟踪应该告诉您哪个 API 调用超时。
CLI 在那里中止了操作,而云控制器最终可能已成功完成操作。

我原以为 CLI 将在这里执行的操作是:

  1. 发送应用程序中的文件列表及其资源匹配校验和(因此它可以跳过上传 CC 从先前推送中缓存的未修改应用程序位)
  2. 上传应用文件
  3. (重新)启动应用程序(包括登台)
  4. 轮询并等待应用实例返回它正在运行

从您的 CLI 输出中,我假设第一个操作超时,因此不清楚您的应用程序是如何重新启动的。

于 2017-01-03T11:27:54.870 回答