【问题标题】:GAE urlfetch returning 500 uncaught exception in productionGAE urlfetch 在生产中返回 500 未捕获的异常
【发布时间】:2013-10-20 22:30:59
【问题描述】:
from google.appengine.api import urlfetch

totango_url = "https://sdr.totango.com/pixel.png"
totango_url2 = "https://app.totango.com/images/accounts-users.png"
result = urlfetch.fetch(totango_url, validate_certificate=None )
print result.status_code

在生产中,请求totango_url日志表明(没有error_detail):

DownloadError: Unable to fetch URL: https://sdr.totango.com/pixel.gif

我运行了这个 curl 命令。对于 https totango 网址,本地设置都可以正常工作

curl -v "https://sdr.totango.com/pixel.gif"

curl -v "https://app.totango.com/images/accounts-users.png"

两个 url 的 ssl 证书均有效且相同。

在两个 url 上使用 urlfetch.fetch 也会从我的(本地)数据存储控制台返回 200。

但是,对https://sdr.totango.com/pixel.png 的 urlfetch.fetch 调用失败并出现上述错误

另外,我在谷歌云操场上运行相同的代码来调整示例应用引擎应用程序,似乎得到了totango_url2 的 200 响应,而它返回了 500 的 totango_url。我认为两者都有相同的 ssl 证书。

我需要处理生产中的应用程序引擎的一些 ip 白名单/防火墙问题吗?

【问题讨论】:

    标签: google-app-engine urlfetch


    【解决方案1】:

    这听起来更像是远程方面的问题。如果您能够从一个地方而不是另一个地方获取该图像,则说明远程站点正在执行某种过滤,可能是通过 IP 地址。

    【讨论】:

    • 感谢您的意见。我是否应该要求远程服务检查dig -t TXT _netblocks.google.com @ns1.google.com 给出的生产应用程序引擎 IP 的白名单?
    • 我会先问他们是否有任何在该范围内的黑名单,或者他们是否可以解释为什么一个 fetch 得到 200 而另一个 500。
    猜你喜欢
    • 2021-11-23
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-10-29
    • 2010-10-16
    • 1970-01-01
    • 2020-06-15
    • 2020-12-09
    相关资源
    最近更新 更多