We recommend using C:\hivemq as the home installation folder. The following examples follows this recommendation.
\uD83E\uDD14 Problem
The Windows service fails to start following the instructions provided in this link or in the HiveMQ Documentation.
...
The solution involves utilizing the newer version of the Java wrapper, a tool specifically designed for running Java programs as Windows services.
Download
View file name yajswhivemq-windows-stableservice-13.10022024.zip Unzip the downloaded file to the
$HIVEMQ_HOME
directory.If you followed the abovementioned instructions, your
$HIVEMQ_HOME
directory is likelyC:\hivemq\hivemq-windows-service-022024
.
If your
$HIVEMQ_HOME
directory is different, such asC:\hivemq\hivemq-4.2.25
orF:\HiveMQ
, edit the wrapper’s configuration file as followsLocate the wrapper’s configuration file
at
conf/wrapper.conf
. In our case its pathC:\hivemq
\hivemq
Locate the wrapper’s configuration file at
conf/-windows-service-022024
\conf\wrapper.conf
.Find the line at the end of the file resembling:
Code Block language bash wrapper.java.additional.1 = -Dhivemq.home=C:\\hivemq
Update Replace the existing text
C:\\hivemq
according to with your actual$HIVEMQ_HOME
directory. For example, if it'sF:\HiveMQ
, update the line to:Code Block language bash wrapper.java.additional.1 = -Dhivemq.home=F:\\HiveMQ
$HIVEMQ_HOME
directory andwrapper.conf
matches the actual$HIVEMQ_HOME
, proceed to the services.save the file
Once step 3 is complete, please proceed with the following steps:
Remove the old (failing) HiveMQ service by
Open services app with run(win+R)>services.
msc
Find the existing HiveMQ service
Select the HiveMQ service and delete it
Install the new service by running
C:\hivemq\hivemq-windows-service-022024\bat\installService.bat
(Run As Administrator might be necessary) under the newly unzipped service folder. This will install the new HiveMQ service.Start You can either restart the computer or Manually start the new HiveMQ service by going to
run(win+R)>services.msc>HiveMQ
service and starting it.Please monitor the HiveMQ service and look for any issues within the first 30 seconds.
If the HiveMQ service runs without failing for more than 30 seconds, check the
C:\hivemq\log\hivemq.log
file for errors and ensure it contains "HiveMQ started in
".Confirm that you can log in to the HiveMQ Control Center.
Info |
---|
If you prefer building the wrapper on your own, for example, for a newer version, follow its author’s instructions provided in this video. |
🐛 Troubleshooting
\uD83E\uDD14 Problem
When I double click the install.bat file in Windows, It prints some stuff and closes then quickly. What to do?
\uD83C\uDF31 Solution
You need to run the bat file from the Windows Terminal. This way the window does not close when the script ends.
Open Windows Terminal:
Press
Win + X
and selectWindows Terminal
(orWindows Terminal (Admin)
if administrative privileges are needed).
Navigate to the Directory:
In the terminal, navigate to the directory where your batch file is located.
Code Block language powershell cd C:\hivemq\bin
Run the Batch File:
Once in the correct directory, type the name of the batch file and press
Enter
.Code Block language powershell install-something.bat
Observe the output of the bat file in the terminal
\uD83D\uDCCE Related articles
...