Hello HiveMQ Community,
I’m reviving this thread because it matches an issue that I consistently face when setting up HiveMQ CE.
The issue very often occurs however randomly resolves itself after uninstalling/installing the Windows Service, performing multiple machine reboots or moving system environment variables…
Is this a known issue with Windows Service on HiveMQ CE?
Your guidance would be very much appreciated.
My set up/installation steps are as follows:
-Windows Server 2016 Datacenter (v1607), 64-bit, x64
-OpenJDK 15.0.1
-HiveMQ CE 2020.2 with default config listening on 0.0.0.0:1883
- Downloaded the latest version of OpenJDK from jdk java net (v15.0.1 as of today) and extract \jdk-15.0.1 to C:\Program Files\Java\jdk-15.0.1
- Added Environment Variables for JAVA_HOME (pointing to C:\Program Files\Java\jdk-15.0.1) and edited PATH to include C:\Program Files\Java\jdk-15.0.1 and C:\Program Files\Java\jdk-15.0.1\bin moving both up to the top of the list)
-
Downloaded HiveMQ CE 2020.2 (from https://github.com/hivemq/hivemq-community-edition/) and extracted subfolders (e.g. \bin, \conf) to C:\IOT\HiveMQ
-
Downloaded Windows-Service (from https://hivemq.com/additional-software/hivemq-windows-service.zip and extracted windows-service subfolder folder extracted to C:\IOT\HiveMQ
-
Ran run.bat as administrator and confirmed that HiveMQ starts
-
Ran installService.bat and confirmed that HiveMQ Windows Service is installed
-
Re-booted machine
8) Result: Service doesn’t start
Services
Windows could not start the HiveMQ service on Local Computer
Error 2: The system cannot find the file specified.
Path to executable:
java.exe -classpath C:\IOT\HiveMQ\windows-service\wrapper.jar -Xrs -Dwrapper.service=true -Dwrapper.working.dir=C:\IOT\HiveMQ\bin -Djna_tmpdir=C:\IOT\HiveMQ\windows-service\bat/…/tmp -Dwrapper_home=C:\IOT\HiveMQ\windows-service\bat/… -Dwrapper.config=C:\IOT\HiveMQ\windows-service\conf\wrapper.conf -Dwrapper.additional.1x=-Xrs -Djna_tmpdir=C:\IOT\HiveMQ\windows-service\bat…\tmp org.rzo.yajsw.boot.WrapperServiceBooter
-
Re-booted machine multiple more times, uninstalled and re-installed Windows-Service, moved moved Environment Variables up and down and eventually HiveMQ service started
-
There’s no rhyme or reason that I can tell for how the service eventually starts
Only one screenshot allowed:
Path System Environment Variable
Yours sincerely,
Johann