如何在 Zeppelin 中设置 SSL

Posted

技术标签:

【中文标题】如何在 Zeppelin 中设置 SSL【英文标题】:How to setup SSL in Zeppelin 【发布时间】:2019-09-23 17:03:11 【问题描述】:

我正在尝试在 Zeppelin 中设置 SSL,并在关注 instructions 和所有相关的 Google 搜索之后,zeppelin 服务状态说没问题,但网络响应是 ERR_CONNECTION_REFUSED

这些是我修改的 zeppelin-site.xml 的部分

<property>
  <name>zeppelin.ssl</name>
  <value>true</value>
  <description>Should SSL be used by the servers?</description>
</property>

<property>
  <name>zeppelin.ssl.client.auth</name>
  <value>false</value>
  <description>Should client authentication be used for SSL connections?</description>
</property>

<property>
  <name>zeppelin.ssl.keystore.path</name>
  <value>/opt/zeppelin/lib/keystore</value>
  <description>Path to keystore relative to Zeppelin configuration directory</description>
</property>

<property>
  <name>zeppelin.ssl.keystore.type</name>
  <value>JKS</value>
  <description>The format of the given keystore (e.g. JKS or PKCS12)</description>
</property>

<property>
  <name>zeppelin.ssl.keystore.password</name>
  <value><super secret password></value>
  <description>Keystore password. Can be obfuscated by the Jetty Password tool</description>
</property>

<property>
  <name>zeppelin.ssl.truststore.path</name>
  <value>/opt/zeppelin/lib/keystore</value>
  <description>Path to truststore relative to Zeppelin configuration directory. Defaults to the keystore path</description>
</property>

<property>
  <name>zeppelin.ssl.truststore.type</name>
  <value>JKS</value>
  <description>The format of the given truststore (e.g. JKS or PKCS12). Defaults to the same type as the keystore type</description>
</property>

然后这是服务状态,说我正在运行,但实际上网页返回错误:

● zeppelin.service - Zeppelin service
   Loaded: loaded (/etc/systemd/system/zeppelin.service; enabled; vendor preset: enabled)
   Active: active (running) since Thu 2019-05-09 18:26:41 UTC; 28s ago
  Process: 347 ExecStop=/opt/zeppelin/bin/zeppelin-daemon.sh stop (code=exited, status=0/SUCCESS)
  Process: 413 ExecStart=/opt/zeppelin/bin/zeppelin-daemon.sh start (code=exited, status=0/SUCCESS)
 Main PID: 441 (java)
    Tasks: 39 (limit: 4662)
   CGroup: /system.slice/zeppelin.service
           └─441 java -Dfile.encoding=UTF-8 -Xms1024m -Xmx1024m -XX:MaxPermSize=512m -Dlog4j.configuration=file:///opt/zeppelin/conf/log4j.properties -Dzeppelin.log.file=/opt/zeppelin/logs/zeppelin-zeppelin-myserver.log -cp ::/op

【问题讨论】:

你有来自请求日志的任何信息吗? 我在zeppelin/logs/* 中检查了.log.out 文件,但没有任何迹象表明有任何问题。是否有其他日志可以寻求帮助? 你在哪个操作系统上安装了这个,你能运行相当于 systemctl status zeppelin.service 的东西吗? 我在 Ubuntu 上。我将使用服务状态和我的 zeppelin-site.xml 更新我的主要帖子 【参考方案1】:

您应该将 zeppelin.ssl 属性设置为 true :

<property>
   <name>zeppelin.ssl</name>
   <value>true</value>
   <description>Should SSL be used by the servers?</description>
</property>

【讨论】:

复制到帖子时我的错误。我一直把它设置为真。当我这样做时,网站没有响应。

以上是关于如何在 Zeppelin 中设置 SSL的主要内容,如果未能解决你的问题,请参考以下文章

如何在Unix / Linux消息队列中设置基于ssl的通信?

如何在 Spring Boot 嵌入式 tomcat 中设置 HTTPS SSL 密码套件首选项

zeppelin 动态加载 jars

如何在 IBM Liberty Server 中设置 Greenplum 数据源

如何在 Azure Service Fabric 中的自托管 Web API 上配置 SSL

在 python http.client.HTTPSConnection 中设置更新的 ssl 版本