Skip to content
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

fastcgi-backend ./main.py failed to start #17

Open
cvee opened this issue Jan 4, 2012 · 3 comments
Open

fastcgi-backend ./main.py failed to start #17

cvee opened this issue Jan 4, 2012 · 3 comments

Comments

@cvee
Copy link
Contributor

cvee commented Jan 4, 2012

I completed Installation Instructions (Ubuntu) and attempted to start Lighttpd resulting in:

(.env)$:~/apps/Change-By-Us$ /usr/sbin/lighttpd -D -f lighttpd.conf
Traceback (most recent call last):
  File "./main.py", line 17, in <module>
    from framework.log import log
  File "/home/cvee/apps/Change-By-Us/framework/log.py", line 63, in <module>
    logfile = Config.get('logfile') # %s/../logs/%s.log' % (os.path.dirname(os.path.realpath(__file__)), name)
  File "/home/cvee/apps/Change-By-Us/framework/config.py", line 57, in get
    raise KeyError
KeyError

logs/main.log file contains the following:

2012-01-04 16:22:54: (log.c.166) server started
2012-01-04 16:22:54: (mod_fastcgi.c.1104) the fastcgi-backend ./main.py failed to start:
2012-01-04 16:22:54: (mod_fastcgi.c.1108) child exited with status 1 ./main.py
2012-01-04 16:22:54: (mod_fastcgi.c.1111) If you're trying to run your app as a FastCGI backend, make sure you're using the FastCGI-enabled version.
If this is PHP on Gentoo, add 'fastcgi' to the USE flags.
2012-01-04 16:22:54: (mod_fastcgi.c.1399) [ERROR]: spawning fcgi failed.
2012-01-04 16:22:54: (server.c.938) Configuration of plugins failed. Going down.
2012-01-04 16:23:19: (log.c.166) server started
2012-01-04 16:23:19: (mod_fastcgi.c.1104) the fastcgi-backend ./main.py failed to start:
2012-01-04 16:23:19: (mod_fastcgi.c.1108) child exited with status 1 ./main.py
2012-01-04 16:23:19: (mod_fastcgi.c.1111) If you're trying to run your app as a FastCGI backend, make sure you're using the FastCGI-enabled version.
If this is PHP on Gentoo, add 'fastcgi' to the USE flags.
2012-01-04 16:23:19: (mod_fastcgi.c.1399) [ERROR]: spawning fcgi failed.
2012-01-04 16:23:19: (server.c.938) Configuration of plugins failed. Going down.
2012-01-04 16:51:13: (log.c.166) server started
2012-01-04 16:53:26: (server.c.1396) [note] graceful shutdown started
2012-01-04 16:53:26: (server.c.1512) server stopped by UID = 0 PID = 0

Could this be related to my question in issue #16 regarding FastCGI configuration?

@cybertoast
Copy link
Collaborator

Sounds like you don't have the 'logfile' parameter defined in your
config.yaml. Set the following:

logfile: /tmp/changebyus.log

just to verify this. The "KeyError" is coming right after
Config.get('logfile'), so that's why I'm inclined to say the above.

On Wed, Jan 4, 2012 at 4:57 PM, Chris Verwymeren <
[email protected]

wrote:

I completed Installation Instructions (Ubuntu) and attempted to start
Lighttpd resulting in:

(.env)$:~/apps/Change-By-Us$ /usr/sbin/lighttpd -D -f lighttpd.conf
Traceback (most recent call last):
 File "./main.py", line 17, in <module>
   from framework.log import log
 File "/home/cvee/apps/Change-By-Us/framework/log.py", line 63, in <module>
   logfile = Config.get('logfile') # %s/../logs/%s.log' %
(os.path.dirname(os.path.realpath(__file__)), name)
 File "/home/cvee/apps/Change-By-Us/framework/config.py", line 57, in get
   raise KeyError
KeyError

logs/main.log file contains the following:

2012-01-04 16:22:54: (log.c.166) server started
2012-01-04 16:22:54: (mod_fastcgi.c.1104) the fastcgi-backend ./main.py
failed to start:
2012-01-04 16:22:54: (mod_fastcgi.c.1108) child exited with status 1
./main.py
2012-01-04 16:22:54: (mod_fastcgi.c.1111) If you're trying to run your
app as a FastCGI backend, make sure you're using the FastCGI-enabled
version.
If this is PHP on Gentoo, add 'fastcgi' to the USE flags.
2012-01-04 16:22:54: (mod_fastcgi.c.1399) [ERROR]: spawning fcgi failed.
2012-01-04 16:22:54: (server.c.938) Configuration of plugins failed.
Going down.
2012-01-04 16:23:19: (log.c.166) server started
2012-01-04 16:23:19: (mod_fastcgi.c.1104) the fastcgi-backend ./main.py
failed to start:
2012-01-04 16:23:19: (mod_fastcgi.c.1108) child exited with status 1
./main.py
2012-01-04 16:23:19: (mod_fastcgi.c.1111) If you're trying to run your
app as a FastCGI backend, make sure you're using the FastCGI-enabled
version.
If this is PHP on Gentoo, add 'fastcgi' to the USE flags.
2012-01-04 16:23:19: (mod_fastcgi.c.1399) [ERROR]: spawning fcgi failed.
2012-01-04 16:23:19: (server.c.938) Configuration of plugins failed.
Going down.
2012-01-04 16:51:13: (log.c.166) server started
2012-01-04 16:53:26: (server.c.1396) [note] graceful shutdown started
2012-01-04 16:53:26: (server.c.1512) server stopped by UID = 0 PID = 0

Could this be related to my question in issue #16 regarding FastCGI
configuration?


Reply to this email directly or view it on GitHub:
#17

@cvee
Copy link
Contributor Author

cvee commented Jan 4, 2012

Thanks! That was the issue. The comments in config.yaml.sample didn't specify what to supply for the 'logfile' parameter so I had commented it out. Would it be possible to change the sample file to contain a default value for the 'logfile' parameter and update the comments to make it apparent the parameter is required?

@cybertoast
Copy link
Collaborator

The idea is to have everything come from an rcfile and to use fabric for deployment. This is why there are no default values (only interpolation variables) in the config.tmpl file. A sample rcfile is provided at rcfile.sample.
In order to use fabric to create a local config file, do:
fab -f fabfile.py --config=/absolute/path/to/rcfile dev clean_build bundle_code create_local_configs

Once this is done the first time, you can omit the "clean_build" task. For a list of tasks and their descriptions, look at
fab -f fabfile.py --config=/path/to/rcfile -l

I also noticed that there were a couple of variables missing from rcfile.sample, and have added them into the develop branch. And I just noticed that there's no documentation about this fabric-related process in the wiki. I'll add that too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants