[Glass] GS3.2.2 Seasise 3.1.2 Zinc FastCGI debugging

Dale Henrichs via Glass glass at lists.gemtalksystems.com
Tue Oct 7 13:30:30 PDT 2014


Jupiter,

I took an Ubuntu 14.04 and installed lighttpd installed GemStone3.2.2 and
created a tode stone and then loaded Seaside3.1.2 using this project entry:

^ TDProjectSpecEntryDefinition new
    configuration: 'Seaside3'
      version: '3.1.2'
      repository:
        'http://www.smalltalkhub.com/mc/Seaside/MetacelloConfigurations/main
'
      loads: #('Development' 'Zinc' 'FastCGI' 'Examples' 'Tests');
    status: #(#'active');
    locked: false;
    yourself

I made this change (so I could start the fast cgi gems from within tode):

  ----- Method: WAGemStoneRunSeasideGems class>>executeGemCommand: (in
category 'running script') -----executeGemCommand: command
    | commandLine |
    Transcript
      cr;
      show: '---' , command , ' Seaside gems' , ' (';
      show: TimeStamp now printString;
      show: ')'.
    commandLine := (GsFile _expandEnvVariable: 'GEMSTONE' isClient: false)
, '/'
+     , 'seaside/bin/runSeasideGems30 ' , command , ' ' , self default name
, ' '
+     , self defaultPortString.
-     , (System stoneName findTokens: $!!) last , '/bin/runSeasideGems30 '
-     , command , ' ' , self default name , ' ' , self defaultPortString.
    Transcript
      cr;
      show: (System performOnServer: commandLine) withSqueakLineEndings.
    Transcript
      cr;
      show: '---Finished Seaside gems ' , command , ' (';
      show: TimeStamp now printString;
      show: ')'!

and has been my luck ... everything works fine ... I was using a single
FastCGI gem and here's the config:


server.modules   += ( "mod_fastcgi", "mod_proxy" )

$HTTP["url"] =~ "^/image/" {
    server.document-root = "/var/www"
#} else $HTTP["url"] =~ "^/seaside" {
} else $HTTP["url"] =~ "^/" {

    fastcgi.server    = (
#        "/seaside" =>
        "/" =>
            (

                ("host" => "192.168.100.131","port" => 9001,"check-local"
=> "disable","mode" => "responder" ),
#                ("host" => "192.168.100.131","port" => 9002,"check-local"
=> "disable","mode" => "responder" ),
#                ("host" => "192.168.100.131","port" => 9003,"check-local"
=> "disable","mode" => "responder" ),
            ),

   )
}

So I am using the ip address of the ubuntu box for lighttpd and the url ...

I guess I would like to see the topaz log for your fastcgi servers to see
if anything obvious shows up ...

Dale

On Tue, Oct 7, 2014 at 9:39 AM, Dale Henrichs <
dale.henrichs at gemtalksystems.com> wrote:

>
>
> On Mon, Oct 6, 2014 at 3:12 PM, Jupiter Jones <jupiter.jones at mail.com>
> wrote:
>
>> Hi Dale,
>>
>> Sorry for the delay.
>>
>> Yes this is exactly how I’m setup. I’m sure this is something simple I’ve
>> missed.
>>
>> I have 2 identical machines - ubuntu 14.04, GSS3.2.2, lighted, fast cgi,
>> seaside 3.1.2.
>>
>> The first linux server I loaded everything into GSS through a tODE
>> “project load myProject” command and works like a dream. Well, almost :)
>> Debugging was an issue as all the bebugging/walkback handlers either
>> crashed the process with the good old “can't send call:...” message,
>>
>
> I'm not familiare the "good old "can't send call:" message":) A little
> more detail (and a stack if you have one) ... I assume when you say
> "Debugging" that you are attempting to run the fastcgi server from within a
> tODE session? If so, then I would like to see the expression you use to
> start FastCGI...
>
>
>> or I simply got a page back with “Internal Error:” but no explanation.
>>
>
> For debugging "Internal Error:"  pages and the like, I have a helper
> method:
>
>   WABasicDevelopment setBreakPoints
>
> That sets breakpoints in a number of strategic places in the Seaside
> framework and that should bring up a debugger for the "Internal Error:"
> case ...
>
> I'm also wondering which error handler you are using. Print the following:
>
>   WAAdmin applicationExceptionHandlingDefaults at: #'exceptionHandler'
>
> and let me know.
>
>
>> Debugging through zinc works as expected.
>>
>
>> The second linux server if the same config, however, the repository was
>> restored on linux from a backup on mac - and FastCGI doesn’t work but Zinc
>> does.
>>
>> I start the fcgi server (runSeasideGems30 start FastCGI “9001 9002 9003”)
>> and can see the server has started and is listening on the right ports.
>>
>> I hit the seaside site and Lighttpd reports:
>> 2014-10-06 10:02:21: (mod_fastcgi.c.3032) got proc: pid: 0 socket: tcp:
>> 127.0.0.1:9003 load: 1
>> 2014-10-06 10:02:50: (mod_fastcgi.c.2540) unexpected end-of-file (perhaps
>> the fastcgi process died): pid: 0 socket: tcp:127.0.0.1:9003
>> 2014-10-06 10:02:50: (mod_fastcgi.c.3326) response not received, request
>> sent: 715 on socket: tcp:127.0.0.1:9003 for /?, closing connection
>> 2014-10-06 10:02:50: (mod_fastcgi.c.1491) released proc: pid: 0 socket:
>> tcp:127.0.0.1:9003 load: 0
>>
>
> Okay, these error messages indicate that lighttpd is able to hit port 9003
> ... getting the EOF implies that the thread or process was killed ...  I am
> suspicious that there might be other processes already listening on the
> socket ...
>
> I'll try to spend some time today and bring up FastCGI in my environment
> and see if I can figure anything out ...
>
>>
>> None of the fcgi processes crash, or log anything, just lighttpd reports
>> a 500 - Internal Server Error.
>>
>> After a little hunting, I tried FSLog  enable (I updated the log path but
>> then realised it’s not used) however nothing is written to stdout or added
>> to the ObjectLog.
>>
>> Although this scenario (backup on mac / restore on linux) is not our
>> standard practice, it is something I do occasionally and I’d like to work
>> out what I’ve done wrong.
>>
>> Thanks for any advice.
>>
>> Cheers,
>>
>> J
>>
>>
>>
>>
>> On 19 Sep 2014, at 10:27 am, Dale Henrichs <
>> dale.henrichs at gemtalksystems.com> wrote:
>>
>> Juptier,
>>
>> If you are using fastCGI, then you should be using the FastCGI adaptor.
>>
>> If you haven't already loaded the FastCGI packages,  add  'FastCGI' to
>> your load list for the Seaside3 project entry:
>>
>> ^ TDProjectSpecEntryDefinition new
>>     configuration: 'Seaside3'
>>       version: '3.1.3'
>>       repository:
>>         '
>> http://www.smalltalkhub.com/mc/Seaside/MetacelloConfigurations/main'
>>       loads: #('Development' 'Zinc' 'Examples' 'Tests'  'FastCGI');
>>     status: #(#'active');
>>     locked: false;
>>     yourself
>>
>> Then refresh the project list and use the 'load' menu item to load the
>> Seaside3 project and the code for FastCGI will be loaded ...
>>
>> Then you can register and launch a fastCGI server using the following
>>
>>   cd /home/seaside
>>   ./webServer --stop                                           # stop
>> running zinc server
>>   ./webServer --register=fastcgi --port=9003  # register the fastcgi
>> adaptor
>>   ./webServer --start                                           # start
>> the fastcgi server
>>
>> Note that the webServer script only adds a single server/port ... if you
>> want to launch several fastCGI servers, I can update the webServer script...
>>
>> Dale
>>
>> On Thu, Sep 18, 2014 at 5:07 PM, Jupiter Jones via Glass <
>> glass at lists.gemtalksystems.com> wrote:
>>
>>> Hi All,
>>>
>>> I am attempting to deploy a testing server on ubuntu and everything
>>> installs and starts up nicely. From tODE i can start the web server and
>>> connect, however when connecting via FastCGI I get a 500 - Internal Server
>>> error.
>>>
>>> The only log entry appears to be in lighttpd error.log…
>>>
>>> 2014-09-18 23:47:10: (mod_fastcgi.c.3032) got proc: pid: 0 socket: tcp:
>>> 127.0.0.1:9003 load: 1
>>> 2014-09-18 23:47:39: (mod_fastcgi.c.2540) unexpected end-of-file
>>> (perhaps the fastcgi process died): pid: 0 socket: tcp:127.0.0.1:9003
>>> 2014-09-18 23:47:39: (mod_fastcgi.c.3326) response not received, request
>>> sent: 725 on socket: tcp:127.0.0.1:9003 for /?, closing connection
>>> 2014-09-18 23:47:39: (mod_fastcgi.c.1491) released proc: pid: 0 socket:
>>> tcp:127.0.0.1:9003 load: 0
>>>
>>> How would I go about getting more debug info from the Zinc FastCGI
>>> server?
>>>
>>> There is nothing else installed in GemStone just seaside installed
>>> through tODE’s “project load Seaside3”
>>>
>>> Any help would be much appreciated.
>>>
>>> Cheers,
>>>
>>> Jupiter
>>> _______________________________________________
>>> Glass mailing list
>>> Glass at lists.gemtalksystems.com
>>> http://lists.gemtalksystems.com/mailman/listinfo/glass
>>>
>>
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gemtalksystems.com/mailman/private/glass/attachments/20141007/67b694d4/attachment.html>


More information about the Glass mailing list