in reply to Change cgi script to PSGI app
Regarding using Ubic for running your webserver: You don't show us what is in line 166 of myapp.psgi. My guess is that it is a line like require 'Config.pl';, which likely means that the "current directory" is not what your program thinks it should be.
Ubic::Service::Starman (through inheritance from Ubic::Service::Plack) has a cwd option that maybe allows you to set up the correct directory for the program.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Change cgi script to PSGI app
by mohan2monks (Beadle) on Sep 12, 2014 at 07:49 UTC | |
Line 166 was require './Config.pl' i also tried require '/var/www/myapp/Config.pl' In my configuration for ubic service i have provided CWD path as /var/www/myapp I ran this command from /var/www/myapp/ but if i do with with --server argument it gives the same error of @INC
| [reply] [d/l] [select] |
by Corion (Patriarch) on Sep 12, 2014 at 08:01 UTC | |
This is weird. It seems that Starman is doing something that prevents Config.pl from getting loaded, but I see no @INC manipulation. Starman inherits from Net::Server, which does some uid fiddling. Maybe when you're running plain plackup , the user does not get changed to perl, while with Starman, it gets changed? Consider checking the user permissions on Config.pl and all upper directories leading to it. Update: ... of course then, the error message should be Permission denied instead of File not found. So I'm still confused. | [reply] [d/l] [select] |
by mohan2monks (Beadle) on Sep 12, 2014 at 09:21 UTC | |
I think this is more to do with ubic as it status is unkown or not running it never changed to working directory that was provided in config options starman service is running though ubic status is unknown Now ubic watchdog tries to start this service every minutes thinking it dead and service restarts every minute. Why ubic status is unknown? | [reply] [d/l] [select] |