DataPusher无法连接到CKAN 2.8

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

DataPusher无法与我的CKAN 2.8安装一起使用。我在同一VPS(Amazon EC2实例)上有DataPusher和CKAN。我无法从实例内部卷曲/ api / 3 / action / resource_show,但是可以从外部使用相同的IP地址从外部访问CKAN Web gui。我正在使用默认端口设置/按照CKAN官方文档设置CKAN和DataPusher / DataStore。

检查错误日志(/ var / log / apache2中特别是datapusher.error.log时,最新消息是:

ConnectionError: HTTPConnectionPool(host='{ckan.site_url value, in this case the public IP of the instance}', port=80): Max retries exceeded with url: /api/3/action/resource_show (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x7f3bb0151490>: Failed to establish a new connection: [Errno 110] Connection timed out',))

amazon-web-services ckan
1个回答
0
投票

最终问题是,对于AWS EC2 VPS,您的Ubuntu实例不知道其面向公众的IP地址,这可能是您用来访问所述VPS上托管的CKAN Web gui的地址。

理想情况下,CKAN API可以在内部被命中,但是我无法使用localhost / 127.0.0.1来代替VPS的外部/面向公共IP地址。将ckan site_url设置为localhost的问题是,尝试使用DataPusher(例如,手动启动将资源上传到DataStore)时,您将从CKAN Web gui定向到该问题。您的计算机显然不知道localhost是指CKAN开发服务器。因此,简而言之,ckan site_url值必须是DataPusher和公共Internet上的人员/设备都可以访问的值(假设您希望CKAN实例公开) -可访问)。

这里的解决方案是在实例的安全组的入站规则中,将端口80打开到AWS EC2实例的公共IP地址。换句话说,您是让实例在端口80上命中itself。似乎效率低下,但目前我没有其他选择。总比没有好!

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