Icinga2 on windows server not listening of port 5665 but port 1


(Majales) #1

After couple of months I tried to refresh some windows agent installations but I found really strange behavior of installed icinga2 agent… It just totally ignores config and listenting on port 1! instead of 5665. So questions is what’s wrong… I even tried to downgrade from 2.8.2 to 2.7.2 version but result is the same… Is is possible it could be caused by some bad access rights?

[2018-11-22 15:36:53 Central Europe Standard Time] information/ScriptGlobal: Dumping variables to file ‘C:\ProgramData\icinga2\var/cache/icinga2/icinga2.vars’
[2018-11-22 15:36:53 Central Europe Standard Time] information/ConfigObject: Restoring program state from file ‘C:\ProgramData\icinga2\var/lib/icinga2/icinga2.state’
[2018-11-22 15:36:53 Central Europe Standard Time] information/ConfigObject: Restored 95 objects. Loaded 0 new objects without state.
[2018-11-22 15:36:53 Central Europe Standard Time] information/ConfigItem: Triggering Start signal for config items
[2018-11-22 15:36:53 Central Europe Standard Time] information/ApiListener: ‘api’ started.
[2018-11-22 15:36:53 Central Europe Standard Time] information/ApiListener: Adding new listener on port ‘1’
[2018-11-22 15:36:53 Central Europe Standard Time] information/ConfigItem: Activated all objects.
[2018-11-22 15:36:53 Central Europe Standard Time] information/ApiListener: Reconnecting to endpoint icinga2.master via host ‘True’ and port ‘5665’…


(Michael Friedrich) #2

Which Windows type and version is that?


(Majales) #3

Windows Server 2012 R2 Standard


(Majales) #4

If I scan that port 1 with nmap ( windows firewall rule open) it shows it it really icinga2 api… strange…


(Michael Friedrich) #5

Googled for it, seems Windows implements tcpmux which proxies such requests to other services.


(Majales) #6

Well, that was my mistake… I have used powershell script taken from https://github.com/Icinga/icinga2-powershell-module , and it worked flawlessly before… Seems something has changed in windows powershell, and it could not read default agent port variable from script unless it has been set explicit. When I set it as I did with other variables it started working as expected.