Форум сайта python.su
Перенес Пилонский проект на 64 битный сервак.
Шаманил с разными сочетаниями версий питона и WSGI, но всё без толку.
настройки апача:
<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerAlias domen.ru www.domen.ru
DocumentRoot /var/www/
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog /var/log/apache2/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog /var/log/apache2/access.log combined
Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>
WSGIScriptAlias / /home/webmaster/site/wsgi/app.py
WSGIDaemonProcess domen user=webmaster
WSGIProcessGroup domen
<Directory /home/webmaster/site/wsgi>
Order deny,allow
Allow from all
SetEnv PROCESS_GROUP domen
</Directory>
# SVN repos
<Location /svn>
DAV svn
SVNParentPath /var/svn-repos
AuthType Basic
AuthName "domen.ru Subversion Repository"
AuthUserFile /etc/apache2/svn_repos.passwd
Require valid-user
</Location>
</VirtualHost>
# -*- coding: utf-8 -*-
def application(environ, start_response):
status = '200 OK'
output = 'Hello World!'
response_headers = [('Content-type', 'text/plain'),
('Content-Length', str(len(output)))]
start_response(status, response_headers)
return [output]
# -*- coding: utf-8 -*-
APP_CONFIG = "/home/webmaster/site/project2/adeployment.ini"
from paste.deploy import loadapp
application = loadapp("config:" + APP_CONFIG)
[Wed Jan 05 08:33:05 2011] [error] [client 95.27.170.82] mod_wsgi (pid=21537): Target WSGI script '/home/webmaster/site/wsgi/startapp.py' cannot be loaded as Python module.
[Wed Jan 05 08:33:05 2011] [error] [client 95.27.170.82] mod_wsgi (pid=21537): Exception occurred processing WSGI script '/home/webmaster/site/wsgi/startapp.py'.
[Wed Jan 05 08:33:05 2011] [error] [client 95.27.170.82] Traceback (most recent call last):
[Wed Jan 05 08:33:05 2011] [error] [client 95.27.170.82] File "/home/webmaster/site/wsgi/startapp.py", line 9, in <module>
[Wed Jan 05 08:33:05 2011] [error] [client 95.27.170.82] application = loadapp("config:" + APP_CONFIG)
[Wed Jan 05 08:33:05 2011] [error] [client 95.27.170.82] File "/usr/local/lib/python2.6/site-packages/PasteDeploy-1.3.3-py2.6.egg/paste/deploy/loadwsgi.py", line 204, in loadapp
[Wed Jan 05 08:33:05 2011] [error] [client 95.27.170.82] return loadobj(APP, uri, name=name, **kw)
[Wed Jan 05 08:33:05 2011] [error] [client 95.27.170.82] File "/usr/local/lib/python2.6/site-packages/PasteDeploy-1.3.3-py2.6.egg/paste/deploy/loadwsgi.py", line 225, in loadobj
[Wed Jan 05 08:33:05 2011] [error] [client 95.27.170.82] return context.create()
[Wed Jan 05 08:33:05 2011] [error] [client 95.27.170.82] File "/usr/local/lib/python2.6/site-packages/PasteDeploy-1.3.3-py2.6.egg/paste/deploy/loadwsgi.py", line 625, in create
[Wed Jan 05 08:33:05 2011] [error] [client 95.27.170.82] return self.object_type.invoke(self)
[Wed Jan 05 08:33:05 2011] [error] [client 95.27.170.82] File "/usr/local/lib/python2.6/site-packages/PasteDeploy-1.3.3-py2.6.egg/paste/deploy/loadwsgi.py", line 110, in invoke
[Wed Jan 05 08:33:05 2011] [error] [client 95.27.170.82] return fix_call(context.object, context.global_conf, **context.local_conf)
[Wed Jan 05 08:33:05 2011] [error] [client 95.27.170.82] File "/usr/local/lib/python2.6/site-packages/PasteDeploy-1.3.3-py2.6.egg/paste/deploy/util/fixtypeerror.py", line 57, in fix_call
[Wed Jan 05 08:33:05 2011] [error] [client 95.27.170.82] val = callable(*args, **kw)
[Wed Jan 05 08:33:05 2011] [error] [client 95.27.170.82] File "/home/webmaster/site/project2/project/config/middleware.py", line 43, in make_app
[Wed Jan 05 08:33:05 2011] [error] [client 95.27.170.82] load_environment(global_conf, app_conf)
[Wed Jan 05 08:33:05 2011] [error] [client 95.27.170.82] File "/home/webmaster/site/project2/project/config/environment.py", line 47, in load_environment
[Wed Jan 05 08:33:05 2011] [error] [client 95.27.170.82] for sec in Session.query(Section).filter(Section.state==1).all():
[Wed Jan 05 08:33:05 2011] [error] [client 95.27.170.82] File "/usr/local/lib/python2.6/site-packages/SQLAlchemy-0.5.8-py2.6.egg/sqlalchemy/orm/query.py", line 1267, in all
[Wed Jan 05 08:33:05 2011] [error] [client 95.27.170.82] return list(self)
[Wed Jan 05 08:33:05 2011] [error] [client 95.27.170.82] File "/usr/local/lib/python2.6/site-packages/SQLAlchemy-0.5.8-py2.6.egg/sqlalchemy/orm/query.py", line 1361, in __iter__
[Wed Jan 05 08:33:05 2011] [error] [client 95.27.170.82] return self._execute_and_instances(context)
[Wed Jan 05 08:33:05 2011] [error] [client 95.27.170.82] File "/usr/local/lib/python2.6/site-packages/SQLAlchemy-0.5.8-py2.6.egg/sqlalchemy/orm/query.py", line 1364, in _execute_and_instances
[Wed Jan 05 08:33:05 2011] [error] [client 95.27.170.82] result = self.session.execute(querycontext.statement, params=self._params, mapper=self._mapper_zero_or_none())
[Wed Jan 05 08:33:05 2011] [error] [client 95.27.170.82] File "/usr/local/lib/python2.6/site-packages/SQLAlchemy-0.5.8-py2.6.egg/sqlalchemy/orm/session.py", line 753, in execute
[Wed Jan 05 08:33:05 2011] [error] [client 95.27.170.82] clause, params or {})
[Wed Jan 05 08:33:05 2011] [error] [client 95.27.170.82] File "/usr/local/lib/python2.6/site-packages/SQLAlchemy-0.5.8-py2.6.egg/sqlalchemy/engine/base.py", line 824, in execute
[Wed Jan 05 08:33:05 2011] [error] [client 95.27.170.82] return Connection.executors[c](self, object, multiparams, params)
[Wed Jan 05 08:33:05 2011] [error] [client 95.27.170.82] File "/usr/local/lib/python2.6/site-packages/SQLAlchemy-0.5.8-py2.6.egg/sqlalchemy/engine/base.py", line 874, in _execute_clauseelement
[Wed Jan 05 08:33:05 2011] [error] [client 95.27.170.82] return self.__execute_context(context)
[Wed Jan 05 08:33:05 2011] [error] [client 95.27.170.82] File "/usr/local/lib/python2.6/site-packages/SQLAlchemy-0.5.8-py2.6.egg/sqlalchemy/engine/base.py", line 896, in __execute_context
[Wed Jan 05 08:33:05 2011] [error] [client 95.27.170.82] self._cursor_execute(context.cursor, context.statement, context.parameters[0], context=context)
[Wed Jan 05 08:33:05 2011] [error] [client 95.27.170.82] File "/usr/local/lib/python2.6/site-packages/SQLAlchemy-0.5.8-py2.6.egg/sqlalchemy/engine/base.py", line 950, in _cursor_execute
[Wed Jan 05 08:33:05 2011] [error] [client 95.27.170.82] self._handle_dbapi_exception(e, statement, parameters, cursor, context)
[Wed Jan 05 08:33:05 2011] [error] [client 95.27.170.82] File "/usr/local/lib/python2.6/site-packages/SQLAlchemy-0.5.8-py2.6.egg/sqlalchemy/engine/base.py", line 931, in _handle_dbapi_exception
[Wed Jan 05 08:33:05 2011] [error] [client 95.27.170.82] raise exc.DBAPIError.instance(statement, parameters, e, connection_invalidated=is_disconnect)
[Wed Jan 05 08:33:05 2011] [error] [client 95.27.170.82] ProgrammingError: (ProgrammingError) \xd0\xbe\xd1\x82\xd0\xbd\xd0\xbe\xd1\x88\xd0\xb5\xd0\xbd\xd0\xb8\xd0\xb5 "sections" \xd0\xbd\xd0\xb5 \xd1\x81\xd1\x83\xd1\x89\xd0\xb5\xd1\x81\xd1\x82\xd0\xb2\xd1\x83\xd0\xb5\xd1\x82
[Wed Jan 05 08:33:05 2011] [error] [client 95.27.170.82] 'SELECT sections.id AS sections_id, sections.name AS sections_name, sections.state AS sections_state \\nFROM sections \\nWHERE sections.state = %(state_1)s' {'state_1': 1}
Офлайн
У вас вообще-то ошибка при запросе в базу данных. Не может найти таблицу ‘sections’. Вы точно к той базе что нужно цепляетесь?
Офлайн
вы - гений!!!! я серьезно. я туплю. ща исправлю посмотрю что будет.
Офлайн
рано я обрадовался. теперь вот что пишет.
[Wed Jan 05 21:51:12 2011] [error] [client 95.27.170.82] mod_wsgi (pid=13514): Target WSGI script '/home/webmaster/site/wsgi/startapp.py' cannot be loaded as Python module.
[Wed Jan 05 21:51:12 2011] [error] [client 95.27.170.82] mod_wsgi (pid=13514): Exception occurred processing WSGI script '/home/webmaster/site/wsgi/startapp.py'.
[Wed Jan 05 21:51:12 2011] [error] [client 95.27.170.82] Traceback (most recent call last):
[Wed Jan 05 21:51:12 2011] [error] [client 95.27.170.82] File "/home/webmaster/site/wsgi/startapp.py", line 9, in <module>
[Wed Jan 05 21:51:12 2011] [error] [client 95.27.170.82] application = loadapp("config:" + APP_CONFIG)
[Wed Jan 05 21:51:12 2011] [error] [client 95.27.170.82] File "/usr/local/lib/python2.6/site-packages/PasteDeploy-1.3.3-py2.6.egg/paste/deploy/loadwsgi.py", line 204, in loadapp
[Wed Jan 05 21:51:12 2011] [error] [client 95.27.170.82] return loadobj(APP, uri, name=name, **kw)
[Wed Jan 05 21:51:12 2011] [error] [client 95.27.170.82] File "/usr/local/lib/python2.6/site-packages/PasteDeploy-1.3.3-py2.6.egg/paste/deploy/loadwsgi.py", line 225, in loadobj
[Wed Jan 05 21:51:12 2011] [error] [client 95.27.170.82] return context.create()
[Wed Jan 05 21:51:12 2011] [error] [client 95.27.170.82] File "/usr/local/lib/python2.6/site-packages/PasteDeploy-1.3.3-py2.6.egg/paste/deploy/loadwsgi.py", line 625, in create
[Wed Jan 05 21:51:12 2011] [error] [client 95.27.170.82] return self.object_type.invoke(self)
[Wed Jan 05 21:51:12 2011] [error] [client 95.27.170.82] File "/usr/local/lib/python2.6/site-packages/PasteDeploy-1.3.3-py2.6.egg/paste/deploy/loadwsgi.py", line 110, in invoke
[Wed Jan 05 21:51:12 2011] [error] [client 95.27.170.82] return fix_call(context.object, context.global_conf, **context.local_conf)
[Wed Jan 05 21:51:12 2011] [error] [client 95.27.170.82] File "/usr/local/lib/python2.6/site-packages/PasteDeploy-1.3.3-py2.6.egg/paste/deploy/util/fixtypeerror.py", line 57, in fix_call
[Wed Jan 05 21:51:12 2011] [error] [client 95.27.170.82] val = callable(*args, **kw)
[Wed Jan 05 21:51:12 2011] [error] [client 95.27.170.82] File "/home/webmaster/site/project2/project/config/middleware.py", line 61, in make_app
[Wed Jan 05 21:51:12 2011] [error] [client 95.27.170.82] app = authkit.authenticate.middleware(app, app_conf)
[Wed Jan 05 21:51:12 2011] [error] [client 95.27.170.82] File "/usr/local/lib/python2.6/site-packages/AuthKit-0.4.5-py2.6.egg/authkit/authenticate/__init__.py", line 543, in middleware
[Wed Jan 05 21:51:12 2011] [error] [client 95.27.170.82] available_methods.keys()[-1],
[Wed Jan 05 21:51:12 2011] [error] [client 95.27.170.82] AuthKitConfigError: The authkit method 'projectauth,cookie' is not available. The available methods are redirect, openid, form, cas, cookie, basic, forward and digest
Офлайн
короче оказалось, что плохо был собран сетап. и не хватает одной библиотеки. будут откатывать систему и ставить всё с нуля.
Офлайн