我正试图让一个网站再次运行,它失去了一名开发人员和大量无证信息——迫切需要帮助。该站点正在使用以下配置,我的感觉是我没有正确启动cherrypy(cherryd?)。
该站点未使用基于名称的虚拟主机,使用 IP 地址一切正常/运行良好。我们没有使用 mod_python,cherrypy 不是以 apache 开头的。
我们通过.htaccess 中的重写规则将一些请求路由到cherrypy
RewriteRule ^ip/(.*) http://127.0.0.1:8081/$1 [proxy]
配置文件:(cpconfig.conf)
[global]
server.socket_port = 8081
启动cherryd的命令对我不起作用:
cherryd -d -i imageproc -c cpconfig.conf
Cherrypy 似乎开始:
ENGINE Listening for SIGHUP.
ENGINE Listening for SIGTERM.
ENGINE Listening for SIGUSR1.
ENGINE Bus STARTING
ENGINE Started monitor thread '_TimeoutMonitor'.
ENGINE Started monitor thread 'Autoreloader'.
ENGINE Serving on 127.0.0.1:8081
ENGINE Bus STARTED
我们的大多数应用程序都可以正常工作。该应用程序是一种设计工具,它使用输入和图像上传来在屏幕上呈现图像。文本输入工作正常。但是,当我们使用应用程序的文件上传部分时,文件似乎正在上传(根据 chrome 的进度指示器),然后它只是等待、超时并最终返回 502 代理错误?
在此等待/超时期间,我可以使用其他文本输入等,并且cherrypy 服务器快速响应.. 它只是在图像上窒息。
这是 Apache 显示的内容。长编码 URL 表示对画布上图像的更改,所有这些都返回 OK。但是随后文件上传失败..
[Tue Jan 22 19:56:11 2013] [debug] proxy_util.c(1513): [client 67.176.56.45] proxy: *: found reverse proxy worker for http://127.0.0.1:8081/render?w=805&h=470&z=0.2&l=%5B%7B%22t%22%3A%2233%22%2C%22b%22%3Afalse%2C%22i%22%3Afalse%2C%22u%22%3Afalse%2C%22a%22%3A%22c%22%2C%22fs%22%3A11%2C%22f%22%3A0%2C%22x%22%3A0%2C%22y%22%3A0%2C%22arc%22%3Afalse%2C%22o%22%3A0%2C%22r%22%3A0%2C%22cw%22%3Atrue%7D%2C%7B%22t%22%3A%22%22%2C%22b%22%3Afalse%2C%22i%22%3Afalse%2C%22u%22%3Afalse%2C%22a%22%3A%22c%22%2C%22fs%22%3A11%2C%22f%22%3A0%2C%22x%22%3A0%2C%22y%22%3A0%2C%22arc%22%3Afalse%2C%22o%22%3A0%2C%22r%22%3A0%2C%22cw%22%3Atrue%7D%2C%7B%22t%22%3A%22%22%2C%22b%22%3Afalse%2C%22i%22%3Afalse%2C%22u%22%3Afalse%2C%22a%22%3A%22c%22%2C%22fs%22%3A11%2C%22f%22%3A0%2C%22x%22%3A0%2C%22y%22%3A0%2C%22arc%22%3Afalse%2C%22o%22%3A0%2C%22r%22%3A0%2C%22cw%22%3Atrue%7D%2C%7B%22t%22%3A%22%22%2C%22b%22%3Afalse%2C%22i%22%3Afalse%2C%22u%22%3Afalse%2C%22a%22%3A%22c%22%2C%22fs%22%3A11%2C%22f%22%3A0%2C%22x%22%3A0%2C%22y%22%3A0%2C%22arc%22%3Afalse%2C%22o%22%3A0%2C%22r%22%3A0%2C%22cw%22%3Atrue%7D%2C%7B%22t%22%3A%22%22%2C%22b%22%3Afalse%2C%22i%22%3Afalse%2C%22u%22%3Afalse%2C%22a%22%3A%22c%22%2C%22fs%22%3A11%2C%22f%22%3A0%2C%22x%22%3A0%2C%22y%22%3A0%2C%22arc%22%3Afalse%2C%22o%22%3A0%2C%22r%22%3A0%2C%22cw%22%3Atrue%7D%2C%7B%22t%22%3A%22%22%2C%22b%22%3Afalse%2C%22i%22%3Afalse%2C%22u%22%3Afalse%2C%22a%22%3A%22c%22%2C%22fs%22%3A11%2C%22f%22%3A0%2C%22x%22%3A0%2C%22y%22%3A0%2C%22arc%22%3Afalse%2C%22o%22%3A0%2C%22r%22%3A0%2C%22cw%22%3Atrue%7D%5D&g=%5B%5D&b=, referer: http://97.107.141.248/design/new/1209
[Tue Jan 22 19:56:11 2013] [debug] mod_proxy.c(993): Running scheme http handler (attempt 0)
[Tue Jan 22 19:56:11 2013] [debug] mod_proxy_http.c(1940): proxy: HTTP: serving URL http://127.0.0.1:8081/render?w=805&h=470&z=0.2&l=%5B%7B%22t%22%3A%2233%22%2C%22b%22%3Afalse%2C%22i%22%3Afalse%2C%22u%22%3Afalse%2C%22a%22%3A%22c%22%2C%22fs%22%3A11%2C%22f%22%3A0%2C%22x%22%3A0%2C%22y%22%3A0%2C%22arc%22%3Afalse%2C%22o%22%3A0%2C%22r%22%3A0%2C%22cw%22%3Atrue%7D%2C%7B%22t%22%3A%22%22%2C%22b%22%3Afalse%2C%22i%22%3Afalse%2C%22u%22%3Afalse%2C%22a%22%3A%22c%22%2C%22fs%22%3A11%2C%22f%22%3A0%2C%22x%22%3A0%2C%22y%22%3A0%2C%22arc%22%3Afalse%2C%22o%22%3A0%2C%22r%22%3A0%2C%22cw%22%3Atrue%7D%2C%7B%22t%22%3A%22%22%2C%22b%22%3Afalse%2C%22i%22%3Afalse%2C%22u%22%3Afalse%2C%22a%22%3A%22c%22%2C%22fs%22%3A11%2C%22f%22%3A0%2C%22x%22%3A0%2C%22y%22%3A0%2C%22arc%22%3Afalse%2C%22o%22%3A0%2C%22r%22%3A0%2C%22cw%22%3Atrue%7D%2C%7B%22t%22%3A%22%22%2C%22b%22%3Afalse%2C%22i%22%3Afalse%2C%22u%22%3Afalse%2C%22a%22%3A%22c%22%2C%22fs%22%3A11%2C%22f%22%3A0%2C%22x%22%3A0%2C%22y%22%3A0%2C%22arc%22%3Afalse%2C%22o%22%3A0%2C%22r%22%3A0%2C%22cw%22%3Atrue%7D%2C%7B%22t%22%3A%22%22%2C%22b%22%3Afalse%2C%22i%22%3Afalse%2C%22u%22%3Afalse%2C%22a%22%3A%22c%22%2C%22fs%22%3A11%2C%22f%22%3A0%2C%22x%22%3A0%2C%22y%22%3A0%2C%22arc%22%3Afalse%2C%22o%22%3A0%2C%22r%22%3A0%2C%22cw%22%3Atrue%7D%2C%7B%22t%22%3A%22%22%2C%22b%22%3Afalse%2C%22i%22%3Afalse%2C%22u%22%3Afalse%2C%22a%22%3A%22c%22%2C%22fs%22%3A11%2C%22f%22%3A0%2C%22x%22%3A0%2C%22y%22%3A0%2C%22arc%22%3Afalse%2C%22o%22%3A0%2C%22r%22%3A0%2C%22cw%22%3Atrue%7D%5D&g=%5B%5D&b=
[Tue Jan 22 19:56:11 2013] [debug] proxy_util.c(1999): proxy: HTTP: has acquired connection for (*)
[Tue Jan 22 19:56:11 2013] [debug] proxy_util.c(2055): proxy: connecting http://127.0.0.1:8081/render?w=805&h=470&z=0.2&l=%5B%7B%22t%22%3A%2233%22%2C%22b%22%3Afalse%2C%22i%22%3Afalse%2C%22u%22%3Afalse%2C%22a%22%3A%22c%22%2C%22fs%22%3A11%2C%22f%22%3A0%2C%22x%22%3A0%2C%22y%22%3A0%2C%22arc%22%3Afalse%2C%22o%22%3A0%2C%22r%22%3A0%2C%22cw%22%3Atrue%7D%2C%7B%22t%22%3A%22%22%2C%22b%22%3Afalse%2C%22i%22%3Afalse%2C%22u%22%3Afalse%2C%22a%22%3A%22c%22%2C%22fs%22%3A11%2C%22f%22%3A0%2C%22x%22%3A0%2C%22y%22%3A0%2C%22arc%22%3Afalse%2C%22o%22%3A0%2C%22r%22%3A0%2C%22cw%22%3Atrue%7D%2C%7B%22t%22%3A%22%22%2C%22b%22%3Afalse%2C%22i%22%3Afalse%2C%22u%22%3Afalse%2C%22a%22%3A%22c%22%2C%22fs%22%3A11%2C%22f%22%3A0%2C%22x%22%3A0%2C%22y%22%3A0%2C%22arc%22%3Afalse%2C%22o%22%3A0%2C%22r%22%3A0%2C%22cw%22%3Atrue%7D%2C%7B%22t%22%3A%22%22%2C%22b%22%3Afalse%2C%22i%22%3Afalse%2C%22u%22%3Afalse%2C%22a%22%3A%22c%22%2C%22fs%22%3A11%2C%22f%22%3A0%2C%22x%22%3A0%2C%22y%22%3A0%2C%22arc%22%3Afalse%2C%22o%22%3A0%2C%22r%22%3A0%2C%22cw%22%3Atrue%7D%2C%7B%22t%22%3A%22%22%2C%22b%22%3Afalse%2C%22i%22%3Afalse%2C%22u%22%3Afalse%2C%22a%22%3A%22c%22%2C%22fs%22%3A11%2C%22f%22%3A0%2C%22x%22%3A0%2C%22y%22%3A0%2C%22arc%22%3Afalse%2C%22o%22%3A0%2C%22r%22%3A0%2C%22cw%22%3Atrue%7D%2C%7B%22t%22%3A%22%22%2C%22b%22%3Afalse%2C%22i%22%3Afalse%2C%22u%22%3Afalse%2C%22a%22%3A%22c%22%2C%22fs%22%3A11%2C%22f%22%3A0%2C%22x%22%3A0%2C%22y%22%3A0%2C%22arc%22%3Afalse%2C%22o%22%3A0%2C%22r%22%3A0%2C%22cw%22%3Atrue%7D%5D&g=%5B%5D&b= to 127.0.0.1:8081
[Tue Jan 22 19:56:11 2013] [debug] proxy_util.c(2153): proxy: connected /render?w=805&h=470&z=0.2&l=%5B%7B%22t%22%3A%2233%22%2C%22b%22%3Afalse%2C%22i%22%3Afalse%2C%22u%22%3Afalse%2C%22a%22%3A%22c%22%2C%22fs%22%3A11%2C%22f%22%3A0%2C%22x%22%3A0%2C%22y%22%3A0%2C%22arc%22%3Afalse%2C%22o%22%3A0%2C%22r%22%3A0%2C%22cw%22%3Atrue%7D%2C%7B%22t%22%3A%22%22%2C%22b%22%3Afalse%2C%22i%22%3Afalse%2C%22u%22%3Afalse%2C%22a%22%3A%22c%22%2C%22fs%22%3A11%2C%22f%22%3A0%2C%22x%22%3A0%2C%22y%22%3A0%2C%22arc%22%3Afalse%2C%22o%22%3A0%2C%22r%22%3A0%2C%22cw%22%3Atrue%7D%2C%7B%22t%22%3A%22%22%2C%22b%22%3Afalse%2C%22i%22%3Afalse%2C%22u%22%3Afalse%2C%22a%22%3A%22c%22%2C%22fs%22%3A11%2C%22f%22%3A0%2C%22x%22%3A0%2C%22y%22%3A0%2C%22arc%22%3Afalse%2C%22o%22%3A0%2C%22r%22%3A0%2C%22cw%22%3Atrue%7D%2C%7B%22t%22%3A%22%22%2C%22b%22%3Afalse%2C%22i%22%3Afalse%2C%22u%22%3Afalse%2C%22a%22%3A%22c%22%2C%22fs%22%3A11%2C%22f%22%3A0%2C%22x%22%3A0%2C%22y%22%3A0%2C%22arc%22%3Afalse%2C%22o%22%3A0%2C%22r%22%3A0%2C%22cw%22%3Atrue%7D%2C%7B%22t%22%3A%22%22%2C%22b%22%3Afalse%2C%22i%22%3Afalse%2C%22u%22%3Afalse%2C%22a%22%3A%22c%22%2C%22fs%22%3A11%2C%22f%22%3A0%2C%22x%22%3A0%2C%22y%22%3A0%2C%22arc%22%3Afalse%2C%22o%22%3A0%2C%22r%22%3A0%2C%22cw%22%3Atrue%7D%2C%7B%22t%22%3A%22%22%2C%22b%22%3Afalse%2C%22i%22%3Afalse%2C%22u%22%3Afalse%2C%22a%22%3A%22c%22%2C%22fs%22%3A11%2C%22f%22%3A0%2C%22x%22%3A0%2C%22y%22%3A0%2C%22arc%22%3Afalse%2C%22o%22%3A0%2C%22r%22%3A0%2C%22cw%22%3Atrue%7D%5D&g=%5B%5D&b= to 127.0.0.1:8081
[Tue Jan 22 19:56:11 2013] [debug] proxy_util.c(2308): proxy: HTTP: fam 2 socket created to connect to *
[Tue Jan 22 19:56:11 2013] [debug] proxy_util.c(2414): proxy: HTTP: connection complete to 127.0.0.1:8081 (127.0.0.1)
[Tue Jan 22 19:56:11 2013] [debug] mod_proxy_http.c(1723): proxy: start body send
[Tue Jan 22 19:56:11 2013] [debug] mod_proxy_http.c(1816): proxy: end body send
[Tue Jan 22 19:56:11 2013] [debug] proxy_util.c(2017): proxy: HTTP: has released connection for (*)
[Tue Jan 22 19:56:21 2013] [debug] proxy_util.c(1513): [client 67.176.56.45] proxy: *: found reverse proxy worker for http://127.0.0.1:8081/upload, referer: http://97.107.141.248/design/new/1209
[Tue Jan 22 19:56:21 2013] [debug] mod_proxy.c(993): Running scheme http handler (attempt 0)
[Tue Jan 22 19:56:21 2013] [debug] mod_proxy_http.c(1940): proxy: HTTP: serving URL http://127.0.0.1:8081/upload
[Tue Jan 22 19:56:21 2013] [debug] proxy_util.c(1999): proxy: HTTP: has acquired connection for (*)
[Tue Jan 22 19:56:21 2013] [debug] proxy_util.c(2055): proxy: connecting http://127.0.0.1:8081/upload to 127.0.0.1:8081
[Tue Jan 22 19:56:21 2013] [debug] proxy_util.c(2153): proxy: connected /upload to 127.0.0.1:8081
[Tue Jan 22 19:56:21 2013] [debug] proxy_util.c(2308): proxy: HTTP: fam 2 socket created to connect to *
[Tue Jan 22 19:56:21 2013] [debug] proxy_util.c(2414): proxy: HTTP: connection complete to 127.0.0.1:8081 (127.0.0.1)
[Tue Jan 22 20:01:22 2013] [error] [client 67.176.56.45] (70007)The timeout specified has expired: proxy: error reading status line from remote server 127.0.0.1, referer: http://97.107.141.248/design/new/1209
[Tue Jan 22 20:01:22 2013] [debug] mod_proxy_http.c(1401): [client 67.176.56.45] proxy: read timeout, referer: http://97.107.141.248/design/new/1209
[Tue Jan 22 20:01:22 2013] [error] [client 67.176.56.45] proxy: Error reading from remote server returned by /ip/upload, referer: http://97.107.141.248/design/new/1209
[Tue Jan 22 20:01:22 2013] [debug] proxy_util.c(2017): proxy: HTTP: has released connection for (*)
如果有更好的方式来传达日志,请让我知道什么是首选..
不管怎样,8081上没有别的东西在听……
这是否表明应用程序本身存在与图像上传有关的某种错误?我已经尝试将应用程序代码恢复到一切正常的时间点,按照上述(cherryd)杀死并重新启动cherrypy,但它仍然无法正常工作。
新信息: 像这样运行我的应用程序:python imageproc.py
有诀窍,因为我的应用程序中有一个快速启动调用。没有端口问题,图像将上传,一切正常。但是当然关闭术语窗口会终止该过程。所以我仍在寻找正确的方法来让cherrypy离开地面。
就像我说的迫切需要任何指针..谢谢