Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invoke-CheckNetworkInterface Exception calling "Add" with "2" argument(s) #148

Closed
ErwinE opened this issue Mar 24, 2021 · 4 comments · Fixed by #179
Closed

Invoke-CheckNetworkInterface Exception calling "Add" with "2" argument(s) #148

ErwinE opened this issue Mar 24, 2021 · 4 comments · Fixed by #179
Assignees
Labels
bug Something isn't working
Milestone

Comments

@ErwinE
Copy link

ErwinE commented Mar 24, 2021

Hello,

we enabled the network interface check for over 600 windows systems.
On about 10% of our systems we get the same error. It´s seems that it´s especially on cluster systems.

The command which is executed by all our Windows devices:

'Invoke-IcingaCheckNetworkInterface' '-IncludeNetworkDevice' '@()' '-ExcludeNetworkDevice' '@()' '-ExcludeInterfaceTeam' '@()' '-IncludeInterfaceTeam' '@()' '-Verbosity' '2'

The error from some systems:

[UNKNOWN]: Exception calling "Add" with "2" argument(s): "Item has already been added. Key in dictionary: '*****'  Key being added: '*****'"
CheckCommand: Invoke-IcingaCheckNetworkInterface

Arguments: -IncludeNetworkDevice System.Object[] -ExcludeNetworkDevice System.Object[] -ExcludeInterfaceTeam System.Object[] -IncludeInterfaceTeam System.Object[] -Verbosity 2

Has someone a idea where this error could come from?
If you need any further information just please ask.

Thank you very much!

Best Regards,
Erwin

@LordHepipud LordHepipud self-assigned this Apr 23, 2021
@LordHepipud LordHepipud added the bug Something isn't working label Apr 23, 2021
@LordHepipud
Copy link
Collaborator

This is a very interesting issue. Does this relate to team interfaces or other interfaces as well?
For some reason it can happen that an interface with the same name is present, which causes issues.

@LordHepipud LordHepipud added this to the v1.5.0 milestone Apr 23, 2021
@ErwinE
Copy link
Author

ErwinE commented Apr 26, 2021

This is a very interesting issue. Does this relate to team interfaces or other interfaces as well?
For some reason it can happen that an interface with the same name is present, which causes issues.

Hello @LordHepipud,
I checked the systems and in our case this problem exist only for team interfaces.
Thank you for your help!

@LordHepipud
Copy link
Collaborator

Could you please test if the linked PR resolved the issue and all data is displayed correctly for your team interfaces?

@ErwinE
Copy link
Author

ErwinE commented May 31, 2021

Could you please test if the linked PR resolved the issue and all data is displayed correctly for your team interfaces?

Hi @LordHepipud,

I tested the new script on several systems and it seems that it´s now working without any problems.

Thank you very much!

@ErwinE ErwinE closed this as completed May 31, 2021
LordHepipud added a commit that referenced this issue May 31, 2021
…eams

Fix: Exception on Invoke-CheckNetworkInterface on duplicate team interface

Fixes exception on `Invoke-CheckNetworkInterface` while two team interfaces with the identical name are present on the system

Fixes #148
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants