【问题标题】:Realm Object Server - SSL configuration causes ROS to fail startRealm Object Server - SSL 配置导致 ROS 启动失败
【发布时间】:2017-03-28 06:10:43
【问题描述】:

Ubuntu 16.04 / ROS v1.3.0

我正在尝试将我的 ROS 配置为使用安全 SSL 连接。

如果我不对configuration.yml 进行任何更改 - ROS 就可以了。我可以按预期同步和使用仪表板。

我已从 Letsencrypt 获得 SSL 证书。我在独立模式下使用 CertBot,这样我就不必安装或配置 Nginx。 (我的偏好是不安装另一个技术/层 - 保持清洁!)

我在此文件夹中存储了以下证书/密钥: /etc/letsencrypt/live/data.mydomain.net/cert.pem /etc/letsencrypt/live/data.mydomain.net/chain.pem /etc/letsencrypt/live/data.mydomain.net/fullchain.pem /etc/letsencrypt/live/data.mydomain.net/privkey.pem

configuration.yml 中启用 HTTPS 后,我将无法启动 ROS。

没有错误消息写入: /var/log/realm-object-server.log

这是configuration.yml的代理部分的副本。

  http:
    ## Whether or not to enable the HTTP proxy module. It enables multiplexing requests
    ## by forwarding incoming requests on a single port to all services.
    # enable: true

    ## The address/interface on which the HTTP proxy module should listen. This defaults
    ## to 127.0.0.1. If you wish to listen on all available interfaces,
    ## uncomment the following line.
    # listen_address: '::'

    ## The port that the HTTP proxy module should bind to.
    # listen_port: 9080

  https:
    ## Whether or not to enable the HTTPS proxy module. It enables multiplexing requests
    ## by forwarding incoming requests on a single port to all services.
    ## Note that even if it enabled, the HTTPS proxy will only start if supplied
    ## with a valid pair of certificates through certificate_path and private_key_path below.
    enable: true

    ## The path to the certificate and private keys (in PEM format) that will be used
    ## to set up the HTTPS server accepting connections.
    ## These configuration options are MANDATORY to start the HTTPS proxy module.
    certificate_path: '/etc/letsencrypt/live/data.mydomain.net/fullchain.pem'
    private_key_path: '/etc/letsencrypt/live/data.mydomain.net/privkey.pem'

    ## The address/interface on which the HTTPS proxy module should listen. This defaults
    ## to 127.0.0.1. If you wish to listen on all available interfaces,
    ## uncomment the following line.
    # listen_address: '::'

    ## The port that the HTTPS proxy module should bind to.
    listen_port: 9443

正如我提到的。问题似乎是,一旦我配置了 HTTPS,ROS 服务器就无法启动。如果我禁用 HTTPS,那么 ROS 服务器将毫无问题地启动。

我认为 ROS 无法启动的原因是 - 如果我从终端尝试 curl 127.0.0.1:9080curl 127.0.0.1:9443,我会收到消息 curl: (7) Failed to connect to 127.0.0.1 port 9443: Connection refused

我很想听听您的想法/想法/建议,让我了解如何让它发挥作用。干杯。伊恩

【问题讨论】:

  • 我忘了添加 - 如果有人找到/编写了有关如何配置 ROS SSL 的教程,请分享链接!谢谢。
  • 我也有类似的问题。我的系统使用 systemd,journalctl 揭示了 ROS 无法启动的原因:尽管指向正确的文件,但 ROS 在符号链接上失败。我的解决方案是使用 certbot 的 --renew-hook 并将新的证书文件复制到 /etc/realm/certs 并将 configuration.yml 指向这些文件。现在 ROS 又开始了。
  • 谢谢 M-x。我试过你的想法。但没有区别。请问我可以请您将我(以上)的设置与您的设置进行比较吗?我想知道是否还有一些奇怪的设置组合会破坏 ROS。干杯。
  • @M-x。我让它工作了。感谢这个问题/答案。 stackoverflow.com/questions/42952989/…

标签: ssl realm-mobile-platform


【解决方案1】:

感谢用户@Radu - 答案是权限。

realm 用户没有读取 .pem 文件的权限。

我从这个答案中得到了答案。 Https Proxy for Realm Object Server not working

@Radu - 是男人!

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-11-09
    • 1970-01-01
    • 2017-08-25
    • 2017-08-03
    • 2019-05-08
    • 2012-02-29
    相关资源
    最近更新 更多