简体   繁体   English

在GAE上部署cron作业的内部服务器错误

[英]Internal Server Error on deploying cron job on GAE

I recently signed up and started playing with GAE for python. 我最近注册并开始使用GAE for python。 I was able to get their standard/flask/hello_world project. 我能够得到他们的standard / flask / hello_world项目。 But, when I tried to upload a simple cron job following the instructions at https://cloud.google.com/appengine/docs/standard/python/config/cron , I get an "Internal Server Error". 但是,当我尝试按照https://cloud.google.com/appengine/docs/standard/python/config/cron上的说明上载简单的cron作业时,出现“内部服务器错误”。

My cron.yaml 我的cron.yaml

cron:
- description: test cron
  url: /
  schedule: every 24 hours

The error I see 我看到的错误

Do you want to continue (Y/n)?  y
Updating config [cron]...failed.                                                                                                                                                                                                         
ERROR: (gcloud.app.deploy) Server responded with code [500]:
  Internal Server Error.

Server Error (500)
A server error has occurred.

Have I done something wrong here or is it possible that I am not eligible to add cron jobs as a free user? 我在这里做错了什么吗?还是我没有资格以自由用户身份添加cron作业?

I was just struggling with this same issue. 我只是在同一个问题上挣扎。 In my case, I am using the PHP standard environment and kept receiving the '500 Internal Server Error' when I tried to publish our cron.yaml file from the Google Cloud SDK with the command: 就我而言,我正在使用PHP标准环境,并尝试使用以下命令从Google Cloud SDK中发布cron.yaml文件时,始终收到“ 500 Internal Server Error”:

gcloud app deploy cron.yaml --project {PROJECT_NAME}

To fix it, I did the following: 为了解决这个问题,我做了以下工作:

  1. I removed all credentials from my gcloud client 我从gcloud客户端中删除了所有凭据

    gcloud auth revoke --all

  2. Reauthenticated within the client 在客户端内重新认证

    gcloud auth login

  3. Published the cron.yaml 发布了cron.yaml

    gcloud app deploy cron.yaml --project {PROJECT NAME}

From what I can tell, the permissions in my gcloud client got out of sync which is what caused the internal server error. 据我所知,gcloud客户端中的权限不同步,这是导致内部服务器错误的原因。 Hopefully that's the same case for you! 希望对您来说也是一样!

I was having this problem as well, at about the same timeline. 在大约同一时间线上,我也遇到了这个问题。 Without any changes, the deploy worked this morning, so my guess is that this was a transient server problem on Google's part. 在没有任何更改的情况下,该部署今天早上开始工作,因此我猜测这是Google的暂时性服务器问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM