Problem installing trial version

I’m new to MQTT so forgive me for my lack of knowledge.

We manufacture radio telemetry systems using UHF radio modules but I’m developing an alternative module to communicate via MQTT. I have designed a wi-fi interface around an Espressif ESP32-C3 module, running their ESP-AT firmware so the interface to out host is a serial port using AT commands. Their User Guide includes examples for configuring the module.

My first problem is that I tried to install HiveMQ on a Windows laptop as a platform for developing our interface driver, but it doesn’t install properly. The log shows the following:

2024-09-23 11:36:24,263 INFO - Starting HiveMQ Enterprise Server
2024-09-23 11:36:24,265 INFO - HiveMQ version: 4.32.0
2024-09-23 11:36:24,265 INFO - HiveMQ home directory: S:\Dropbox\Files\Software\XC_Net\ESP\hivemq
2024-09-23 11:36:24,345 INFO - Log Configuration was overridden by S:\Dropbox\Files\Software\XC_Net\ESP\hivemq\conf\logback.xml
2024-09-23 11:36:24,739 INFO - Successfully loaded configuration from ‘S:\Dropbox\Files\Software\XC_Net\ESP\hivemq\conf\config.xml’.
2024-09-23 11:36:25,070 INFO - This node’s ID is WTLSv
2024-09-23 11:36:25,071 INFO - Clustering is disabled
2024-09-23 11:36:34,943 INFO - No valid license file found. Using trial license, restricted to 25 connections.
2024-09-23 11:36:36,419 INFO - No valid license file for Data Hub found. Using free license, restricted to 1 policy.
2024-09-23 11:36:36,678 INFO - Audit Logger started.
2024-09-23 11:36:36,780 INFO - This node uses ‘8’ CPU cores.
2024-09-23 11:36:36,797 INFO - Starting HiveMQ extension system.
2024-09-23 11:36:36,900 INFO - Starting extension with id “hivemq-allow-all-extension” at S:\Dropbox\Files\Software\XC_Net\ESP\hivemq\extensions\hivemq-allow-all-extension
2024-09-23 11:36:36,914 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 (HiveMQ Extensions Marketplace: MQTT Integration Made Easy).

################################################################################################################
2024-09-23 11:36:36,916 INFO - Extension “Allow All Extension” version 1.1.0 started successfully.
2024-09-23 11:36:39,117 INFO - WTLSv: no members discovered after 2010 ms: creating cluster as first member
2024-09-23 11:36:39,162 INFO - No user for HiveMQ Control Center configured. Starting with default user
2024-09-23 11:36:39,162 INFO - Starting HiveMQ Control Center on address 127.0.0.1 and port 8080
2024-09-23 11:36:39,239 INFO - Mounting HiveMQ Control Center V2 Preview
2024-09-23 11:36:39,814 ERROR - Not able to start HiveMQ Control Center: Failed to bind to /127.0.0.1:8080
2024-09-23 11:36:39,842 INFO - Starting TCP listener on address 0.0.0.0 and port 1883
2024-09-23 11:36:39,874 ERROR - Could not start TCP Listener on port 1883 and address 0.0.0.0. Is it already in use?
2024-09-23 11:36:39,875 ERROR - Could not bind any listener. Stopping HiveMQ.
2024-09-23 11:36:39,879 INFO - Shutting down HiveMQ. Please wait, this could take a while…
2024-09-23 11:36:39,890 INFO - Shutting down listeners and clients
2024-09-23 11:36:39,891 INFO - Shutdown of listeners is done
2024-09-23 11:36:39,891 INFO - No clients are connected, proceeding with shutdown
2024-09-23 11:36:43,133 INFO - Shutting down extension system
2024-09-23 11:36:43,135 INFO - Stopping extension with id hivemq-allow-all-extension
2024-09-23 11:36:43,137 INFO - Extension “Allow All Extension” version 1.1.0 stopped successfully.
2024-09-23 11:36:45,826 INFO - Shutdown completed.

You will see that it includes Not able to start HiveMQ Control Center: Failed to bind to /127.0.0.1:8080. The HiveMQ isntructions say that the installation can be tested by browsing http://localhost:8080 but that gives Access error 404. However it is listening on port 1883, as shown from the command line:

C:\Users\L-G>netstat -an | findstr “1883”
TCP 127.0.0.1:1883 0.0.0.0:0 LISTENING
TCP [::1]:1883 [::]:0 LISTENING

I have tried rebooting the laptop in case another app is using the port but I’ve run out of ideas for other solutions.

My second problem is that once I have established communication via the local HiveMQ platform I will need th access a cloud server so we can offer the system to customers. However the Espressif user manual only goes as far as accessing a local server. Does anyone have any experience of using AT commands to access a remote server?

Hi @RouseA,

Welcome to the HiveMQ Community! We’re thrilled to have you here, especially with your interest in MQTT and the HiveMQ broker. It’s always great to see new users like you getting started.

The error message Failed to bind to /127.0.0.1:8080 indicates that another application is already using port 8080 on your Windows laptop, which is preventing HiveMQ from binding to it. Here’s how you can resolve the issue:

  1. Use netstat to find the application using the port:

    • Open Command Prompt as an administrator.
    • Run the following command:
    netstat -ano | findstr :8080
    

    This will display active connections or listeners on port 8080 along with the Process ID (PID).

  2. Find the corresponding application in Task Manager:

    • Note the PID from the netstat output.
    • Open Task Manager (Ctrl + Shift + Esc).
    • Go to the Details tab.
    • Look for the PID column and find the matching process.
    • The Name column will show the application using the port.
  3. Terminate the process or change the port:

    • If the application using port 8080 isn’t necessary, you can stop it directly in Task Manager.
    • Alternatively, you can configure HiveMQ or the conflicting application to use a different port.
  4. How to configure HiveMQ to use a different port:
    You can find instructions for changing the HiveMQ Control Center port here:
    Configuring HiveMQ Control Center Ports.

Let me know if you need help adjusting the HiveMQ settings or if you encounter any other issues.

Regarding AT-Commands, while we don’t have a ready-to-use solution for your specific device, you might find helpful insights in this community thread:
Cert Issue When Connecting to HiveMQ Cloud.

Best regards,
Dasha from the HiveMQ Team

Thanks, Dasha, but I still have the problem.

I did find another app was using 8080. I no longer use that app so I deleted it then rebooted. Now when I try run.bat it seems to successfully load HiveMQ Control Center but then fails to open TCP listener, saying Could not start TCP Listener on port 1883 and address 0.0.0.0. Is it already in use?. It then shuts down HiveMQ. I’ve looked on Task Manager and no app is using port 1883

Hi RouseA,

Thank you for the update! It sounds like there may still be an issue with port 1883 being blocked, even though Task Manager doesn’t show any applications using it. This could indicate that another MQTT broker or a service is running and blocking that port.

To further diagnose the issue, you can try the following commands in your command prompt:

  1. Check for processes using port 1883:

Copy code

netstat -aon | findstr :1883
  1. Identify the process ID (PID) of the service using the port:
    After running the above command, note the PID. Then use:

php

Copy code

tasklist | findstr <PID>
  1. If you find a process using the port, you can terminate it:

php

Copy code

taskkill /PID <PID> /F

After ensuring that port 1883 is free, try starting HiveMQ again. If the issue persists, please let me know, and we can explore other potential solutions.

Best,
Dasha from The HiveMQ Team

Thanks, Dasha. I eventually found that I had installed Mosquito some time earlier and somehow it was being run each time I rebooted the laptop. There was no indication on Task Manager that it was running and it wasn’t listed in startup apps. I uninstalled Mosquito and all is now working

Regards
Alan Rouse
XC Comms Ltd