Google App Engine 任务队列:googleapi:错误 500:后端错误

huangapple go评论113阅读模式
英文:

Google App Engine Task Queue: googleapi: Error 500: Backend Error

问题

我已经为我的应用程序引擎应用程序定义了一个拉取队列,并希望通过 REST API 从外部填充它。
不幸的是,它不起作用,我总是收到一个错误500:后端错误。
即使我尝试使用文档中的 API Explorer 填充它。

它的响应是:

  1. 500 Internal Server Error
  2. - 显示头部信息 -
  3. {
  4. "error": {
  5. "errors": [
  6. {
  7. "domain": "global",
  8. "reason": "backendError",
  9. "message": "Backend Error"
  10. }
  11. ],
  12. "code": 500,
  13. "message": "Backend Error"
  14. }
  15. }

有什么办法可以解决这个问题吗?

英文:

I've defined a pull queue for my app engine application and want to fill it from outside via the REST api.
Unfortunately it doesn't work, I always get an error 500: backend error.
Even if I try to fill it with the api explorer from the documentation.

It responses:

  1. 500 Internal Server Error
  2. - Show headers -
  3. {
  4. "error": {
  5. "errors": [
  6. {
  7. "domain": "global",
  8. "reason": "backendError",
  9. "message": "Backend Error"
  10. }
  11. ],
  12. "code": 500,
  13. "message": "Backend Error"
  14. }
  15. }

Any idea how to solve it?

答案1

得分: 3

你能粘贴一下你正在进行租赁操作的代码吗?一个常见的错误是忘记在你的App Engine项目中包含"s~"。例如,如果你的应用程序ID是"my-awesome-app",那么你调用的是:

  1. tq.get(project='my-awesome-app', taskqueue=PULL_QUEUE_NAME...

而你应该调用的是:

  1. tq.get(project='s~my-awesome-app', taskqueue=PULL_QUEUE_NAME...

(感谢bossylobster提供的原始答案:https://stackoverflow.com/questions/17063073/pull-queues-authorization-from-compute)

英文:

Can you paste your code that is doing the leasing? One common mistake is forgetting to include the s~ in your App Engine Project. For example, if your application ID is my-awesome-app, then you are calling

  1. tq.get(project='my-awesome-app', taskqueue=PULL_QUEUE_NAME...

when you should be calling

  1. tq.get(project='s~my-awesome-app', taskqueue=PULL_QUEUE_NAME...

(thanks to bossylobster for this original answer: https://stackoverflow.com/questions/17063073/pull-queues-authorization-from-compute)

答案2

得分: 3

同时,事实证明你必须在JSON主体中提供queueName,除了payloadBase64之外,这是由Frank Ren在这个帖子中发现的。

英文:

Also it turns out you must supply the queueName in the JSON body, in addition to payloadBase64, as discovered by Frank Ren in this thread

huangapple
  • 本文由 发表于 2013年11月19日 00:29:28
  • 转载请务必保留本文链接:https://go.coder-hub.com/20052778.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定