首页 > 解决方案 > 如何通过 SSL/TLS 连接 Thingsboard 和 Thingsboard 物联网网关?

问题描述

我需要一些帮助,通过 TLS 1.2 安全连接将 Thingsboard IoT 网关与我的 Thingsboard 实例连接起来。

Thingsboard 和 IoT 网关在不同的机器上运行。Thingsboard 配置为仅接受 TLS 1.2 安全连接。

我按照文档 ( https://thingsboard.io/docs/iot-gateway/getting-started/ )中的“入门”部分开始配置 IoT 网关。这以如下错误消息结束:

2019-02-13 15:20:24,796 [main] ERROR o.t.g.s.gateway.MqttGatewayService - Unable to connect to ThingsBoard. Connection timed out after [10000] milliseconds

在 GitHub 上阅读了一些问题,我发现可能必须对密钥库文件进行特定配置。目标 Thingsboard 服务器正在使用 Let's Encrypt 证书。在我的 JAVA cacerts 密钥库中,包含 ISRG Root X1 证书。物联网网关不会使用这个密钥库吗?我是否必须为 IoT 网关提供专用的密钥库文件?

查看配置页面(https://thingsboard.io/docs/iot-gateway/configuration/)我仍然有很多问题。我从未使用过密钥库文件,因此我不知道必须将哪些证书添加到密钥库文件以及如何完成。

这是我当前的 tb-gateway.yml配置:

server:
  # Server bind address
  address: "0.0.0.0"
  # Server bind port
  port: "9090"

# Check new version updates parameters
updates:
  # Enable/disable updates checking.
  enabled: "${UPDATES_ENABLED:true}"

gateways:
  tenants:
    -
      label: "IoT Community"
      reporting:
        interval: 60000
      persistence:
        type: file
        path: storage
        bufferSize: 1000
      connection:
        host: "thingsboard host address"
        port: 8883
        retryInterval: 3000
        maxInFlight: 1000
        security:
          accessToken: "token"
      remoteConfiguration: true
      extensions:
        -
          id: "http"
          type: "HTTP"
          extensionConfiguration: http-config.json

有人可以给我比 Thingsboard 文档更详细的解释吗?

问候,本

标签: sslkeystoretruststorethingsboard

解决方案


推荐阅读