Open cvee opened 12 years ago
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 < reply@reply.github.com
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: https://github.com/localprojects/Change-By-Us/issues/17
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?
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.
I completed Installation Instructions (Ubuntu) and attempted to start Lighttpd resulting in:
logs/main.log file contains the following:
Could this be related to my question in issue #16 regarding FastCGI configuration?