[dancer-users] how to get more diagnostics on Internal Server Error.

Hugues Max huguesmax at gmail.com
Fri Apr 26 08:13:46 BST 2013


it's works well see html result on my centos 6.3 dev server

http://192.168.0.8:4080/ give

<html>
<head></head>
<body>
<pre>Hello World hugues!</pre>
</body>
</html>

cat mylogs/development

[7477]  core @0.000007> loading Dancer::Handler::Standalone handler in 
/usr/local/share/perl5/Dancer/Handler.pm l. 45
[7477]  core @0.000196> loading handler 'Dancer::Handler::Standalone' in 
/usr/local/share/perl5/Dancer.pm l. 479
[7477]  core @0.000115> request: GET / from 192.168.0.19 in 
/usr/local/share/perl5/Dancer/Handler.pm l. 56
[7477]  core @0.000481> [hit #1]Trying to match 'GET /' against 
/^\/hello\/([^\/]+)$/ (generated from '/hello/:name') in 
/usr/local/share/perl5/Dancer/Route.pm l. 84
[7477]  core @0.000611> [hit #1]Trying to match 'GET /' against /^\/$/ 
(generated from '/') in /usr/local/share/perl5/Dancer/Route.pm l. 84
[7477]  core @0.000732> [hit #1]  --> got 1 in 
/usr/local/share/perl5/Dancer/Route.pm l. 102
[7477]  core @0.001175> [hit #1]response: 200 in 
/usr/local/share/perl5/Dancer/Handler.pm l. 179

your code

#!/usr/bin/perl
use utf8;
use Dancer;

      # changing default settings
     set port         => 4080;
     set content_type => 'text/plain';
     set startup_info => 0;
     set log_path => 'mylogs';
     set show_errors => 1;
     set log => 'core';

     get '/hello/:name' => sub {
         return "Why, hello there " . param('name');
     };

     get '/' => sub {
         return "Hello World hugues!";
     };

dance;

here are a other pb on your system , your code is ok
bye
HB


Le 25/04/2013 14:18, Mark Wood-Patrick a écrit :
> Program is very simple (see below) even with all logging enabled I only get
>
> [29907]  core @0.000015> loading Dancer::Handler::Standalone handler in /home/app_perf_catalog/mwoodpatrick/mongodb/PORTool/Perl/Dancer-1.3112/lib/Dancer/Handler.pm l. 45
> [29907]  core @0.000233> loading handler 'Dancer::Handler::Standalone' in /home/app_perf_catalog/mwoodpatrick/mongodb/PORTool/Perl/Dancer-1.3112/lib/Dancer.pm l. 479
>
> Any suggestions on how to figure out what's wrong in my setup
>
> #!/usr/bin/perl
>
>      use Dancer;
>       # changing default settings
>      set port         => 4080;
>      set content_type => 'text/plain';
>      set startup_info => 0;
>      set log_path => 'mylogs';
>      set show_errors => 1;
>      set log => 'core';
>
>      get '/hello/:name' => sub {
>          return "Why, hello there " . param('name');
>      };
>
>      get '/' => sub {
>          return "Hello World!";
>      };
>
>      dance;
>
> -----Original Message-----
> From: Daniel Perrett [mailto:dperrett at cambridge.org]
> Sent: Thursday, April 25, 2013 1:39 AM
> To: Perl Dancer users mailing list
> Cc: dancer-users at dancer.pm; Mark Wood-Patrick
> Subject: Re: [dancer-users] how to get more diagnostics on Internal Server Error.
>
> Probably the terminal window in which Dancer is running, or wherever you've redirected those warnings if you're running it in the background.
>
> Is your application a complex one or are you having problems with the boilerplate "use Dancer; dance;"?
>
> Daniel
>   
> -----Mark Wood-Patrick <mwoodpatrick at nvidia.com> wrote: -----
>
>   =======================
>   To: "dancer-users at dancer.pm" <dancer-users at dancer.pm>
>   From: Mark Wood-Patrick <mwoodpatrick at nvidia.com>
>   Date: 04/25/2013 08:04AM
>   Cc: Mark Wood-Patrick <mwoodpatrick at nvidia.com>
>   Subject: [dancer-users] how to get more diagnostics on Internal Server Error.
>   =======================
>     I'm running with Dancer-1.3112 on CentOS release 5.7 (Final)
>
> On starting dancer and running
>
> wget http://0.0.0.0:3000
>
> I get:
>
> --2013-04-24 03:56:34--  http://0.0.0.0:3000/ Connecting to 0.0.0.0:3000... connected.
> HTTP request sent, awaiting response... 500 Internal Server Error
> 2013-04-24 03:56:34 ERROR 500: Internal Server Error.
>
> But no other info on what the problem is. I'm probably doing something wrong but how can I get more diagnostics on what the problem is
>
> Mark Wood-Patrick
>
>
> -----------------------------------------------------------------------------------
> This email message is for the sole use of the intended recipient(s) and may contain confidential information.  Any unauthorized review, use, disclosure or distribution is prohibited.  If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message.
> -----------------------------------------------------------------------------------
> _______________________________________________
> dancer-users mailing list
> dancer-users at dancer.pm
> http://lists.preshweb.co.uk/mailman/listinfo/dancer-users
>      
> _______________________________________________
> dancer-users mailing list
> dancer-users at dancer.pm
> http://lists.preshweb.co.uk/mailman/listinfo/dancer-users



More information about the dancer-users mailing list