CKAN 数据存储:错误请求 - 操作名称未知:datastore_search”
CKAN-Datastore: Bad request - Action name not known: datastore_search"
我从 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
作为用户 "postgres",我被 "You are now connected to database "datastore_default 激怒了
在我的 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"
我得到以下输出:
"Bad request - Action name not known: datastore_search"
我做错了什么?
我解决了这个问题。在我的 ckan 配置文件中,我有 ckan.plugins=datastore
和 ckan.plugins=datapusher
。因为没有安装这个数据存储。通过总结 ckan.plugins=datastore datapusher
解决了这个问题。
我从 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
作为用户 "postgres",我被 "You are now connected to database "datastore_default 激怒了 在我的 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"
我得到以下输出:
"Bad request - Action name not known: datastore_search"
我做错了什么?
我解决了这个问题。在我的 ckan 配置文件中,我有 ckan.plugins=datastore
和 ckan.plugins=datapusher
。因为没有安装这个数据存储。通过总结 ckan.plugins=datastore datapusher
解决了这个问题。