How can I force reload hivemq ESE

I noticed every time I made a change my hivemq log doesn’t change even after I removed disabled. I have to reboot the server in order to get the last updated information in the hivemq.log. Please advise. Also can I have a sample pg_hba.conf. I have problems connecting to the DB in AWS. I matched everything in the config.It says database hivemq doesnt existing which is not true. Any other configuration file for postgres should I take a look.
Thank you!

I seem to resolve the issue. But I got the following in my log.
2023-09-22 09:43:24,437 INFO - Extension “Allow All Extension” version 1.0.0 started successfully.
2023-09-22 09:43:24,438 INFO - Starting extension with id “hivemq-s3-cluster-discovery-extension” at /opt/hivemq/extensions/hivemq-s3-cluster-discovery-extension
2023-09-22 09:43:24,463 INFO - Extension “S3 Cluster Discovery Extension” version 4.0.1 started successfully.
2023-09-22 09:43:24,620 INFO - Using TCP cluster transport on address x.x.x.x and port 7800
2023-09-22 09:43:24,629 INFO - Using extension cluster discovery
2023-09-22 09:43:25,541 INFO - Cluster nodes found by discovery: [xxx|7] (2) [xx, xxx].
2023-09-22 09:43:25,569 INFO - Cluster size = 1, members : [xxx].
2023-09-22 09:43:25,620 INFO - Starting cluster join process. This may take a while. Please do not shut down HiveMQ.
2023-09-22 09:43:25,625 INFO - Cluster join process is still ongoing. Please do not shut down HiveMQ.
2023-09-22 09:43:27,631 INFO - Cluster size = 2, members : [ZZLhG, GS7v2].
2023-09-22 09:43:27,644 INFO - No user for HiveMQ Control Center configured. Starting with default user
2023-09-22 09:43:27,644 INFO - Starting HiveMQ Control Center on address 0.0.0.0 and port 8080
2023-09-22 09:43:27,645 INFO - Finished cluster join process successfully.
2023-09-22 09:43:27,935 INFO - Control Center Audit Logging started.
2023-09-22 09:43:27,935 INFO - Started HiveMQ Control Center in 291ms
2023-09-22 09:43:27,962 INFO - Starting TCP listener on address 0.0.0.0 and port 1883
2023-09-22 09:43:27,983 ERROR - Could not start TCP Listener on port 1883 and address 0.0.0.0. Is it already in use?
2023-09-22 09:43:27,983 ERROR - Could not bind any listener. Stopping HiveMQ.
2023-09-22 09:43:27,994 INFO - Shutting down HiveMQ. Please wait, this could take a while…
2023-09-22 09:43:30,023 INFO - Shutting down extension system
2023-09-22 09:43:30,038 INFO - Stopping extension with id hivemq-allow-all-extension
2023-09-22 09:43:30,039 INFO - Extension “Allow All Extension” version 1.0.0 stopped successfully.
2023-09-22 09:43:30,039 INFO - Stopping extension with id hivemq-s3-cluster-discovery-extension
2023-09-22 09:43:30,040 INFO - Extension “S3 Cluster Discovery Extension” version 4.0.1 stopped successfully.
2023-09-22 09:43:34,438 INFO - Shutdown completed.

Hello @Susan

Welcome to HiveMQ Community! The error message below you’re seeing indicates that the port HiveMQ is trying to bind to (in this case, the default MQTT port 1883) is already in use by another process.

2023-09-22 09:43:27,983 ERROR - Could not start TCP Listener on port 1883 and address 0.0.0.0. Is it already in use?
2023-09-22 09:43:27,983 ERROR - Could not bind any listener. Stopping HiveMQ

If the conflicting process is another instance of HiveMQ, ensure you’re not unintentionally starting HiveMQ multiple times. You can use the netstat or lsof command to see which process is using port 1883.

netstat -an | grep 1883

sudo lsof -i :1883

Regarding the PostgreSQL connection issue, is it an Amazon RDS instance or a local PostgreSQL database server installed on the same server? You can try to connect to the PostgreSQL instance using a tool like psql from your HiveMQ broker to manually check if the database exists and the connection works.

psql -h YOUR_DB_HOST -U YOUR_DB_USER -W -d YOUR_DB_NAME

Kind regards,
Diego from HiveMQ Team

Thank you! I have TCP6 listed listening on 1883. Does hive ESE use TCP6? How can I tell if I have mutltiple hivemq instance running? How to stop one? Or how to disable the TCP6 one if hive is not using it. Thank you! There is no DB issue any more. How to force reload hive ESE without rebooting the server?

tcp 0 0 0.0.0.0:1883 0.0.0.0:* LISTEN
tcp6 0 0 :::1883 :::* LISTEN

Hello Susan,

Not ESE but the TCP Listeners can use TCPv4 and TCPv6. You can check our documentation on how to disable it HiveMQ Configuration :: HiveMQ Documentation

HiveMQ extensions offer hot-reload functionality that allows you to install, enable, and disable extensions at runtime To reload ESE at runtime, locate the extension folder in the extensions directory of your HiveMQ installation and create the file named DISABLED. To enable the ESE at runtime, locate the extension folder in the extensions directory of your HiveMQ installation and remove the DISABLED file.

Kind regards,
Diego from HiveMQ Team

Thank you. I got the disabled part. The documentation did explain how to disable IPv4 and use IPv6. But I want to disable hivemq IPv6 configuration and keep IPv4 as I don’t have IPv6 IP addresses assigned on my broker nodes. Do you have a documentation on disable IPv6 configuration on hivemq? I know the doc said it defaults to IPV4 but in my case I think it is either a bug in the software or something else? It uses both IPv4 and IPv6 thus caused conflicts.

Hello @Susan

You’re right, it’s IPv4 default if you haven’t enable IPv6 listener in the config file

    <listeners>
        <tcp-listener>
            <port>1883</port>
            <bind-address>::</bind-address>
        </tcp-listener>
    </listeners>

Maybe it’s related to the Operation System being used. Please share the results of the command below

ip a

Kind regards,
Diego from HiveMQ Team

I think it is the same hivemq instance. one is listening on IPV4 the other is IPv6. It is the same Process ID.

[root@ip-172-31-81-252 hivemq-enterprise-security-extension]# sudo netstat -antup
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 2531/sshd
tcp 0 0 0.0.0.0:5432 0.0.0.0:* LISTEN 2377/postmaster
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 2473/master
tcp 0 0 0.0.0.0:1883 0.0.0.0:* LISTEN 2371/mosquitto
tcp 0 196 172.31.81.252:22 34.228.65.40:41080 ESTABLISHED 4852/sshd: ec2-user
tcp6 0 0 :::22 :::* LISTEN 2531/sshd
tcp6 0 0 :::5432 :::* LISTEN 2377/postmaster
tcp6 0 0 :::1883 :::* LISTEN 2371/mosquitto
udp 0 0 0.0.0.0:68 0.0.0.0:* 2044/dhclient
udp 0 0 127.0.0.1:323 0.0.0.0:* 1849/chronyd
udp 0 0 127.0.0.1:29323 127.0.0.1:29323 ESTABLISHED 2377/postmaster
udp6 0 0 ::1:323 :::* 1849/chronyd

ip a
root@ip-172-31-81-252 mosquitto]# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9001 qdisc mq state UP group default qlen 1000
link/ether 12:dc:ac:d4:dd:6d brd ff:ff:ff:ff:ff:ff
inet 172.31.81.252/20 brd 172.31.95.255 scope global dynamic eth0
valid_lft 3182sec preferred_lft 3182sec

1883 0.0.0.0

Hello @Susan

It seems the Mosquitto broker is currently running and actively listening on port 1883, which is the default port for MQTT brokers, including HiveMQ.

tcp 0 0 0.0.0.0:1883 0.0.0.0:* LISTEN 2371/mosquitto
tcp6 0 0 :::1883 :::* LISTEN 2371/mosquitto

It’s crucial to stop the Mosquitto broker before attempting to start HiveMQ.

Kind regards,
Diego from HiveMQ Team

1 Like