Google app engine 将Hugo站点部署到GAE会导致;内部错误13“;

Google app engine 将Hugo站点部署到GAE会导致;内部错误13“;,google-app-engine,go,hugo,Google App Engine,Go,Hugo,我在AppEngine上为一个博客主持了一个登台设置,有几十个版本运行得很好。我的main.go文件非常简单,但尝试部署会在cmdline处出现“内部错误”: You may also view the gcloud log file, found at [/Users/id/.config/gcloud/logs/2016.11.28/10.18.23.292328.log]. File upload done. Updating service [default]...failed. ERR

我在AppEngine上为一个博客主持了一个登台设置,有几十个版本运行得很好。我的main.go文件非常简单,但尝试部署会在cmdline处出现“内部错误”:

You may also view the gcloud log file, found at
[/Users/id/.config/gcloud/logs/2016.11.28/10.18.23.292328.log].
File upload done.
Updating service [default]...failed.
ERROR: (gcloud.app.deploy) Error Response: [13] An internal error occurred.
日志文件的最后一块对于错误原因没有帮助:

2016-11-28 10:18:50,133 DEBUG    root            Operation [apps/blog-149523/operations/2a31964d-4f0c-4c1c-9fd7-844d36be257f] complete. Result: {
    "metadata": {
        "target": "apps/blog-149523/services/default/versions/20161128t101823",
        "method": "google.appengine.v1beta5.Versions.CreateVersion",
        "user": "ian.douglas@iandouglas.com",
        "insertTime": "2016-11-28T17:18:34.140Z",
        "endTime": "2016-11-28T17:18:47.381Z",
        "@type": "type.googleapis.com/google.appengine.v1beta5.OperationMetadataV1Beta5"
    },
    "done": true,
    "name": "apps/blog-149523/operations/2a31964d-4f0c-4c1c-9fd7-844d36be257f",
    "error": {
        "message": "An internal error occurred.",
        "code": 13
    }
}
2016-11-28 10:18:50,134 DEBUG    root            (gcloud.app.deploy) Error Response: [13] An internal error occurred.
Traceback (most recent call last):
  File "/Users/id/src/public/google-cloud-sdk/lib/googlecloudsdk/calliope/cli.py", line 740, in Execute
    resources = args.calliope_command.Run(cli=self, args=args)
  File "/Users/id/src/public/google-cloud-sdk/lib/googlecloudsdk/calliope/backend.py", line 1648, in Run
    resources = command_instance.Run(args)
  File "/Users/id/src/public/google-cloud-sdk/lib/surface/app/deploy.py", line 53, in Run
    return deploy_util.RunDeploy(args, app_create=True)
  File "/Users/id/src/public/google-cloud-sdk/lib/googlecloudsdk/command_lib/app/deploy_util.py", line 410, in RunDeploy
    all_services)
  File "/Users/id/src/public/google-cloud-sdk/lib/googlecloudsdk/command_lib/app/deploy_util.py", line 257, in Deploy
    endpoints_info)
  File "/Users/id/src/public/google-cloud-sdk/lib/googlecloudsdk/api_lib/app/appengine_api_client.py", line 119, in DeployService
    return operations.WaitForOperation(self.client.apps_operations, operation)
  File "/Users/id/src/public/google-cloud-sdk/lib/googlecloudsdk/api_lib/app/api/operations.py", line 70, in WaitForOperation
    encoding.MessageToPyValue(completed_operation.error)))
OperationError: Error Response: [13] An internal error occurred.
2016-11-28 10:18:50,135 ERROR    root            (gcloud.app.deploy) Error Response: [13] An internal error occurred.
2016-11-28 10:18:50,501 DEBUG    root            Metrics reporting process started...
搜索“内部错误13”让我找到了很多答案,甚至在这里,我说这是一个“暂时”错误,应该会自行消失,但我已经处理了一个多星期了

我已尽可能简化了我的main.go,但没有任何效果:

package main

import (
  "net/http"
  "fmt"
)

func init() {
  http.HandleFunc("/_ah/health", func(w http.ResponseWriter, r *http.Request) { fmt.Fprintf(w, "OK") })
  http.Handle("/", http.FileServer(http.Dir("public")))
}
但是部署过程并没有抱怨我的Go代码不好,它只是每次都抛出这个模糊的内部错误13,我找不到任何关于它是真正的服务器端还是我做过的事情的信息


谢谢你的帮助

我的路径中一定有一个名称不正确的.md文件。将此添加到my app.yaml解决了问题:

skip_files:
  - ^(.*/)?.*\.md$

如果gcloud系统能告诉我更清楚一点就好了

您是否尝试在没有GAE的情况下在本地运行服务器?顺便说一句,
init
函数在我看来很奇怪。是不是应该是
main
?我从另一个在GAE上启动Hugo项目的人那里复制了main.go脚本的那部分。正如我所说,Go代码没有问题,它最终导致路径中的.md文件名不正确(无论如何都不应该上载)。当我将.md文件添加到我的app.yaml中的skip_文件列表时,它又开始工作了。