[ckan-dev] CKAN fails on loading WSGI script
Nigel Babu
nigel.babu at okfn.org
Sat Feb 7 03:22:52 UTC 2015
My best guess from the error is that your database is in an inconsistent
state. Not sure how or why though, I'm afraid.
Nigel Babu
Senior Sysadmin, Open Knowledge
On 4 February 2015 at 17:49, dporto <dporto at gmail.com> wrote:
> Replacing files over /usr/lib/ckan/default/src/ckan...
>
> We've previously done a tar of this folder (backup) and now it is restored
>
> We're also checking permissions and everything seems to be fine
>
> I think that there are no changes on database
>
> 2015-02-04 12:22 GMT+01:00 Nigel Babu <nigel.babu at okfn.org>:
>
>> What do you mean by changes? Did you change the database? Fork the code?
>>
>> Nigel Babu
>> Senior Sysadmin, Open Knowledge
>>
>> On 4 February 2015 at 16:18, dporto <dporto at gmail.com> wrote:
>>
>>> Hi all,
>>> we have made some changes on a CKAN v2.1.1 and now it crashes when it
>>> starts.
>>>
>>> We have tried to restore it, but no luck
>>>
>>> Could anybody help us to find out where is the problem or how to debug
>>> it?
>>>
>>> Thanks in advance
>>>
>>> Log trace:
>>>
>>> [Wed Feb 04 11:28:57 2015] [info] [client 1.1.12.145] mod_wsgi
>>> (pid=1140, process='ckan_default', application='preopendata|/catalogo'):
>>> Loading WSGI script '/etc/ckan/default/apache.wsgi'.
>>> [Wed Feb 04 11:28:57 2015] [error] [client 1.1.12.145] mod_wsgi
>>> (pid=1140): Target WSGI script '/etc/ckan/default/apache.wsgi' cannot be
>>> loaded as Python module.
>>> [Wed Feb 04 11:28:57 2015] [error] [client 1.1.12.145] mod_wsgi
>>> (pid=1140): Exception occurred processing WSGI script
>>> '/etc/ckan/default/apache.wsgi'.
>>> [Wed Feb 04 11:28:57 2015] [error] [client 1.1.12.145] Traceback (most
>>> recent call last):
>>> [Wed Feb 04 11:28:57 2015] [error] [client 1.1.12.145] File
>>> "/etc/ckan/default/apache.wsgi", line 10, in <module>
>>> [Wed Feb 04 11:28:57 2015] [error] [client 1.1.12.145] application =
>>> loadapp('config:%s' % config_filepath)
>>> [Wed Feb 04 11:28:57 2015] [error] [client 1.1.12.145] File
>>> "/usr/lib/ckan/default/lib/python2.7/site-packages/paste/deploy/loadwsgi.py",
>>> line 247, in loadapp
>>> [Wed Feb 04 11:28:57 2015] [error] [client 1.1.12.145] return
>>> loadobj(APP, uri, name=name, **kw)
>>> [Wed Feb 04 11:28:57 2015] [error] [client 1.1.12.145] File
>>> "/usr/lib/ckan/default/lib/python2.7/site-packages/paste/deploy/loadwsgi.py",
>>> line 271, in loadobj
>>> [Wed Feb 04 11:28:57 2015] [error] [client 1.1.12.145]
>>> global_conf=global_conf)
>>> [Wed Feb 04 11:28:57 2015] [error] [client 1.1.12.145] File
>>> "/usr/lib/ckan/default/lib/python2.7/site-packages/paste/deploy/loadwsgi.py",
>>> line 296, in loadcontext
>>> [Wed Feb 04 11:28:57 2015] [error] [client 1.1.12.145]
>>> global_conf=global_conf)
>>> [Wed Feb 04 11:28:57 2015] [error] [client 1.1.12.145] File
>>> "/usr/lib/ckan/default/lib/python2.7/site-packages/paste/deploy/loadwsgi.py",
>>> line 320, in _loadconfig
>>> [Wed Feb 04 11:28:57 2015] [error] [client 1.1.12.145] return
>>> loader.get_context(object_type, name, global_conf)
>>> [Wed Feb 04 11:28:57 2015] [error] [client 1.1.12.145] File
>>> "/usr/lib/ckan/default/lib/python2.7/site-packages/paste/deploy/loadwsgi.py",
>>> line 454, in get_context
>>> [Wed Feb 04 11:28:57 2015] [error] [client 1.1.12.145] section)
>>> [Wed Feb 04 11:28:57 2015] [error] [client 1.1.12.145] File
>>> "/usr/lib/ckan/default/lib/python2.7/site-packages/paste/deploy/loadwsgi.py",
>>> line 476, in _context_from_use
>>> [Wed Feb 04 11:28:57 2015] [error] [client 1.1.12.145] object_type,
>>> name=use, global_conf=global_conf)
>>> [Wed Feb 04 11:28:57 2015] [error] [client 1.1.12.145] File
>>> "/usr/lib/ckan/default/lib/python2.7/site-packages/paste/deploy/loadwsgi.py",
>>> line 406, in get_context
>>> [Wed Feb 04 11:28:57 2015] [error] [client 1.1.12.145]
>>> global_conf=global_conf)
>>> [Wed Feb 04 11:28:57 2015] [error] [client 1.1.12.145] File
>>> "/usr/lib/ckan/default/lib/python2.7/site-packages/paste/deploy/loadwsgi.py",
>>> line 296, in loadcontext
>>> [Wed Feb 04 11:28:57 2015] [error] [client 1.1.12.145]
>>> global_conf=global_conf)
>>> [Wed Feb 04 11:28:57 2015] [error] [client 1.1.12.145] File
>>> "/usr/lib/ckan/default/lib/python2.7/site-packages/paste/deploy/loadwsgi.py",
>>> line 328, in _loadegg
>>> [Wed Feb 04 11:28:57 2015] [error] [client 1.1.12.145] return
>>> loader.get_context(object_type, name, global_conf)
>>> [Wed Feb 04 11:28:57 2015] [error] [client 1.1.12.145] File
>>> "/usr/lib/ckan/default/lib/python2.7/site-packages/paste/deploy/loadwsgi.py",
>>> line 620, in get_context
>>> [Wed Feb 04 11:28:57 2015] [error] [client 1.1.12.145] object_type,
>>> name=name)
>>> [Wed Feb 04 11:28:57 2015] [error] [client 1.1.12.145] File
>>> "/usr/lib/ckan/default/lib/python2.7/site-packages/paste/deploy/loadwsgi.py",
>>> line 646, in find_egg_entry_point
>>> [Wed Feb 04 11:28:57 2015] [error] [client 1.1.12.145]
>>> possible.append((entry.load(), protocol, entry.name))
>>> [Wed Feb 04 11:28:57 2015] [error] [client 1.1.12.145] File
>>> "/usr/lib/ckan/default/lib/python2.7/site-packages/pkg_resources.py", line
>>> 2013, in load
>>> [Wed Feb 04 11:28:57 2015] [error] [client 1.1.12.145] entry =
>>> __import__(self.module_name, globals(),globals(), ['__name__'])
>>> [Wed Feb 04 11:28:57 2015] [error] [client 1.1.12.145] File
>>> "/usr/lib/ckan/default/src/ckan/ckan/config/middleware.py", line 26, in
>>> <module>
>>> [Wed Feb 04 11:28:57 2015] [error] [client 1.1.12.145] from
>>> ckan.config.environment import load_environment
>>> [Wed Feb 04 11:28:57 2015] [error] [client 1.1.12.145] File
>>> "/usr/lib/ckan/default/src/ckan/ckan/config/environment.py", line 18, in
>>> <module>
>>> [Wed Feb 04 11:28:57 2015] [error] [client 1.1.12.145] import
>>> ckan.lib.helpers as h
>>> [Wed Feb 04 11:28:57 2015] [error] [client 1.1.12.145] File
>>> "/usr/lib/ckan/default/src/ckan/ckan/lib/helpers.py", line 40, in <module>
>>> [Wed Feb 04 11:28:57 2015] [error] [client 1.1.12.145] import
>>> ckan.logic as logic
>>> [Wed Feb 04 11:28:57 2015] [error] [client 1.1.12.145] File
>>> "/usr/lib/ckan/default/src/ckan/ckan/logic/__init__.py", line 9, in <module>
>>> [Wed Feb 04 11:28:57 2015] [error] [client 1.1.12.145] import
>>> ckan.new_authz as new_authz
>>> [Wed Feb 04 11:28:57 2015] [error] [client 1.1.12.145] File
>>> "/usr/lib/ckan/default/src/ckan/ckan/new_authz.py", line 9, in <module>
>>> [Wed Feb 04 11:28:57 2015] [error] [client 1.1.12.145] import
>>> ckan.model as model
>>> [Wed Feb 04 11:28:57 2015] [error] [client 1.1.12.145] File
>>> "/usr/lib/ckan/default/src/ckan/ckan/ckan/model/__init__.py", line 18, in
>>> <module>
>>> [Wed Feb 04 11:28:57 2015] [error] [client 1.1.12.145] from core
>>> import (
>>> [Wed Feb 04 11:28:57 2015] [error] [client 1.1.12.145] File
>>> "/usr/lib/ckan/default/src/ckan/ckan/ckan/model/core.py", line 13, in
>>> <module>
>>> [Wed Feb 04 11:28:57 2015] [error] [client 1.1.12.145]
>>> revision_table = vdm.sqlalchemy.make_revision_table(meta.metadata)
>>> [Wed Feb 04 11:28:57 2015] [error] [client 1.1.12.145] File
>>> "/usr/lib/ckan/default/lib/python2.7/site-packages/vdm/sqlalchemy/base.py",
>>> line 86, in make_revision_table
>>> [Wed Feb 04 11:28:57 2015] [error] [client 1.1.12.145]
>>> Column('state', UnicodeText, default=State.ACTIVE)
>>> [Wed Feb 04 11:28:57 2015] [error] [client 1.1.12.145] File
>>> "/usr/lib/ckan/default/lib/python2.7/site-packages/sqlalchemy/schema.py",
>>> line 305, in __new__
>>> [Wed Feb 04 11:28:57 2015] [error] [client 1.1.12.145] "existing
>>> Table object." % key)
>>> [Wed Feb 04 11:28:57 2015] [error] [client 1.1.12.145]
>>> InvalidRequestError: Table 'revision' is already defined for this MetaData
>>> instance. Specify 'extend_existing=True' to redefine options and columns
>>> on an existing Table object
>>>
>>>
>>>
>>> _______________________________________________
>>> ckan-dev mailing list
>>> ckan-dev at lists.okfn.org
>>> https://lists.okfn.org/mailman/listinfo/ckan-dev
>>> Unsubscribe: https://lists.okfn.org/mailman/options/ckan-dev
>>>
>>>
>>
>> _______________________________________________
>> ckan-dev mailing list
>> ckan-dev at lists.okfn.org
>> https://lists.okfn.org/mailman/listinfo/ckan-dev
>> Unsubscribe: https://lists.okfn.org/mailman/options/ckan-dev
>>
>>
>
> _______________________________________________
> ckan-dev mailing list
> ckan-dev at lists.okfn.org
> https://lists.okfn.org/mailman/listinfo/ckan-dev
> Unsubscribe: https://lists.okfn.org/mailman/options/ckan-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20150207/366cb725/attachment-0003.html>
More information about the ckan-dev
mailing list