HiveMQ

Failed to update counters / change port number used

Hey, this is my first experience working with an MQTT and it’s not going great so far. My current error is “Failed to update counters”, this seems to be a result of it being on port 1883 which is currently used by java 11. Without Java 11 HiveMQ won’t even operate so now I’m in what seems like a paradox, I need java 11 but it also won’t work because of the port java 11 uses.

Is there a way to change the port used by HiveMQ or Java 11? I’ve looked it up all over and there hasn’t been a clear answer. Help?

Luke

Hello @lcecelon,

yes you can change the port. HiveMQ works with listeners to define where clients have to connect.
For you that means you need to change the port of the default listener.

For that go to the config.xml (in the conf folder) and change the port in <port>1883</port> to for example 1884.

I’m still a bit confused though why Java would use the port 1883, do you maybe have another MQTT broker running that is already using the port 1883?

Greetings,
Michael from the HiveMQ team

I was able to change the port, that is very valuable information so thank you for that. Unfortunately that didn’t solve the problem. When I would run a netstat -ab it would show java using 1883, but I guess that’s HiveMQ using java which is how/why it’s accessing the same port.

2020-09-24 10:51:14,425 INFO - No valid license file found. Using trial license, restricted to 25 connections.
2020-09-24 10:51:18,677 ERROR - Failed to add PDH Counter: \Memory\Pages Input/sec, Error code: 0xC0000BB8
2020-09-24 10:51:18,677 ERROR - Failed to add PDH Counter: \Memory\Pages Output/sec, Error code: 0xC0000BB8
2020-09-24 10:51:18,678 ERROR - Failed to add PDH Counter: \Paging File(_Total)% Usage, Error code: 0xC0000BB8
2020-09-24 10:51:18,682 ERROR - Failed to update counters. Error code: 0x800007D5
2020-09-24 10:51:18,682 ERROR - Failed to update counters. Error code: 0x800007D5
2020-09-24 10:51:18,683 ERROR - Failed to update counters. Error code: 0x800007D5
2020-09-24 10:51:18,683 ERROR - Failed to update counters. Error code: 0x800007D5
2020-09-24 10:51:18,725 ERROR - Failed to add PDH Counter: \Processor(0)% User Time, Error code: 0xC0000BB8
2020-09-24 10:51:18,725 ERROR - Failed to add PDH Counter: \Processor(0)% Privileged Time, Error code: 0xC0000BB8

After this error set it gets stuck on “Failed to update counters”. I have tried cleaning out the windows update files and restarting the windows update program in services but that also didn’t solve anything. Any ideas of what the problem might be? And/or how to solve it?

Luke

Hi @lcecelon,

those are logs indicating some metrics can’t be fetched.
Can you tell me what HiveMQ version and what OS you are using (I guess it is Windows)?

Greetings,
Michael

I am using Windows 10, good guess. And HiveMQ 4.4.1 which I think is the latest version from the site.

Hi @lcecelon,

thanks for the information, can you a little bit more specific what Windows 10 version you are using? I assume it is the 64bit version, but do you have the Home, Pro etc. version? You can find this information with right click on the Windows icon and then clicking on System.

Another interesting information would be the actual Java 11 version you are using.

For example I try to reproduce (without success) this issue with:

  • Windows 10 Pro (64bit); build id 19041
  • openjdk version “11.0.1” 2018-10-16

Greetings,
Michael

My apologizes.

Windows 10 Home edition (64 bit). Hopefully that’s enough because there isn’t any more info like build id that I can find.

Luke

Can you also add your java version please :slight_smile:

Java SE Development kit 15 (64-bit) 15.0.0.0