Bug #786
closedWt::WServer problem on FreeBSD
0%
Description
Hi,
When in main function I run my application using
return WRun(argc, argv, &CreateApplication);
I works fine.
But when I run my app using
Wt::WServer server(argv[0]);
server.setServerConfiguration(argc, argv, WTHTTP_CONFIGURATION);
if (server.start()) {
Wt::WServer::waitForShutdown();
server.stop();
}
return 0;
In FreeBSD it gives me:
Reading: /etc/wt/wt_config.xml
[2011-Apr-10 17:43:23.220448] 3601 - [notice] "Wt: initializing FastCGI session process manager"
[2011-Apr-10 17:43:23.220688] 3601 - [notice] "Reading Wt config file: /etc/wt/wt_config.xml (location = '/srv/babaei.net/www/root.fcgi')"
[2011-Apr-10 17:43:23.222095] 3601 - [notice] "Spawned session process: pid = 3602"
[2011-Apr-10 17:43:23.223526] 3601 - [notice] "Reading FastCGI stream from stdin"
Reading: /etc/wt/wt_config.xml
[2011-Apr-10 17:43:23.254075] 3602 - [notice] "Wt: initializing session process"
[2011-Apr-10 17:43:23.254444] 3602 - [notice] "Reading Wt config file: /etc/wt/wt_config.xml (location = '/srv/babaei.net/www/root.fcgi')"
[2011-Apr-10 17:43:31.079647] 3601 - [error] "Error reading from application"
[2011-Apr-10 17:43:31.080911] 3601 - [notice] "Caught SIGCHLD: pid=3602, stat=139"
[2011-Apr-10 17:43:31.081542] 3601 - [notice] "Spawned session process: pid = 3603"
Reading: /etc/wt/wt_config.xml
[2011-Apr-10 17:43:31.107982] 3603 - [notice] "Wt: initializing session process"
[2011-Apr-10 17:43:31.108206] 3603 - [notice] "Reading Wt config file: /etc/wt/wt_config.xml (location = '/srv/babaei.net/www/root.fcgi')"
Using the second method on Gentoo is just works fine.
I'm using nginx + spawn-fcgi on both FreeBSD and Gentoo.
I'm using this configuration:
http://redmine.webtoolkit.eu/projects/wt/wiki/Fastcgi_on_nginx
Updated by Koen Deforche over 13 years ago
Hey,
I see the following statement missing:
server.addEntryPoint(Wt::Application, createApplication);
Regards,
koen
Updated by Mamadou Babaei over 13 years ago
I'm so so Sorry!! My mistake, I had this line
server.addEntryPoint(Wt::Application, CreateApplication, "", "favicon.ico");
for all of my projects. I didn't know how I did drop that.
Sorry again.
Updated by Wim Dumon over 13 years ago
Is the issue resolved?
If not, the implementation of WRun() as used in fcgi is in wt-x.y.z/src/fcgi/Server.C. If WRun works and instantiating your own server doesn't, then compare your own implementation to that implementation of WRun.
BR,
Wim.
Updated by Mamadou Babaei over 13 years ago
Yes, Thanks, It was resolved and works fine. That was my mistake, Accidentally I dropped that line.
Any way thanks again.
Best Regards,
M.S. Babaei
Updated by Koen Deforche over 13 years ago
- Status changed from Resolved to Closed