【问题标题】:502 Bad gateway - django/cherrypy HTTP reverse proxy Round Robin on Cherokee502 网关错误 - Cherokee 上的 django/cherrypy HTTP 反向代理循环
【发布时间】:2011-09-20 07:23:39
【问题描述】:

所以我安装了 cherokee 并将 django-cpserver 包含到我的 django 应用程序中。

然后,我跑了

python manage.py runcpserver daemonize=1 port=3035 pidfile=/var/run/django/cherrypy.pid-1 threads=1 request_queue_size=0

并重复这些命令以生成 10 个进程cherrypy.pid-1、cherrypy.pid-2 等、cherrypy.pid-10。

在我的 cherokee admin 上,我将这 10 个信息源映射到我的 django 实例:-

但是,在重新启动 cherokee 后,它只是给了我一个 502 bad gateway 错误,查看我的 cherokee.error 日志,我看到一系列错误:-

{'type': "warning", 'time': "20/09/2011 06:39:26.264", 
'title': "Taking source='localhost:3042' back on-line", 
'code': "balancer_round_robin.c:170", 
'error': "63", 'description': "The information source is being disabled.", 
'version': "1.2.99", 'compilation_date': "Sep 16 2011 00:35:11", 
'configure_args': " '--prefix=/usr' '--sysconfdir=/etc' '--localstatedir=/var' '--disable-static' '--with-wwwroot=/srv/http' '--with-wwwuser=http' '--with-wwwgroup=http' '--with-python=python2' '--enable-os-string=Arch Linux' 'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2' 'LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro,--hash-style=gnu' '--prefix=/usr' '--sysconfdir=/etc' '--localstatedir=/var' '--disable-static' '--with-wwwroot=/srv/http' '--with-wwwuser=http' '--with-wwwgroup=http' '--with-python=python2' '--enable-os-string=Arch Linux' 'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2' 'LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro,--hash-style=gnu'", 
'backtrace': ""}

我不确定我的配置做错了什么。将不胜感激任何指引我朝着正确的方向解决这个“502 网关错误”问题。

(我应该补充一点,如果我在 cherokee 上使用 django 的标准 scgi 部署配置,一切正常。但我想弄清楚如何使用 cherrypy 作为反向代理在 cherokee 上部署 django。)

【问题讨论】:

    标签: django webserver cherrypy cherokee


    【解决方案1】:

    问题解决了。指定内部IP,一切正常!

    【讨论】:

      猜你喜欢
      • 2021-11-01
      • 2021-04-09
      • 1970-01-01
      • 2021-05-28
      • 1970-01-01
      • 2013-06-23
      • 1970-01-01
      • 2020-09-29
      • 2012-07-16
      相关资源
      最近更新 更多