benluteijn / cherokee

Automatically exported from code.google.com/p/cherokee
0 stars 1 forks source link

Reverse proxy HTTP error 500 #261

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Sometimes I receive HTTP error 500 when connecting to Information Source
using reverse proxy. It seems to be undeterministic bug. Happens for both
GET and POST. Information Source server returns 200 for such requests so it
is Cherokee issue.

OS: FreeBSD 7.0 amd64

Original issue reported on code.google.com by type...@gmail.com on 4 Dec 2008 at 4:51

GoogleCodeExporter commented 9 years ago
Thanks for reporting, I'll check it out!

Original comment by alobbs on 4 Dec 2008 at 4:57

GoogleCodeExporter commented 9 years ago
I am also having this kind of issue. I use the set up I have describes there.
http://yml-blog.blogspot.com/2009/02/serving-django-via-cherrypy-behind.html

Do you have any idea of what the pb could be ?
Thanks
--yml

Original comment by yann.ma...@gmail.com on 1 Mar 2009 at 3:44

GoogleCodeExporter commented 9 years ago
use cherrypy wsgi server, when do any POST -  got 500

Original comment by slav0n...@gmail.com on 6 Mar 2009 at 8:31

GoogleCodeExporter commented 9 years ago
I'm getting this issue, too.  Seems to occur very frequently.

I have Cherokee/0.99.3 and lighttpd/1.4.20 on the same box.  Cherokee listens 
on port 80, lighty listens on 
port 81.  81 is firewalled so the rest of the world can't access it.

I'm using "HTTP Reverse Proxy" to send all *.php requests to lighty at 
127.0.0.1:81.  From there, FastCGI 
requests go to the proper machine.

OS is FreeBSD/i386 7.0-R.

Original comment by paganlad...@gmail.com on 12 Mar 2009 at 9:00

GoogleCodeExporter commented 9 years ago
r2971 tries to address the issue.

I took my a while to reproduce the problem. The latest trunk revision (r2971 at 
this moment) works alright for 
me. Could you please guys confirm?

Thanks!

Original comment by alobbs on 13 Mar 2009 at 9:46

GoogleCodeExporter commented 9 years ago
Still getting it with r2973.  :(

Original comment by paganlad...@gmail.com on 13 Mar 2009 at 6:09

GoogleCodeExporter commented 9 years ago
I try the same test again and I still cannot POST using HTTP reverse proxy. The
configuration I used is the one describes in this blog post :
http://yml-blog.blogspot.com/2009/02/serving-django-via-cherrypy-behind.html

I have tested with 0.99.4 from the ppa.

Please do not hesitate to let me know if you need more information.
Regards,
--yml

Original comment by yann.ma...@gmail.com on 14 Mar 2009 at 1:02

GoogleCodeExporter commented 9 years ago
paganladyserena, everything seems to work alright now.. I've spent half and 
hour trying to make it fail, but I 
haven't seen one single error message.  How can I reproduce it?

Original comment by alobbs on 16 Mar 2009 at 10:29

GoogleCodeExporter commented 9 years ago
yml, I think I've found the problem you hit with Django.
Could you please test tunk (>=2976)?

Original comment by alobbs on 16 Mar 2009 at 12:19

GoogleCodeExporter commented 9 years ago
I have just tested with 2978 and I confirm that this issue is not fixed at that
stage. I have configure cherokee using this command : 

./autogen.sh --prefix=/usr --sysconfdir=/etc --localstatedir=/var
--enable-static-module=all --enable-static --enable-shared=no --enable-beta
--enable-trace

Please do not hesitate to let me know if you need more information.

Original comment by yann.ma...@gmail.com on 16 Mar 2009 at 7:46

GoogleCodeExporter commented 9 years ago
Could you guys please check whether the problem is fixed in 0.99.5?
I have fixed a couple of important bugs in the reverse proxy, although I'm not 
sure any of them was the bug you 
hit.

Original comment by alobbs on 18 Mar 2009 at 9:57

GoogleCodeExporter commented 9 years ago
Hello,
I have tested with r2985 and the configuration describe above and I still get 
the
error below when I try to post a form:
"""
500 Internal Server Error
Cherokee web server 0.99.4b2985 (UNIX), Port 80 
"""

I am attaching to this comment the trace I have collected using this command :
"""
sudo CHEROKEE_TRACE=all cherokee-worker 2>&1 >/tmp/dump_for_alo.txt
"""

Please do not hesitate to let me know if I could provide other useful 
information.

Original comment by yann.ma...@gmail.com on 18 Mar 2009 at 1:27

Attachments:

GoogleCodeExporter commented 9 years ago
Here is where it fails (~line 11603):

   handler_proxy.c:0736 (   cherokee_handler_proxy_init): Entering phase 'send post'
            post.c:0418 (      cherokee_post_walk_to_fd): errno 32
   handler_proxy.c:0571 (                     send_post): Sending POST fd=16, ret=-1

error 32 is 'Broken pipe'. At first look, it seems that the back-end closed the 
connection.
Further investigation is need.. 

Original comment by alobbs on 18 Mar 2009 at 1:43

GoogleCodeExporter commented 9 years ago
I have just tested with 0.99.6 and I can still observe this bug. It is 
impossible to
post a form without getting :
"""
500 Internal Server Error
Cherokee web server 0.99.6 (Debian GNU/Linux), Port 80 
"""

Also I have observed that once I get this error page if I press "F5" and 
"Resend" the
form is submited and the object is created.

Original comment by yann.ma...@gmail.com on 26 Mar 2009 at 12:25

GoogleCodeExporter commented 9 years ago
This issue is being quite hard to reproduce, actually..
I've been testing with the following example (find it attached), and everything 
seems to work file for both 
servers:

- python manage.py runcpserver port=8000
"CherryPy/3.1.1 WSGI Server" accept the POSTs just fine

- python manage.py runserver
"WSGIServer/0.1 Python/2.5.1" does as well.

The only minor issue I found is that CherryPy bound to ::1, while WSGIServer 
bound to 127.0.0.1.  Besides that 
little difference, everything worked fine.

Guys, I'm afraid I'll need some other hint to reproduce the problem.

Original comment by alobbs on 27 Mar 2009 at 9:31

GoogleCodeExporter commented 9 years ago
Oops! I forgot the tarball..

Original comment by alobbs on 27 Mar 2009 at 9:34

Attachments:

GoogleCodeExporter commented 9 years ago
I've just fixed a couple of minor bugs in the proxy.. (>= r3020)
I don't know whether or not it has some impact on this issue.

Original comment by alobbs on 27 Mar 2009 at 12:43

GoogleCodeExporter commented 9 years ago
I have just tested with the version 0.99.7 and I see some amelioration. I 
haven't got
any 500 error when Keep Alive is switched off. However I am getting some 500 
error
when keep alive is one and if I don't fill up the form fast enought.

--yml

Original comment by yann.ma...@gmail.com on 28 Mar 2009 at 5:44

GoogleCodeExporter commented 9 years ago
That's because of a CherryPy bug:

 http://groups.google.com/group/cherrypy-users/browse_thread/thread/e751976da1d01390
 http://www.cherrypy.org/ticket/853

So I guess that we have already addressed the problem at our side.
Shall I consider this bug fixed?

Original comment by alobbs on 30 Mar 2009 at 8:46

GoogleCodeExporter commented 9 years ago
I think yes, as far as concern I do not see any issue related to cherokeee now.
Thank for fixing them.
--yml

Original comment by yann.ma...@gmail.com on 30 Mar 2009 at 12:22

GoogleCodeExporter commented 9 years ago
Thank you guys for reporting!
Without your feedback I couldn't have fixed the issues :-)

Original comment by alobbs on 30 Mar 2009 at 4:51