Project

General

Profile

Wt + wtfcgi + nginx

Added by conrad bielski almost 11 years ago

Hello Everyone,

I have seen several posts on this combination which don't seem to have the answer posted. The examples compiled no problem with the Wtfcgi connector and I wanted to get them running with Nginx since this is eventually how I would like to deploy my services. I followed the help found on this page: http://redmine.webtoolkit.eu/projects/wt/wiki/Fastcgi_on_nginx , which were very helpful to get me going. However, when everything is up and running, instead of getting the hello.wt webpage, I get the following (error) message in the browser:

Error occurred.

Error parsing CGI request: Bad content-length .

I'm using Wt.3.3.2-rc1. The problem is that Nginx is working for the default page, but when I point it to address/hello.wt the following information is sent by wt (last two lines) whereas nginx doesn't produce an error:

$ spawn-fcgi -n -f ../../build/examples/hello/hello.wt -a 127.0.0.1 -p 9091

[2014-Feb-26 17:05:56.504672] 32620 - [info] "WServer/wtfcgi: initializing relay server"

[2014-Feb-26 17:05:56.505561] 32620 - [info] "config: reading Wt config file: /etc/wt/wt_config.xml (location = '../../build/examples/hello/hello.wt')"

[2014-Feb-26 17:05:56.506902] 32620 - [info] "wtfcgi: spawned session process: pid = 32621"

[2014-Feb-26 17:05:56.507306] 32620 - [info] "wtfcgi: reading FastCGI stream from stdin"

[2014-Feb-26 17:05:56.528815] 32621 - [info] "config: reading Wt config file: /etc/wt/wt_config.xml (location = '../../build/examples/hello/hello.wt')"

[2014-Feb-26 17:05:56.529352] 32621 - [info] "WServer/wtfcgi: initializing shared wtfcgi session process"

[2014-Feb-26 17:06:22.336005] 32621 - [error] "WebRequest: Bad content-length: "

[2014-Feb-26 17:06:22.336133] 32621 - [error] "WebController: could not parse request: Bad content-length"

To me it seems that the fcgi process is correctly spawned and Nginx doesn't produce any errors either.

Can somebody point me to the fix for this? Very much appreciated. Or is it related to RC1?

Have a great day,

Conrad :)


Replies (4)

RE: Wt + wtfcgi + nginx - Added by conrad bielski almost 11 years ago

Update.

So I tested with Wt 3.3.2.RC2: same errors.

Then I tested with 3.3.1 and it worked!

So would this be considered a bug?

Have a great day,

Conrad :)

RE: Wt + wtfcgi + nginx - Added by Koen Deforche almost 11 years ago

Hey,

That indeed sounds like a bug. We tested with apache fcgi, but not with nginx, even though I cannot imagine what could be that different.

Regards,

Koen

RE: Wt + wtfcgi + nginx - Added by Koen Deforche almost 11 years ago

Hey,

This has been fixed in git, and will be fixed for 3.3.2.

Regards,

koen

RE: Wt + wtfcgi + nginx - Added by conrad bielski almost 11 years ago

Thanks.

I'll start testing from git then.

Have a great day,

Conrad :)

    (1-4/4)