shao
V2EX  ›  V2EX

v2ex 这是bug嘛?

  •  
  •   shao · Jul 18, 2012 · 3916 views
    This topic created in 5121 days ago, the information mentioned may be changed or developed.
    有两个图片打不开,显示如下。
    http://static.v2ex.com/banners/upyun.png

    Traceback (most recent call last):
    File "/usr/lib/python2.6/site-packages/tornado/web.py", line 983, in _execute
    self.prepare()
    File "/usr/lib/python2.6/site-packages/tornado/web.py", line 1419, in prepare
    raise HTTPError(self._status_code)
    HTTPError: HTTP 404: Not Found




    http://static.v2ex.com/static/img/reply.png

    Traceback (most recent call last):
    File "/usr/lib/python2.6/site-packages/tornado/web.py", line 988, in _execute
    getattr(self, self.request.method.lower())(*args, **kwargs)
    File "/usr/lib/python2.6/site-packages/tornado/web.py", line 1491, in get
    raise HTTPError(404)
    HTTPError: HTTP 404: Not Found
    13 replies    1970-01-01 08:00:00 +08:00
    yetone
        1
    yetone  
       Jul 18, 2012
    我这里正常显示。
    另,问一下 @Livid ,V2EX 是如何部署的,竟然能看到这么详细的出错信息。
    reorx
        2
    reorx  
       Jul 18, 2012
    @yetone 这只是正常的 tornado traceback 信息,没有经过特别的部署。
    yetone
        3
    yetone  
       Jul 18, 2012
    @reorx 嗯,我知道,我的意思是,用 uwsgi 等方式正常部署的情况下不会显示任何错误信息,难道 V2EX 是直接 python run.py ?
    kingwrcy
        4
    kingwrcy  
       Jul 18, 2012
    shao
        5
    shao  
    OP
       Jul 18, 2012
    结果就是banners图片看不到,回复那个图片看不到。
    fanzeyi
        6
    fanzeyi  
       Jul 18, 2012
    @yetone debug: True

    以及 Tornado 实际上完全可以 python run.py 来运行
    reorx
        7
    reorx  
       Jul 18, 2012
    @yetone 我没有用 uwsgi 部署过 tornado,由于 tornado 本身就是一个非常好的服务器的缘故,一般是直接运行(或通过进程管理的工具运行),nginx 在前面做 upstream 来部署。在这种情况下,出错信息是会包含在返回结果中的。

    猜测可能用的是StaticFileHandler,见:http://www.tornadoweb.org/documentation/_modules/tornado/web.html#StaticFileHandler
    ewex
        8
    ewex  
       Jul 18, 2012
    难道是图片防盗链设置?
    yetone
        9
    yetone  
       Jul 18, 2012
    @fanzeyi
    @reorx 被你们诱惑地我都想试试Tornado了 ;)
    Livid
        10
    Livid  
    MOD
    PRO
       Jul 18, 2012
    这种情况很奇怪,因为 static.v2ex.com 这个域上就根本没有 Tornado,而只有 nginx。

    楼主你 ping static.v2ex.com 看到的 IP 是多少?
    Kai
        11
    Kai  
       Jul 18, 2012
    V2EX DNS 么?
    kingwrcy
        12
    kingwrcy  
       Jul 19, 2012
    jerry@JerryPc:~$ ping static.v2ex.com
    PING www.v2ex.com (106.187.41.232) 56(84) bytes of data.
    64 bytes from li384-232.members.linode.com (106.187.41.232): icmp_req=1 ttl=50 time=190 ms
    64 bytes from li384-232.members.linode.com (106.187.41.232): icmp_req=2 ttl=50 time=191 ms
    64 bytes from li384-232.members.linode.com (106.187.41.232): icmp_req=3 ttl=50 time=196 ms
    64 bytes from li384-232.members.linode.com (106.187.41.232): icmp_req=4 ttl=50 time=215 ms
    64 bytes from li384-232.members.linode.com (106.187.41.232): icmp_req=5 ttl=50 time=212 ms
    64 bytes from li384-232.members.linode.com (106.187.41.232): icmp_req=6 ttl=50 time=203 ms
    shao
        13
    shao  
    OP
       Jul 21, 2012
    @Livid 现在正常了。

    shao-mbp:~ shao$ ping static.v2ex.com
    PING c1.orca.io (199.91.73.248): 56 data bytes
    64 bytes from 199.91.73.248: icmp_seq=0 ttl=47 time=260.245 ms
    64 bytes from 199.91.73.248: icmp_seq=1 ttl=47 time=252.889 ms
    64 bytes from 199.91.73.248: icmp_seq=2 ttl=47 time=252.402 ms
    64 bytes from 199.91.73.248: icmp_seq=3 ttl=47 time=258.687 ms
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5781 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 40ms · UTC 01:56 · PVG 09:56 · LAX 18:56 · JFK 21:56
    ♥ Do have faith in what you're doing.