New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using FindBin in the app croaks because of $0 change (was: Worker process can't find script (Mojolicious app script) #15
Comments
I guess this is because starman, after the prefork hook, changes $0 for the monitoring purpose and the mojo app tries to load FindBin which croaks. I will probably add an option to disable changing $0, but for now you can run the app with:
to bypass the errors. |
It works. Thanks |
clkao
pushed a commit
to clkao/Starman
that referenced
this issue
Jun 30, 2012
Changelog diff is: diff --git a/Changes b/Changes index 9d3feb4..8088c4c 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,9 @@ Revision history for Perl extension Starman +0.2008_1 + - Requires Plack 0.9971 to support localizing $0 to fix the FindBin issues miyagawa#7, miyagawa#15, miyagawa#18, miyagawa#19 + - Calls srand() automatically in the child init hook to avoid a fixed random seed miyagawa#20 + 0.2008 Mon Feb 14 17:19:20 PST 2011 - Documented that -E is automatically set to 'deployment' RT:61517 (timbunce) - Check the defined-ness of the input buffer to suppress warnings RT:60007
clkao
pushed a commit
to clkao/Starman
that referenced
this issue
Jun 30, 2012
Changelog diff is: diff --git a/Changes b/Changes index 8088c4c..e1ee873 100644 --- a/Changes +++ b/Changes @@ -1,8 +1,9 @@ Revision history for Perl extension Starman -0.2008_1 +0.2008_2 - Requires Plack 0.9971 to support localizing $0 to fix the FindBin issues miyagawa#7, miyagawa#15, miyagawa#18, miyagawa#19 - Calls srand() automatically in the child init hook to avoid a fixed random seed miyagawa#20 + - Implemented --keepalive-timeout which defaults to 1 (acme) 0.2008 Mon Feb 14 17:19:20 PST 2011 - Documented that -E is automatically set to 'deployment' RT:61517 (timbunce)
clkao
pushed a commit
to clkao/Starman
that referenced
this issue
Jun 30, 2012
Changelog diff is: diff --git a/Changes b/Changes index e1ee873..add4ebe 100644 --- a/Changes +++ b/Changes @@ -1,6 +1,6 @@ Revision history for Perl extension Starman -0.2008_2 +0.2009 Fri Mar 25 19:15:23 PDT 2011 - Requires Plack 0.9971 to support localizing $0 to fix the FindBin issues miyagawa#7, miyagawa#15, miyagawa#18, miyagawa#19 - Calls srand() automatically in the child init hook to avoid a fixed random seed miyagawa#20 - Implemented --keepalive-timeout which defaults to 1 (acme)
clkao
pushed a commit
to clkao/Starman
that referenced
this issue
Jun 30, 2012
Changelog diff is: diff --git a/Changes b/Changes index add4ebe..db43c07 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,8 @@ Revision history for Perl extension Starman +0.2010 Mon Mar 28 16:23:23 PDT 2011 + - Fixed packaging. No changes. + 0.2009 Fri Mar 25 19:15:23 PDT 2011 - Requires Plack 0.9971 to support localizing $0 to fix the FindBin issues miyagawa#7, miyagawa#15, miyagawa#18, miyagawa#19 - Calls srand() automatically in the child init hook to avoid a fixed random seed miyagawa#20
This issue was closed.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I start a mojolicious app (default mojolicious app) using starman:
$ starman script/app
And send request and receive Internal Server Error.
Error log:
Cannot find current script 'starman worker -I/tk/mojo/lib script/app' at /usr/lib/perl5/5.12.1/FindBin.pm line 205
BEGIN failed--compilation aborted at /usr/lib/perl5/5.12.1/FindBin.pm line 205.
Compilation failed in require at /tk/mojo/lib/Mojo/Home.pm line 12.
BEGIN failed--compilation aborted at /tk/mojo/lib/Mojo/Home.pm line 12.
Compilation failed in require at /tk/mojo/lib/Mojo.pm line 13.
BEGIN failed--compilation aborted at /tk/mojo/lib/Mojo.pm line 13.
Compilation failed in require at (eval 72) line 2.
...propagated at /usr/lib/perl5/5.12.1/base.pm line 94.
BEGIN failed--compilation aborted at /tk/mojo/lib/Mojolicious.pm line 8.
Compilation failed in require at (eval 71) line 2.
...propagated at /usr/lib/perl5/5.12.1/base.pm line 94.
BEGIN failed--compilation aborted at script/../lib/App.pm line 6.
Compilation failed in require at (eval 70) line 2.
But Mojolicious::Lite app works correctly.
And plackup works:
$ plackup script/app
Only starman fail.
The text was updated successfully, but these errors were encountered: