gpt4 book ai didi

user-interface - HiveMQ 中 Web UI 的 SSL/TLS

转载 作者:太空宇宙 更新时间:2023-11-03 13:49:46 26 4
gpt4 key购买 nike

我正在尝试为 CentOS 上的 HiveMQ 3.4.2 的 Web UI 启用 ssl 连接。我已经像这样更改了 config.xml 文件

<?xml version="1.0"?>
<hivemq xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../../hivemq-config.xsd">
...
<web-ui>
<enabled>true</enabled>
<listeners>
<https>
<port>8080</port>
<bind-address>0.0.0.0</bind-address>
<tls>
<keystore>
<path>/home/hivemq/myjks.jks</path>
<password>changeme</password>
<private-key-password>changeme</private-key-password>
</keystore>
</tls>
</https>
</listeners>
...
</web-ui>
...
</hivemq>

我正在用这一行创建自签名证书:

keytool -genkey -keyalg RSA -alias hivemq -keystore hivemq.jks -storepass changeme -validity 360 -keysize 2048

如果我尝试启动 HiveMQ,我会收到一条错误消息:

2019-03-11 19:19:05,671 WARN - FAILED SslContextFactory@628bd77e(,): java.io.FileNotFoundException: /home (Is a directory) java.io.FileNotFoundException: /home (Is a directory) at java.io.FileInputStream.open0(Native Method) at java.io.FileInputStream.open(FileInputStream.java:195) at java.io.FileInputStream.(FileInputStream.java:138) at org.eclipse.jetty.util.resource.FileResource.getInputStream(Unknown Source) at org.eclipse.jetty.util.security.CertificateUtils.getKeyStore(Unknown Source) at org.eclipse.jetty.util.ssl.SslContextFactory.loadKeyStore(Unknown Source) at org.eclipse.jetty.util.ssl.SslContextFactory.doStart(Unknown Source) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(Unknown Source) at org.eclipse.jetty.util.component.ContainerLifeCycle.start(Unknown Source) at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(Unknown Source) at org.eclipse.jetty.server.SslConnectionFactory.doStart(Unknown Source) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(Unknown Source) at org.eclipse.jetty.util.component.ContainerLifeCycle.start(Unknown Source) at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(Unknown Source) at org.eclipse.jetty.server.AbstractConnector.doStart(Unknown Source) at org.eclipse.jetty.server.AbstractNetworkConnector.doStart(Unknown Source) at org.eclipse.jetty.server.ServerConnector.doStart(Unknown Source) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(Unknown Source) at org.eclipse.jetty.server.Server.doStart(Unknown Source) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(Unknown Source) at et.a.a(Unknown Source) at et.a.a(Unknown Source) at com.hivemq.HiveMQServer.b(Unknown Source) at com.hivemq.HiveMQServer.a(Unknown Source) at com.hivemq.HiveMQServer.main(Unknown Source)

2019-03-11 19:19:05,672 WARN - FAILED SslConnectionFactory@2fafa7b5{SSL-HTTP/1.1}: java.io.FileNotFoundException: /home (Is a directory) java.io.FileNotFoundException: /home (Is a directory) at java.io.FileInputStream.open0(Native Method) at java.io.FileInputStream.open(FileInputStream.java:195) at java.io.FileInputStream.(FileInputStream.java:138) at org.eclipse.jetty.util.resource.FileResource.getInputStream(Unknown Source) at org.eclipse.jetty.util.security.CertificateUtils.getKeyStore(Unknown Source) at org.eclipse.jetty.util.ssl.SslContextFactory.loadKeyStore(Unknown Source) at org.eclipse.jetty.util.ssl.SslContextFactory.doStart(Unknown Source) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(Unknown Source) at org.eclipse.jetty.util.component.ContainerLifeCycle.start(Unknown Source) at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(Unknown Source) at org.eclipse.jetty.server.SslConnectionFactory.doStart(Unknown Source) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(Unknown Source) at org.eclipse.jetty.util.component.ContainerLifeCycle.start(Unknown Source) at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(Unknown Source) at org.eclipse.jetty.server.AbstractConnector.doStart(Unknown Source) at org.eclipse.jetty.server.AbstractNetworkConnector.doStart(Unknown Source) at org.eclipse.jetty.server.ServerConnector.doStart(Unknown Source) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(Unknown Source) at org.eclipse.jetty.server.Server.doStart(Unknown Source) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(Unknown Source) at et.a.a(Unknown Source) at et.a.a(Unknown Source) at com.hivemq.HiveMQServer.b(Unknown Source) at com.hivemq.HiveMQServer.a(Unknown Source) at com.hivemq.HiveMQServer.main(Unknown Source)

2019-03-11 19:19:05,672 WARN - FAILED ServerConnector@181098bf{SSL-HTTP/1.1}{0.0.0.0:8443}: java.io.FileNotFoundException: /home (Is a directory) java.io.FileNotFoundException: /home (Is a directory) at java.io.FileInputStream.open0(Native Method) at java.io.FileInputStream.open(FileInputStream.java:195) at java.io.FileInputStream.(FileInputStream.java:138) at org.eclipse.jetty.util.resource.FileResource.getInputStream(Unknown Source) at org.eclipse.jetty.util.security.CertificateUtils.getKeyStore(Unknown Source) at org.eclipse.jetty.util.ssl.SslContextFactory.loadKeyStore(Unknown Source) at org.eclipse.jetty.util.ssl.SslContextFactory.doStart(Unknown Source) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(Unknown Source) at org.eclipse.jetty.util.component.ContainerLifeCycle.start(Unknown Source) at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(Unknown Source) at org.eclipse.jetty.server.SslConnectionFactory.doStart(Unknown Source) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(Unknown Source) at org.eclipse.jetty.util.component.ContainerLifeCycle.start(Unknown Source) at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(Unknown Source) at org.eclipse.jetty.server.AbstractConnector.doStart(Unknown Source) at org.eclipse.jetty.server.AbstractNetworkConnector.doStart(Unknown Source) at org.eclipse.jetty.server.ServerConnector.doStart(Unknown Source) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(Unknown Source) at org.eclipse.jetty.server.Server.doStart(Unknown Source) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(Unknown Source) at et.a.a(Unknown Source) at et.a.a(Unknown Source) at com.hivemq.HiveMQServer.b(Unknown Source) at com.hivemq.HiveMQServer.a(Unknown Source) at com.hivemq.HiveMQServer.main(Unknown Source)

2019-03-11 19:19:05,673 WARN - FAILED org.eclipse.jetty.server.Server@632b5c79: java.io.FileNotFoundException: /home (Is a directory) java.io.FileNotFoundException: /home (Is a directory) at java.io.FileInputStream.open0(Native Method) at java.io.FileInputStream.open(FileInputStream.java:195) at java.io.FileInputStream.(FileInputStream.java:138) at org.eclipse.jetty.util.resource.FileResource.getInputStream(Unknown Source) at org.eclipse.jetty.util.security.CertificateUtils.getKeyStore(Unknown Source) at org.eclipse.jetty.util.ssl.SslContextFactory.loadKeyStore(Unknown Source) at org.eclipse.jetty.util.ssl.SslContextFactory.doStart(Unknown Source) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(Unknown Source) at org.eclipse.jetty.util.component.ContainerLifeCycle.start(Unknown Source) at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(Unknown Source) at org.eclipse.jetty.server.SslConnectionFactory.doStart(Unknown Source) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(Unknown Source) at org.eclipse.jetty.util.component.ContainerLifeCycle.start(Unknown Source) at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(Unknown Source) at org.eclipse.jetty.server.AbstractConnector.doStart(Unknown Source) at org.eclipse.jetty.server.AbstractNetworkConnector.doStart(Unknown Source) at org.eclipse.jetty.server.ServerConnector.doStart(Unknown Source) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(Unknown Source) at org.eclipse.jetty.server.Server.doStart(Unknown Source) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(Unknown Source) at et.a.a(Unknown Source) at et.a.a(Unknown Source) at com.hivemq.HiveMQServer.b(Unknown Source) at com.hivemq.HiveMQServer.a(Unknown Source) at com.hivemq.HiveMQServer.main(Unknown Source)

2019-03-11 19:19:05,673 ERROR - Not able to start Web UI: /home (Is a directory)

不知道怎么回事。有人可以帮帮我吗?

最佳答案

好像是在启动HiveMQ之前没有保存正确路径的配置。根据堆栈跟踪判断,您的 config.xml 当前仅包含 keystore 的路径“/home”。

在启动 HiveMQ 之前,通过确保保存正确的路径可以轻松解决此问题。

最好的问候,

来自 HiveMQ 团队的 Abdullah

关于user-interface - HiveMQ 中 Web UI 的 SSL/TLS,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55108315/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com