Hello,
I am currently attempting to configure a broker cluster on the AWS cloud. Each broker is running inside a Docker container on an EC2 instance. Unfortunately, I am encountering an issue that prevents the broker from starting. The process stalls at the following log messages:
2023-07-23 21:45:45,199 INFO - HiveMQ version: 4.16.0
2023-07-23 21:45:45,199 INFO - HiveMQ home directory: /opt/hivemq-4.16.0
2023-07-23 21:45:45,202 INFO - Log Configuration was overridden by /opt/hivemq-4.16.0/conf/logback.xml
2023-07-23 21:45:46,095 INFO - Successfully loaded configuration from '/opt/hivemq-4.16.0/conf/config.xml'.
2023-07-23 21:45:46,268 WARN - Soft limit for open files (65536) is lower than the recommended limit (1000000). Please increase the open file limit to at least the recommended limit.
2023-07-23 21:45:46,273 WARN - Hard limit for open files (65536) is lower than the recommended limit (1000000). Please increase the open file limit to at least the recommended limit.
2023-07-23 21:45:46,289 INFO - This node's ID is VkU1L
2023-07-23 21:45:46,290 INFO - Clustering is enabled
2023-07-23 21:45:52,584 INFO - No valid license file found. Using trial license, restricted to 25 connections.
2023-07-23 21:45:53,513 INFO - This node uses '1' CPU cores.
2023-07-23 21:45:53,519 INFO - Starting HiveMQ extension system.
2023-07-23 21:45:53,627 INFO - Starting extension with id "hivemq-allow-all-extension" at /opt/hivemq-4.16.0/extensions/hivemq-allow-all-extension
2023-07-23 21:45:53,656 WARN -
################################################################################################################
# This HiveMQ deployment is not secure! You are lacking Authentication and Authorization. #
# Right now any MQTT client can connect to the broker with a full set of permissions. #
# For production usage, add an appropriate security extension and remove the hivemq-allow-all extension. #
# You can download security extensions from the HiveMQ Marketplace (https://www.hivemq.com/extensions/). #
################################################################################################################
2023-07-23 21:45:53,658 INFO - Extension "Allow All Extension" version 1.0.0 started successfully.
2023-07-23 21:45:53,821 INFO - Using TCP cluster transport on address 172.31.37.143 and port 7800
2023-07-23 21:45:53,836 INFO - Using extension cluster discovery
To run the containerized broker, I am using the command docker run -p 8080:8080 -p 8883:8883 -p 7800:7800 --network=host broker
. The IP address 172.31.37.143
corresponds to the private IP of the EC2 instance.
This is the config.xml:
<?xml version="1.0"?>
<hivemq xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="config.xsd">
<listeners>
<tls-tcp-listener>
<port>8883</port>
<bind-address>0.0.0.0</bind-address>
<tls>
<keystore>
<path>conf/keystore.jks</path>
<password>password</password>
<private-key-password>password</private-key-password>
</keystore>
<truststore>
<path>conf/truststore.jks</path>
<password>password</password>
</truststore>
<client-authentication-mode>REQUIRED</client-authentication-mode>
</tls>
</tls-tcp-listener>
</listeners>
<cluster>
<enabled>true</enabled>
<transport>
<tcp>
<bind-address>172.31.37.143</bind-address>
<bind-port>7800</bind-port>
</tcp>
</transport>
<discovery>
<extension/>
</discovery>
</cluster>
<anonymous-usage-statistics>
<enabled>true</enabled>
</anonymous-usage-statistics>
<control-center>
<listeners>
<http>
<port>8080</port>
<bind-address>0.0.0.0</bind-address>
</http>
</listeners>
</control-center>
</hivemq>
Interestingly, the broker functions correctly when not running inside a container, but when run within the container, it gets stuck at the ‘Using extension cluster discovery’ step. This issue is causing urgency, and I would greatly appreciate your assistance in resolving it. If additional information is needed, I am more than willing to provide it.
Thank you in advance for your help.