# No connection could be made because the target machine actively refused it

**URL:** <https://community.icinga.com/t/no-connection-could-be-made-because-the-target-machine-actively-refused-it/14505>\
**Category:** Service Monitoring\
**Created:** [January 27, 2025, 10:49am UTC](https://community.icinga.com/t/no-connection-could-be-made-because-the-target-machine-actively-refused-it/14505 "2025-01-27T10:49:58Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![ChrisIAS](https://community.icinga.com/letter_avatar_proxy/v4/letter/c/ee7513/32.png) [@ChrisIAS](https://community.icinga.com/u/ChrisIAS)\
**Post date:** [January 27, 2025, 10:49am UTC](https://community.icinga.com/t/no-connection-could-be-made-because-the-target-machine-actively-refused-it/14505/1 "2025-01-27T10:49:58Z")

</div>

Hi,

i’ve got some Windows Servers, i am monitoring with icinga. In the last 5month i monitored this machine without any issues. For the usual services(cpu, ram, filesystem), i use an appy rule, to do the same checks on every machine, I have. Only this machine, decided to throw an Error after the weekend:  
_A plugin failed to fetch Performance Counter information. Please ensure the counter is written properly and available on your system._  
_I don’t know what changed and leaded to this error._

I tried to fix it with, no success. I uninstalled the Agent and reinstalled it. Now I am at the point where my master can connect to the agent on the windows server, but when I would like to check cpu, ram, or filesystem I get error:

_Can’t connect to IfW API on host ‘localhost’ port ‘5668’: No connection could be made because the target machine actively refused it [system:10061 at C:\local\boost\_1\_86\_0-Win64\boost/asio/detail/win\_iocp\_socket\_connect\_op.hpp:104:5 in function ‘do\_complete’]_

The usual solution on the internet for this is to switch of the firewall. I switched it off. nothing changed.

-the Windows firewall is completly switched off  
-I haven’t got any endpoint protection on this machine installed(no virusscan, etc)  
-i don’t use a proxy  
-Icinga master and this windows machine are in the same subnet and communicating without any router or hardware-firewall in between.

Does anyone have any idea how to troubleshoot this?

Thanks for your advice, in advance  
Best regards  
Chris

an overview how it looks like:

 ![grafik](https://community.icinga.com/uploads/default/original/2X/4/411f5ec76186e2c9e76358dfc4ca3099ef66911e.png)

---

<div class="post-metadata">

**Author:** ![moreamazingnick](https://community.icinga.com/user_avatar/community.icinga.com/moreamazingnick/32/7725_2.png) [@moreamazingnick](https://community.icinga.com/u/moreamazingnick)\
**Post date:** [January 27, 2025, 9:53pm UTC](https://community.icinga.com/t/no-connection-could-be-made-because-the-target-machine-actively-refused-it/14505/2 "2025-01-27T21:53:56Z")

</div>

It looks like you killed the icinga powershell framework and the checks executed by the ifw-api.  
You can start to troubleshoot:

- open powershell type `Use-Icinga`

---

<div class="post-metadata">

**Author:** ![ChrisIAS](https://community.icinga.com/letter_avatar_proxy/v4/letter/c/ee7513/32.png) [@ChrisIAS](https://community.icinga.com/u/ChrisIAS)\
**Post date:** [January 31, 2025, 11:04am UTC](https://community.icinga.com/t/no-connection-could-be-made-because-the-target-machine-actively-refused-it/14505/3 "2025-01-31T11:04:51Z")

</div>

> [@moreamazingnick](#):
>
> Use-Icinga

Hi Moreamazingnick  
Thank you for your replay.  
i can call this command, nothing happens. No error, no promt. Is this the right behaviour?

 ![image](https://community.icinga.com/uploads/default/original/2X/7/771ef10630053c785ccd2bb1b81fbda6eed2e07e.png)

---

<div class="post-metadata">

**Author:** ![moreamazingnick](https://community.icinga.com/user_avatar/community.icinga.com/moreamazingnick/32/7725_2.png) [@moreamazingnick](https://community.icinga.com/u/moreamazingnick)\
**Post date:** [January 31, 2025, 11:19am UTC](https://community.icinga.com/t/no-connection-could-be-made-because-the-target-machine-actively-refused-it/14505/4 "2025-01-31T11:19:39Z")

</div>

Your Powershell framework is there.  
Is the icinga powershell service in the state running or stopped?

---

<div class="post-metadata">

**Author:** ![ChrisIAS](https://community.icinga.com/letter_avatar_proxy/v4/letter/c/ee7513/32.png) [@ChrisIAS](https://community.icinga.com/u/ChrisIAS)\
**Post date:** [January 31, 2025, 12:07pm UTC](https://community.icinga.com/t/no-connection-could-be-made-because-the-target-machine-actively-refused-it/14505/5 "2025-01-31T12:07:03Z")

</div>

both services are running:  
 ![image](https://community.icinga.com/uploads/default/original/2X/4/4ae9e9fc8a057e843785665db23b4490b1416327.png)

---

<div class="post-metadata">

**Author:** ![moreamazingnick](https://community.icinga.com/user_avatar/community.icinga.com/moreamazingnick/32/7725_2.png) [@moreamazingnick](https://community.icinga.com/u/moreamazingnick)\
**Post date:** [January 31, 2025, 5:26pm UTC](https://community.icinga.com/t/no-connection-could-be-made-because-the-target-machine-actively-refused-it/14505/6 "2025-01-31T17:26:59Z")

</div>

What is the output of this on your Maschine:

> use-icinga  
> Test-IcingaForWindowsService

If you Agentin powershell framework 1.13 update to 1.13.1 first

---

<div class="post-metadata">

**Author:** ![ChrisIAS](https://community.icinga.com/letter_avatar_proxy/v4/letter/c/ee7513/32.png) [@ChrisIAS](https://community.icinga.com/u/ChrisIAS)\
**Post date:** [February 3, 2025, 8:06am UTC](https://community.icinga.com/t/no-connection-could-be-made-because-the-target-machine-actively-refused-it/14505/7 "2025-02-03T08:06:00Z")

</div>

Hi Moreamazingnick  
Okay, i just installed the latest version:

 ![image](https://community.icinga.com/uploads/default/original/2X/5/50256a80224381c3e75f48371923a7a017819335.png)

The output is:

 ![image](https://community.icinga.com/uploads/default/original/2X/d/d22ec84082dd462e0631c8b3d4dc58e7dbd52207.png)

this looks okay.

> [@moreamazingnick](#):
>
> powershell framework

---

<div class="post-metadata">

**Author:** ![henning](https://community.icinga.com/letter_avatar_proxy/v4/letter/h/ecae2f/32.png) [@henning](https://community.icinga.com/u/henning)\
**Post date:** [October 16, 2025, 2:00pm UTC](https://community.icinga.com/t/no-connection-could-be-made-because-the-target-machine-actively-refused-it/14505/8 "2025-10-16T14:00:02Z")

</div>

Hi Chris,  
did you solve this?  
Otherwise please try `Test-IcingaForWindows`.  
With IfW-Framework 1.13.3 the output should look similar to this:

 ![grafik](https://community.icinga.com/uploads/default/original/2X/e/e2a74b93b4bd9742bc0894520f37fb1f3af54595.jpeg)

---

<div class="post-metadata">

**Author:** ![ChrisIAS](https://community.icinga.com/letter_avatar_proxy/v4/letter/c/ee7513/32.png) [@ChrisIAS](https://community.icinga.com/u/ChrisIAS)\
**Post date:** [October 22, 2025, 8:45am UTC](https://community.icinga.com/t/no-connection-could-be-made-because-the-target-machine-actively-refused-it/14505/9 "2025-10-22T08:45:32Z")

</div>

Hi Henning,

no, I is still have this Problem. The output of your command is:

 ![image](https://community.icinga.com/uploads/default/original/2X/b/b4ebe5174bffbe5369bff6b179f41b6fe3aa1c16.png)

I wanted to make shure to have the latest version, so I did:  
`Use-Icinga Update-Icinga Install-IcingaSecurity`

It’s telling me. The JEA profile is succsessfully installed.

 ![image](https://community.icinga.com/uploads/default/original/2X/3/3c4cb22d804dcd85678963e4679e6b28833b76b5.png)

Still, “the computers says NO!”  
I am getting the same error from the first screenshot.

---

<div class="post-metadata">

**Author:** ![redian](https://community.icinga.com/letter_avatar_proxy/v4/letter/r/919ad9/32.png) [@redian](https://community.icinga.com/u/redian)\
**Post date:** [November 20, 2025, 7:33am UTC](https://community.icinga.com/t/no-connection-could-be-made-because-the-target-machine-actively-refused-it/14505/10 "2025-11-20T07:33:08Z")

</div>

Hi Chris,

I hope you could solve your issue by now.

I stumbeled upon your post when I got this very similar error below.  
My problem was that winrm did not start automatically. Have you checked its service is running?  
`Get-Service WinRM`

You can also get a look into the config:  
`winrm get winrm/config`

> Can’t connect to IfW API on host ‘localhost’ port ‘5668’: Es konnte keine Verbindung hergestellt werden, da der Zielcomputer die Verbindung verweigerte [system:10061 at C:\local\boost\_1\_89\_0-Win64\boost/asio/detail/win\_iocp\_socket\_connect\_op.hpp:104:5 in function ‘void \_\_cdecl boost::asio::detail::win\_iocp\_socket\_connect\_op\<class boost::asio::detail::spawn\_handler\<class boost::asio::executor,​void \_\_cdecl(class boost::system::error\_code),​void\>,​class boost::asio::executor\>::do\_complete(void \*,​class boost::asio::detail::win\_iocp\_operation \*,​const class boost::system::error\_code &,​unsigned \_\_int64)’]

---

<div class="post-metadata">

**Author:** ![ChrisIAS](https://community.icinga.com/letter_avatar_proxy/v4/letter/c/ee7513/32.png) [@ChrisIAS](https://community.icinga.com/u/ChrisIAS)\
**Post date:** [November 20, 2025, 8:55am UTC](https://community.icinga.com/t/no-connection-could-be-made-because-the-target-machine-actively-refused-it/14505/11 "2025-11-20T08:55:13Z")

</div>

Hi,  
some days ago, i contacted netways to see if they can help. They discovered that we got problems with JEA Profile.

This commands fixt the Problems:

`Update-IcingaJEAProfile`

and

`Test-IcingaForWindows -ResolveProblems`

Since this session, the servers/Agents work well. We still in testing and observe, if it’s happening again.
