Reputation: 1
I am trying to enable ssl connection for Web UI of HiveMQ 3.4.2 on CentOS. I have changed the config.xml file like this
<?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>
I'm creating self signed certificat with this line:
keytool -genkey -keyalg RSA -alias hivemq -keystore hivemq.jks -storepass changeme -validity 360 -keysize 2048
I recive an error message, if I'm trying to start 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)
I don't know what is wrong. Can some one help me please.
Upvotes: 0
Views: 163
Reputation: 71
It seems like that the configuration with the correct path was not saved before starting HiveMQ. Judging by the stack trace your config.xml contains currently only the path "/home" for the keystore.
This should be easily resolved by making sure that your correct path is saved, before starting HiveMQ.
Best regards,
Abdullah from The HiveMQ Team
Upvotes: 2