Project

General

Profile

Actions

Bug #786

closed

Wt::WServer problem on FreeBSD

Added by Mamadou Babaei over 13 years ago. Updated over 13 years ago.

Status:
Closed
Priority:
Urgent
Assignee:
-
Target version:
Start date:
04/10/2011
Due date:
% Done:

0%

Estimated time:

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

Actions #1

Updated by Koen Deforche over 13 years ago

Hey,

I see the following statement missing:

  server.addEntryPoint(Wt::Application, createApplication);

Regards,

koen

Actions #2

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.

Actions #3

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.

Actions #4

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

Actions #5

Updated by Koen Deforche over 13 years ago

  • Status changed from New to Resolved
Actions #6

Updated by Koen Deforche over 13 years ago

  • Target version set to 3.1.10
Actions #7

Updated by Koen Deforche over 13 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF