2017-04-04 146 views
0

我正在为CKAN安装datapusher服务。 CKAN已被配置为使用NGINX反向代理服务器,路由客户端请求,遵循instructions here。 SSL证书在NGINX中安装和配置。 当试图使用datapusher应用上传一个文件,它失败和Apache日志给出了这样的错误:SSL连接无法通过端口8800 Datapusher应用,NGINX反向代理到Apache

Mon Apr 03 13:49:10.979179 2017] [:error] [pid 15468] 2017-04-03 13:49:10,979 CRITI [ckanext.datapusher.plugin] {'status_code': 403, 'message': 'An Error occurred while sending the job: 403 Client Error: Forbidden', 'details': u'<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">\\n<html><head>\\n<title>403 Forbidden</title>\\n</head><body>\\n<h1>Forbidden</h1>\\n<p>You don\\'t have permission to access /job\\non this server.</p>\\n<hr>\\n<address>Apache/2.4.7 (Ubuntu) Server at 127.0.0.1 Port 8800</address>\\n</body></html>\\n'} 

当测试通过OpenSSL的访问datapusher的8800端口,这是输出:

[Mon Apr 03 13:49:10.981049 2017] [:error] [pid 15468] [remote 127.0.0.1:6855] Error - <type 'exceptions.TypeError'>: notify() takes exactly 3 arguments (2 given) 
open:/etc/ckan> openssl s_client -connect 127.0.0.1:8800 
CONNECTED(00000003) 
140385459791520:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:s23_clnt.c:794: 
--- 
no peer certificate available 
--- 
No client certificate CA names sent 
--- 
SSL handshake has read 7 bytes and written 275 bytes 

datapusher文档提供绕过SSL here的解决方法,使用SSL_Verify配置。我试过这个,没有任何变化。

我认为我需要: 1.强制nginx反向代理允许通过端口8800(除了443)的SSL连接。或... 2.配置ckan/datapusher/apache/nginx以绕过端口880上的SSL/https。

有什么建议吗?

回答

1

我相信403错误是在这一点上,CKAN向DataPusher发送一个请求,要求它加载特定资源。 DataPusher仅在Apache上运行,因此位于HTTP(而不是HTTPS),因此SSL应该没有问题。检查CKAN配置是默认:

ckan.datapusher.url = http://127.0.0.1:8800/ 

DataPusher的SSL_VERIFY设置是在以后的请求 - 当datapusher使得在ckan.site_url到CKAN的请求,这对于您将通过nginx的走了过来HTTPS。您可能需要此设置,具体取决于您的python中的SSL是否兼容。阅读代码表明你需要引号,并确保密钥全部大写。即在您datapusher_settings.py:

SSL_VERIFY = 'False' 
+0

谢谢。我现在已经尝试了这些设置的所有组合,并且仍然出现相同的错误。 –

+0

我标记了一个问题:https://github.com/ckan/datapusher/issues/149 –