CKAN-Datastore:错误请求 - 操作名称未知:datastore_search“

问题描述 投票:1回答:1

我从源代码为Ubuntu 18.04安装了CKAN。要在CKAN中设置DataStore,我在https://docs.ckan.org/en/latest/maintaining/datastore.html中遵循了此文档。所以问题在于设置权限。

我尝试了以下命令来设置权限:

paster --plugin=ckan datastore set-permissions -c /etc/ckan/default/development.ini | sudo -u postgres psql --set ON_ERROR_STOP=1

作为输出:

You are now connected to database "datastore_default" as user "postgres".
REVOKE
REVOKE
GRANT
GRANT
GRANT
GRANT
REVOKE
GRANT
GRANT
GRANT
ALTER DEFAULT PRIVILEGES
CREATE VIEW
ALTER VIEW
GRANT
CREATE FUNCTION
ALTER FUNCTION
DO

我很生气“你现在已连接到数据库”datastore_default“作为用户”postgres“在我的development.ini中,我有以下设置:

sqlalchemy.url = postgresql://ckan_default:pass@localhost/ckan_default

ckan.datastore.write_url = postgresql://ckan_default:pass@localhost/datastore_default
ckan.datastore.read_url = postgresql://datastore_default:pass@localhost/datastore_default

ckan.site_url = http://127.0.0.1:5000

ckan.plugins = datastore

所以为了测试设置,我尝试了:

curl -X GET "http://127.0.0.1:5000/api/3/action/datastore_search?resource_id=_table_metadata"

我得到以下输出:

“错误请求 - 操作名称未知:datastore_search”

我在这做错了什么?

ckan
1个回答
1
投票

我解决了这个问题。在我的ckan配置文件中,我有ckan.plugins = datastore和ckan.plugins = datapusher。因为没有安装此数据存储区。通过总结到ckan.plugins = datastore datapusher解决了这个问题。

© www.soinside.com 2019 - 2024. All rights reserved.