CKAN 2.8安装在Ubuntu 16.04.5 LTS上。在为SSL配置之前,Datapusher可以正常工作。通过CKAN界面管理数据集并转到“数据存储”选项卡时,单击“上传到数据存储”按钮时出现以下错误。
错误:进程已完成,但无法发布到result_url
该按钮下方的“上传日志”中没有任何内容,除了“日志结束”消息。
我研究了该错误,并尝试在datapusher_settings.py文件中设置“ SSL_VERIFY = False”并重新启动服务,但错误仍然存在。
datapusher.error.log显示与“ Upload to DataStore”事件相对应的以下错误:
[Mon Jul 01 14:10:28.681458 2019] [wsgi:error] [pid 1391:tid 140226026555136] Job "push_to_datastore (trigger: RunTriggerNow, run = True, next run at: None)" raised an exception
[Mon Jul 01 14:10:28.681479 2019] [wsgi:error] [pid 1391:tid 140226026555136] Traceback (most recent call last):
[Mon Jul 01 14:10:28.681483 2019] [wsgi:error] [pid 1391:tid 140226026555136] File "/usr/lib/ckan/datapusher/lib/python2.7/site-packages/apscheduler/scheduler.py", line 512, in _run_job
[Mon Jul 01 14:10:28.681486 2019] [wsgi:error] [pid 1391:tid 140226026555136] retval = job.func(*job.args, **job.kwargs)
[Mon Jul 01 14:10:28.681489 2019] [wsgi:error] [pid 1391:tid 140226026555136] File "/usr/lib/ckan/datapusher/src/datapusher/datapusher/jobs.py", line 326, in push_to_datastore
[Mon Jul 01 14:10:28.681492 2019] [wsgi:error] [pid 1391:tid 140226026555136] resource = get_resource(resource_id, ckan_url, api_key)
[Mon Jul 01 14:10:28.681495 2019] [wsgi:error] [pid 1391:tid 140226026555136] File "/usr/lib/ckan/datapusher/src/datapusher/datapusher/jobs.py", line 276, in get_resource
[Mon Jul 01 14:10:28.681497 2019] [wsgi:error] [pid 1391:tid 140226026555136] 'Authorization': api_key}
[Mon Jul 01 14:10:28.681506 2019] [wsgi:error] [pid 1391:tid 140226026555136] File "/usr/lib/ckan/datapusher/lib/python2.7/site-packages/requests/api.py", line 110, in post
[Mon Jul 01 14:10:28.681509 2019] [wsgi:error] [pid 1391:tid 140226026555136] return request('post', url, data=data, json=json, **kwargs)
[Mon Jul 01 14:10:28.681511 2019] [wsgi:error] [pid 1391:tid 140226026555136] File "/usr/lib/ckan/datapusher/lib/python2.7/site-packages/requests/api.py", line 56, in request
[Mon Jul 01 14:10:28.681514 2019] [wsgi:error] [pid 1391:tid 140226026555136] return session.request(method=method, url=url, **kwargs)
[Mon Jul 01 14:10:28.681516 2019] [wsgi:error] [pid 1391:tid 140226026555136] File "/usr/lib/ckan/datapusher/lib/python2.7/site-packages/requests/sessions.py", line 488, in request
[Mon Jul 01 14:10:28.681518 2019] [wsgi:error] [pid 1391:tid 140226026555136] resp = self.send(prep, **send_kwargs)
[Mon Jul 01 14:10:28.681521 2019] [wsgi:error] [pid 1391:tid 140226026555136] File "/usr/lib/ckan/datapusher/lib/python2.7/site-packages/requests/sessions.py", line 609, in send
[Mon Jul 01 14:10:28.681523 2019] [wsgi:error] [pid 1391:tid 140226026555136] r = adapter.send(request, **kwargs)
[Mon Jul 01 14:10:28.681526 2019] [wsgi:error] [pid 1391:tid 140226026555136] File "/usr/lib/ckan/datapusher/lib/python2.7/site-packages/requests/adapters.py", line 497, in send
[Mon Jul 01 14:10:28.681528 2019] [wsgi:error] [pid 1391:tid 140226026555136] raise SSLError(e, request=request)
[Mon Jul 01 14:10:28.681534 2019] [wsgi:error] [pid 1391:tid 140226026555136] SSLError: ("bad handshake: Error([('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')],)",)