v2ex 这是bug嘛?

2012-07-18 16:42:18 +08:00
 shao
有两个图片打不开,显示如下。
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
3182 次点击
所在节点    V2EX
13 条回复
yetone
2012-07-18 16:48:32 +08:00
我这里正常显示。
另,问一下 @Livid ,V2EX 是如何部署的,竟然能看到这么详细的出错信息。
reorx
2012-07-18 16:51:37 +08:00
@yetone 这只是正常的 tornado traceback 信息,没有经过特别的部署。
yetone
2012-07-18 17:04:14 +08:00
@reorx 嗯,我知道,我的意思是,用 uwsgi 等方式正常部署的情况下不会显示任何错误信息,难道 V2EX 是直接 python run.py ?
kingwrcy
2012-07-18 17:09:14 +08:00
shao
2012-07-18 17:11:33 +08:00
结果就是banners图片看不到,回复那个图片看不到。
fanzeyi
2012-07-18 17:29:17 +08:00
@yetone debug: True

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

猜测可能用的是StaticFileHandler,见:http://www.tornadoweb.org/documentation/_modules/tornado/web.html#StaticFileHandler
ewex
2012-07-18 20:05:17 +08:00
难道是图片防盗链设置?
yetone
2012-07-18 21:34:56 +08:00
@fanzeyi
@reorx 被你们诱惑地我都想试试Tornado了 ;)
Livid
2012-07-18 22:47:53 +08:00
这种情况很奇怪,因为 static.v2ex.com 这个域上就根本没有 Tornado,而只有 nginx。

楼主你 ping static.v2ex.com 看到的 IP 是多少?
Kai
2012-07-18 23:13:16 +08:00
V2EX DNS 么?
kingwrcy
2012-07-19 09:02:09 +08:00
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
2012-07-21 23:58:42 +08:00
@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

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/42726

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX