Presto 在使用 SSL 时无法访问网页

Presto cannot access the web page while using SSL

我的presto版本是0.240 我的操作:我想在 presto 中使用 ssl 来使用 https 所以我只通过这个 url 更改我的配置参考:https://trino.io/docs/current/security/internal-communication.html 但我无法访问 presto 地址 https://192.168.100.142:9999/ 我不知道我做错了哪一步。 我应该怎么做才能为 Presto 实现 HTTPS?

这是我的配置: 两台机器组成的集群

节点 1 142 hostname:sbider-dev-01 /opt/presto-server-0.240/etc/config.属性

coordinator=true
node-scheduler.include-coordinator=true
query.max-memory=7.5GB
query.max-memory-per-node=3.5GB
query.max-total-memory-per-node=3.5GB
experimental.reserved-pool-enabled=false
memory.heap-headroom-per-node=0.5GB
#experimental.spill-enabled=true
#experimental.max-spill-per-node=8GB
#experimental.query-max-spill-per-node=8GB
query.low-memory-killer.policy=total-reservation-on-blocked-nodes
#http-server.http.port=9999
#discovery-server.enabled=true
#discovery.uri=http://192.168.100.142:9999

internal-communication.shared-secret="8HRJWX41DwtuYZcNw8uMbshA8wDLoLS78tT3UVL+Z+m0xG7KCygGurE9SXEbGy2bLtPLza1MhAnWJp2mJp/S+j9EFWWuztXz7cHJhSz9QFiVxYCs1Wzn+IVKgHD5z+iGbdKjwRtgUjwNvS4MIfqwqwKlVZiEtGgEDv7j/kAgpOYPvFCRJfb/U/+b7qPpwPNDA6kXu3Dj5p1Q81+kmbFO59WSh6c4QwqdbFHAaY8XFWo8tIogxpmwQQqV3BvICmesxlIhBH/pOGgoyl86QQ/TaAMaWjaddNcgO5keTGhhOj/juGZ/gbOL/PHGNs1ENSPRnjvIGLHFQPDrm36YenhfTH5L7X0Q9HwwnEpEoYkDJsmMEV+elPZK767nZXHryuvDvHGs0PhYSRO8ekOgC3CaE1tfiGh5M9H5C2fnyeGRQ0iwtgXh83kRDuPzVrRx5yj2cHQJOZu+CcXCJ3aa1Tijxq56RfdcEz9Frr8n8aXaNMtRlchcXn3+B4biByS9duq28VHHBDlyYQQ6VSKbLDt1GBi5oOQICtrGuOY+/MD+rnV5uxPUQcSIh9KmA1WjahJEz0ItDKpB66JgVkTrVDWEJPeozKTvHRLG9sBudRhQ5abJGEAhx9b78dUbTcEkRlPuvUN1WjwVlUzjyUDKd14ocuhpoOBzjV9kFhTqQZ4zgNo="

http-server.http.enabled=false

#node.internal-address-source=FQDN
node.internal-address=sbider-dev-01,sbider-dev-02


http-server.https.enabled=true
http-server.https.port=9999

# jks文件全路径
http-server.https.keystore.path=/ceshi/keystore.jks
http-server.https.keystore.key=123456

discovery.uri=https://192.168.100.142:9999

internal-communication.https.required=true

internal-communication.https.keystore.path=/ceshi/keystore.jks
internal-communication.https.keystore.key=123456

节点 2 143 主机名 cat /opt/presto-server-0.240/etc/config.properties

coordinator=flase
query.max-memory=7.5GB
query.max-memory-per-node=3.5GB
query.max-total-memory-per-node=3.5GB
experimental.reserved-pool-enabled=false
memory.heap-headroom-per-node=0.5GB
#experimental.spill-enabled=true
#experimental.max-spill-per-node=8GB
#experimental.query-max-spill-per-node=8GB
query.low-memory-killer.policy=total-reservation-on-blocked-nodes
#discovery.uri=http://192.168.100.142:9999



internal-communication.shared-secret="8HRJWX41DwtuYZcNw8uMbshA8wDLoLS78tT3UVL+Z+m0xG7KCygGurE9SXEbGy2bLtPLza1MhAnWJp2mJp/S+j9EFWWuztXz7cHJhSz9QFiVxYCs1Wzn+IVKgHD5z+iGbdKjwRtgUjwNvS4MIfqwqwKlVZiEtGgEDv7j/kAgpOYPvFCRJfb/U/+b7qPpwPNDA6kXu3Dj5p1Q81+kmbFO59WSh6c4QwqdbFHAaY8XFWo8tIogxpmwQQqV3BvICmesxlIhBH/pOGgoyl86QQ/TaAMaWjaddNcgO5keTGhhOj/juGZ/gbOL/PHGNs1ENSPRnjvIGLHFQPDrm36YenhfTH5L7X0Q9HwwnEpEoYkDJsmMEV+elPZK767nZXHryuvDvHGs0PhYSRO8ekOgC3CaE1tfiGh5M9H5C2fnyeGRQ0iwtgXh83kRDuPzVrRx5yj2cHQJOZu+CcXCJ3aa1Tijxq56RfdcEz9Frr8n8aXaNMtRlchcXn3+B4biByS9duq28VHHBDlyYQQ6VSKbLDt1GBi5oOQICtrGuOY+/MD+rnV5uxPUQcSIh9KmA1WjahJEz0ItDKpB66JgVkTrVDWEJPeozKTvHRLG9sBudRhQ5abJGEAhx9b78dUbTcEkRlPuvUN1WjwVlUzjyUDKd14ocuhpoOBzjV9kFhTqQZ4zgNo="

http-server.http.enabled=false

#node.internal-address-source=FQDN
node.internal-address=sbider-dev-01,sbider-dev-02


http-server.https.enabled=true
http-server.https.port=9999
http-server.https.keystore.path=/ceshi/keystore.jks
http-server.https.keystore.key=123456

discovery.uri=https://192.168.100.142:9999

internal-communication.https.required=true

internal-communication.https.keystore.path=/ceshi/keystore.jks
internal-communication.https.keystore.key=123456

服务器登录 sbider-dev-01:cat /opt/presto-server-0.240/var/log/server.log

                                         Companion catalogs: catalog_name1=catalog_name2,catalog_name3=catalog_name4,...
2021-01-12T12:41:09.766+0800    INFO    main    Bootstrap   transaction.idle-check-interval                                              1.00m                                                                      1.00m                                                                      Time interval between idle transactions checks
2021-01-12T12:41:09.766+0800    INFO    main    Bootstrap   transaction.idle-timeout                                                     5.00m                                                                      5.00m                                                                      Amount of time before an inactive transaction is considered expired
2021-01-12T12:41:09.767+0800    INFO    main    Bootstrap   transaction.max-finishing-concurrency                                        1                                                                          1                                                                          Maximum parallelism for committing or aborting a transaction
2021-01-12T12:41:09.767+0800    WARN    main    Bootstrap   UNUSED PROPERTIES
2021-01-12T12:41:09.767+0800    WARN    main    Bootstrap   internal-communication.shared-secret
2021-01-12T12:41:09.767+0800    WARN    main    Bootstrap   
2021-01-12T12:41:11.037+0800    ERROR   main    com.facebook.presto.server.PrestoServer Unable to create injector, see the following errors:

1) Configuration property 'internal-communication.shared-secret' was not used
  at com.facebook.airlift.bootstrap.Bootstrap.lambda$initialize(Bootstrap.java:238)

1 error
com.google.inject.CreationException: Unable to create injector, see the following errors:

1) Configuration property 'internal-communication.shared-secret' was not used
  at com.facebook.airlift.bootstrap.Bootstrap.lambda$initialize(Bootstrap.java:238)

1 error
    at com.google.inject.internal.Errors.throwCreationExceptionIfErrorsExist(Errors.java:543)
    at com.google.inject.internal.InternalInjectorCreator.initializeStatically(InternalInjectorCreator.java:159)
    at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:106)
    at com.google.inject.Guice.createInjector(Guice.java:87)
    at com.facebook.airlift.bootstrap.Bootstrap.initialize(Bootstrap.java:245)
    at com.facebook.presto.server.PrestoServer.run(PrestoServer.java:131)
    at com.facebook.presto.server.PrestoServer.main(PrestoServer.java:77)

您正在关注 Trino (fka Presto SQL) 文档以保护内部文档,但从 facebook 的项目分支 (prestodb) 中获取了 Presto 二进制文件。

前往 https://trino.io/download.html 获取最新的 Trino 版本。

替代解决方案(使用 prestodb 的文档和 prestodb 的二进制文件)不是安全、可行的替代方案,因为 prestodb 代码库中存在已知且未修复的安全问题。