ckan - CKAN Datastore Create 不起作用,action/datastore_create 说“内部错误”
问题描述
来自 API 的“http://MY_CKAN_URL//api/3/action/datastore_create”返回此错误:
{
"help": "http://MY_CKAN_URL/api/3/action/help_show?name=datastore_create",
"success": false,
"error": {
"message": "Internal Server Error",
"__type": "Internal Server Error"
}
}
我已经在 Docker 中安装了 CKAN,我也遇到了同样的错误,这就是我在 ckan_default.error.log 中的内容:
[wsgi:error] [pid 20:tid 140290595436288] [remote 127.0.0.1:50840] [SQL: 'CREATETRIGGER zfulltext\n BEFORE INSERT OR UPDATE ON "c8ad5ab0-da25-4935-8619-167ea686a1cf"\n FOR EACH ROW EXECUTE PROCEDURE populate_full_text_trigger()']
这里面的error.log:[core:notice] [pid 18:tid 140290744224704] AH00094:命令行:'/usr/sbin/apache2 -D FOREGROUND'
在 Datapusher 中:JobError: CKAN DataStore 响应错误。状态码:500 内部服务器错误。在:http://MY_CKAN_URL/api/3/action/datastore_create。响应:{u'error': {u'__type': u'Internal Server Error', u'message': u'Internal Server Error'},
u'help': u'http://MY_CKAN_URL/api/3/action/help_show?name=datastore_create', u'success': False}
此外,我也有这个错误:
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 10.0.4.222. Set the 'ServerName' directive globally to suppress this message
解决方案
编辑 /etc/ckan/default/production.ini ckan.site_url = http://ckan28.local
在 Postgres 数据库中: sudo -u postgres createuser -S -D -R -P -l datastore_default 输入新角色的密码 sudo -u postgres createdb -O ckan_default datastore_default -E utf-8
使用 sudo -u postgres psql -l 你应该有这个: Name Owner datastore_default ckan_default
编辑:sudo nano /etc/ckan/default/production.ini
ckan.datastore.write_url = postgresql://ckan_default:ckan_default@localhost/datastore_default ckan.datastore.read_url = postgresql://datastore_default:datastore_default@localhost/datastore_default
有了这个它应该可以正常工作。
推荐阅读
- android - 如何在flutter android中将文本添加到默认启动画面
- c++ - XCB:xcb_wait_for_event 未捕获应用程序生成的事件
- java - 插入一对多关系弹簧靴
- ios - 如何通过查看 UID 在 Firestore 数据库中设置新字段
- css - 这里的媒体查询有什么问题?
- php - 来自 nginx 的 $ssl_early_data:应用程序应该以某种方式使用它吗?
- python - 为用户安装了 Windows 10 Python,在系统范围内安装了 GDAL,Python GDAL 绑定无法导入 GDAL
- c++ - 解释 IEEE 754 数字的模定点算法如何工作
- java - 关闭应用程序后清除警报管理器设置的警报
- angular - 没有共享秘密的Angular Spring Oauth2没有Angular