[英]CKAN datapusher error 500 datapusher.wsgi cannot be loaded as python module
[英]Uploading files in CKAN but received 'Could not connect to DataPusher' error
我正在尝试将文件上传到 CKAN。 但是,我从日志中收到此错误:
{'message': 'Could not connect to DataPusher.', 'details': "HTTPConnectionPool(host='localhost', port=8800): Max retries exceeded with url: /job (Caused by NewConnectionError(': Failed to build新连接:[Errno 99] 无法分配请求的地址',))"}
CKAN重试几次后,终于上传完成。 我能够下载我的资源并跟踪视图。
我不明白为什么前几次连接失败。 我尝试使用 curl 来测试连接: curl http://localhost:8800
但我收到错误:
curl: (56) Recv 失败:连接由对等方重置。
然后我尝试修改我的ckan.ini
,现在设置如下:
ckan.plugins = datastore datapusher
ckan.datapusher.url = http://localhost:8800
同样在 datapusher.conf 中,我的主机设置为0.0.0.0
并且端口设置为8800
:
Listen 8800
<VirtualHost 0.0.0.0:8800>
ServerName ${CKAN_SERVER_NAME}
ServerAlias www.${CKAN_SERVER_NAME}
<Directory "${DATAPUSHER_CONFIG}">
Require all granted
</Directory>
WSGIScriptAlias / ${DATAPUSHER_CONFIG}/datapusher.wsgi
WSGIPassAuthorization On
ErrorLog /var/log/apache2/datapusher.error.log
CustomLog /var/log/apache2/datapusher.custom.log combined
<IfModule mod_headers.c>
Header set X-UA-Compatible "IE=edge"
</IfModule>
</VirtualHost>
在datapusher_settings.py
, Host 和 Port 也设置为'0.0.0.0'
和8800
。
我读了这篇文章,但我没有发现任何与此设置不同的地方。 然后我将ckan.ini
主机从localhost
命名空间更改为实际的127.0.0.1
,并在 CKAN docker 容器中重新启动 apache 服务,但它仍然返回
无法连接到 Datapusher
我尝试上传文件,但以不同的错误号结尾,如下所示:
{'message': 'Could not connect to DataPusher.', 'details': "HTTPConnectionPool(host='127.0.0.1', port=8800): 最大重试次数超过 url: /job (Caused by NewConnectionError(': Failed)建立新连接:[Errno 111] 连接被拒绝',))"}
令人惊讶的是,在CKAN中重试连接几次后,我能够查看资源文件并下载它。 我很困惑,因为我几个月来都在使用相同的设置,而且我还没有更新任何配置,而且这个问题最近才开始出现。
我找到了一种手动解决开发问题的方法。 该问题是由机器上未运行的 datapusher 引起的。 我手动启动了datapusher
python datapusher/main.py deployment/datapusher_settings.py
datapusher 运行无中断后,ckan 可以再次连接到datapusher。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.