# Failed to update counters / change port number used

**URL:** <https://community.hivemq.com/t/failed-to-update-counters-change-port-number-used/339>\
**Category:** HiveMQ Community Edition\
**Created:** [September 23, 2020, 1:32pm UTC](https://community.hivemq.com/t/failed-to-update-counters-change-port-number-used/339 "2020-09-23T13:32:39Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![lcecelon](https://avatars.discourse-cdn.com/v4/letter/l/5f8ce5/32.png) [@lcecelon](https://community.hivemq.com/u/lcecelon)\
**Post date:** [September 23, 2020, 1:32pm UTC](https://community.hivemq.com/t/failed-to-update-counters-change-port-number-used/339/1 "2020-09-23T13:32:39Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![michael\_w](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.hivemq.com/michael_w/32/200_2.png) [@michael\_w](https://community.hivemq.com/u/michael_w)\
**Post date:** [September 24, 2020, 6:28am UTC](https://community.hivemq.com/t/failed-to-update-counters-change-port-number-used/339/2 "2020-09-24T06:28:46Z")

</div>

Hello @lcecelon,

yes you can change the port. HiveMQ works with [listeners](https://www.hivemq.com/docs/hivemq/latest/user-guide/listeners.html#tcp-listener) 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

---

<div class="post-metadata">

**Author:** ![lcecelon](https://avatars.discourse-cdn.com/v4/letter/l/5f8ce5/32.png) [@lcecelon](https://community.hivemq.com/u/lcecelon)\
**Post date:** [September 24, 2020, 3:57pm UTC](https://community.hivemq.com/t/failed-to-update-counters-change-port-number-used/339/3 "2020-09-24T15:57:15Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![michael\_w](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.hivemq.com/michael_w/32/200_2.png) [@michael\_w](https://community.hivemq.com/u/michael_w)\
**Post date:** [September 24, 2020, 4:16pm UTC](https://community.hivemq.com/t/failed-to-update-counters-change-port-number-used/339/4 "2020-09-24T16:16:12Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![lcecelon](https://avatars.discourse-cdn.com/v4/letter/l/5f8ce5/32.png) [@lcecelon](https://community.hivemq.com/u/lcecelon)\
**Post date:** [September 24, 2020, 9:10pm UTC](https://community.hivemq.com/t/failed-to-update-counters-change-port-number-used/339/5 "2020-09-24T21:10:58Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![michael\_w](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.hivemq.com/michael_w/32/200_2.png) [@michael\_w](https://community.hivemq.com/u/michael_w)\
**Post date:** [September 25, 2020, 8:06am UTC](https://community.hivemq.com/t/failed-to-update-counters-change-port-number-used/339/6 "2020-09-25T08:06:38Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![lcecelon](https://avatars.discourse-cdn.com/v4/letter/l/5f8ce5/32.png) [@lcecelon](https://community.hivemq.com/u/lcecelon)\
**Post date:** [September 25, 2020, 1:28pm UTC](https://community.hivemq.com/t/failed-to-update-counters-change-port-number-used/339/7 "2020-09-25T13:28:48Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![michael\_w](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.hivemq.com/michael_w/32/200_2.png) [@michael\_w](https://community.hivemq.com/u/michael_w)\
**Post date:** [September 26, 2020, 9:57am UTC](https://community.hivemq.com/t/failed-to-update-counters-change-port-number-used/339/8 "2020-09-26T09:57:26Z")

</div>

Can you also add your java version please 🙂

---

<div class="post-metadata">

**Author:** ![lcecelon](https://avatars.discourse-cdn.com/v4/letter/l/5f8ce5/32.png) [@lcecelon](https://community.hivemq.com/u/lcecelon)\
**Post date:** [September 26, 2020, 2:07pm UTC](https://community.hivemq.com/t/failed-to-update-counters-change-port-number-used/339/9 "2020-09-26T14:07:27Z")

</div>

Java SE Development kit 15 (64-bit) 15.0.0.0
