HiveMQ

Starting Hivemq

Greetings,
I’m using version 3.4.3 because version 4 requires java 11 which does not exist for arm processors to my knowledge.
I’m experimenting with a small cluster of servers, 1 of them having an arm processor as mentioned. All systems have similar hivemq config files. All systems are using Ubuntu Linux. All systems are 64bit except for the Arm system. However 1 of the Intel servers is getting the following error in the hivemq.log file:

Could not read the configuration file /opt/hivemq/conf/config.xml. Using default configuration:

This is causing other problems because the default config is conflicting with the other hivemq servers.
It’s not a permission problem because if I use version 4 with the same config it works. All files in the hivemq folder are owned by hivemq user as specified. Below is the config file in question:

Any help would be appreciated.

<?xml version="1.0"?> 11883 192.168.1.102 hivemq.jks inspired inspired NONE
<cluster>
    <!-- Enable clustering -->
    <enabled>true</enabled>
    <transport>
        <tcp>
            <!-- 127.0.0.1 only forms a cluster on the local machine.
             Replace the IP address with the real address of your public
             interface to form a cluster over the public network -->
            <bind-address>192.168.1.102</bind-address>
            <bind-port>7800</bind-port>
        </tcp>
    </transport>
    <discovery>
        <static>
            <node>
                <!--  Replace the IP address and port with this node's configuration  -->
                <host>192.168.1.102</host>
                <port>7800</port>
            </node>
            <node>
                <!--  Replace the IP address and port with another node's configuration  -->
                <host>192.168.1.135</host>
                <port>7800</port>
            </node>
            <node>
                <!--  Replace the IP address and port with another node's configuration  -->
                <host>192.168.1.89</host>
                <port>7800</port>
            </node>
            <node>
                <!--  Replace the IP address and port with another node's configuration  -->
                <host>192.168.1.131</host>
                <port>7800</port>
            </node>
        </static>
    </discovery>
</cluster>

<control-center>
    <enabled>true</enabled>
    <listeners>
        <http>
            <port>18080</port>
            <bind-address>localhost</bind-address>
        </http>
        <https>
            <port>8443</port>
            <bind-address>0.0.0.0</bind-address>
            <tls>
                <keystore>
		    <path>/opt/hivemq/hivemq.jks</path>
                    <password>inspired</password>
                    <private-key-password>inspired</private-key-password>
                </keystore>
            </tls>
        </https>
    </listeners>
</2ontrol-center>

<web-ui>
    <enabled>true</enabled>
    <listeners>
        <http>
            <port>8082</port>
            <bind-address>192.168.1.102</bind-address>
        </http>
    </listeners>
</web-ui>

@iomari Nice to see your interest in HiveMQ and MQTT.
Your control-center brackets have typo at the closing brackets </2onctrol-center>.
FYI: HiveMQ 3 uses the terminology <web-ui>, which I can see you added as well.
The <control-center> brackets can be removed entirely.

Regards,
Florian from The HiveMQ Team.

Thank you.

Two other issues if you could help:

  1. on the clustering setup, I see in your example on your documentation site that the port of the local system is 7800 and the other are 7801. How should I setup my ports on the other machines?

  2. I’m wlll remove the control center section. However I can’t access the web ui. I get a page not found.

Thanks in advance

  1. The ports you configure on each machine have to match the ports configured on the other machines for discovery.
  2. The <web-ui> configuration defines availability of the Web UI. Port 8082 in your example.

Regards,
Florian from The HiveMQ Team

Thank you. I am using http://localhost:8082 nut I’m getting page not found.

You did not bind it to localhost.

sorry I meant I’m using http://bindip:8082 from the local machine and other machines on the network.

Check you HiveMQ log. It will tell you and where the Web UI listeners is listening.
In case you cannot reach it, the likely cause are firewall rules or similar.
The HiveMQ side configuration looks fine.
Alternatively you can also just remove the <web-ui> brackets. As a result the Web UI will be listening on http://localhost:8080

Regards,
Florian from The HiveMQ Team

thank you. You’ve been a big help.