【问题标题】:SSL connection fails to Datapusher app through port 8800, with NGINX reverse proxy to ApacheSSL 通过端口 8800 连接到 Datapusher 应用程序失败,NGINX 反向代理到 Apache
【发布时间】:2021-07-27 22:38:41
【问题描述】:

我正在为CKAN 安装datapusher 服务。 CKAN 已配置为使用 NGINX 反向代理来路由客户端请求,遵循instructions here。 SSL 证书在 NGINX 中安装和配置。 尝试使用 datapusher 应用程序上传文件时,它失败并且 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。

有什么建议吗?

【问题讨论】:

    标签: apache nginx openssl ckan


    【解决方案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'
    

    【讨论】:

    • 谢谢。我现在已经尝试了这些设置的所有组合,但仍然遇到相同的错误。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2019-08-09
    • 1970-01-01
    • 1970-01-01
    • 2022-01-20
    • 2019-09-05
    • 2020-12-29
    • 1970-01-01
    相关资源
    最近更新 更多