CKAN不会开始

时间:2014-10-27 18:37:17

标签: python postgresql solr freebsd ckan

在我的FreeBSD 10上,我设法安装PostgreSQL,Apache Solr和CKAN,但是当我运行paster serve /etc/ckan/default/development.ini时,我收到这些错误消息(我知道CKAN存在问题,因为在我的ip:5000上我有一个error: connection failed)。

以下是错误消息:

$ paster serve /etc/ckan/default/production.ini 
Traceback (most recent call last):
  File "/usr/lib/ckan/default/bin/paster", line 9, in <module>
    load_entry_point('PasteScript==1.7.5', 'console_scripts', 'paster')()
  File "/usr/lib/ckan/default/lib/python2.7/site-packages/paste/script/command.py", line 104, in run
    invoke(command, command_name, options, args[1:])
  File "/usr/lib/ckan/default/lib/python2.7/site-packages/paste/script/command.py", line 143, in invoke
    exit_code = runner.run(args)
  File "/usr/lib/ckan/default/lib/python2.7/site-packages/paste/script/command.py", line 238, in run
    result = self.command()
  File "/usr/lib/ckan/default/lib/python2.7/site-packages/paste/script/serve.py", line 284, in command
    relative_to=base, global_conf=vars)
  File "/usr/lib/ckan/default/lib/python2.7/site-packages/paste/script/serve.py", line 321, in loadapp
    **kw)
  File "/usr/lib/ckan/default/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 247, in loadapp
    return loadobj(APP, uri, name=name, **kw)
  File "/usr/lib/ckan/default/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 272, in loadobj
    return context.create()
  File "/usr/lib/ckan/default/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 710, in create
    return self.object_type.invoke(self)
  File "/usr/lib/ckan/default/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 146, in invoke
    return fix_call(context.object, context.global_conf, **context.local_conf)
  File "/usr/lib/ckan/default/lib/python2.7/site-packages/paste/deploy/util.py", line 56, in fix_call
    val = callable(*args, **kw)
  File "/root/ckan/lib/default/src/ckan/ckan/config/middleware.py", line 58, in make_app
    load_environment(conf, app_conf)
  File "/root/ckan/lib/default/src/ckan/ckan/config/environment.py", line 232, in load_environment
    p.load_all(config)
  File "/root/ckan/lib/default/src/ckan/ckan/plugins/core.py", line 134, in load_all
    load(*plugins)
  File "/root/ckan/lib/default/src/ckan/ckan/plugins/core.py", line 170, in load
    plugins_update()
  File "/root/ckan/lib/default/src/ckan/ckan/plugins/core.py", line 116, in plugins_update
    environment.update_config()
  File "/root/ckan/lib/default/src/ckan/ckan/config/environment.py", line 357, in update_config
    plugin.configure(config)
  File "/root/ckan/lib/default/src/ckan/ckanext/datastore/plugin.py", line 115, in configure
    self._check_urls_and_permissions()
  File "/root/ckan/lib/default/src/ckan/ckanext/datastore/plugin.py", line 159, in _check_urls_and_permissions
    self._log_or_raise('The read-only user has write privileges.')
  File "/root/ckan/lib/default/src/ckan/ckanext/datastore/plugin.py", line 140, in _log_or_raise
    raise DatastoreException(message)
ckanext.datastore.plugin.DatastoreException: The read-only user has write privileges.

我该怎么办?

2 个答案:

答案 0 :(得分:1)

数据存储区数据库的只读postgresql用户设置不正确:用户具有写入权限。文档的相关部分是:http://docs.ckan.org/en/latest/maintaining/datastore.html#set-permissions

答案 1 :(得分:0)

我也遇到了这样的问题....我已经从postgres中删除了用户“datastore_default”。删除Postgres用户请参阅:Postgres Delete user

根据CKAN文档再次创建postgres用户“datastore_default”。请参考:Create User datastore_default for CKAN