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

Broken CommandTransport in cluster mode #950

Closed
lbetz opened this issue Dec 20, 2023 · 3 comments · Fixed by #983
Closed

Broken CommandTransport in cluster mode #950

lbetz opened this issue Dec 20, 2023 · 3 comments · Fixed by #983
Assignees
Labels
bug Something isn't working
Milestone

Comments

@lbetz
Copy link
Member

lbetz commented Dec 20, 2023

Describe the bug

I have configured both Icinga 2 nodes in the IcingaDB module on a dedicated running Icinga Web 2. If the first in the list is going down, every sent command get: 'Cannot traverse an already closed generator'.

To Reproduce

  1. configure two running icinga2 instances in /etc/icingaweb2/modules/icingadb/commandtransports.ini, e.g.
    [server1.icinga.com]
    transport = "api"
    host = "server1.icinga.com"
    port = "5665"
    username = "icingaweb2"
    password = "icingaweb2"

[server2.icinga.com]
transport = "api"
host = "server2.icinga.com"
port = "5665"
username = "icingaweb2"
password = "icingaweb2"

  1. stop icinga2 on server1
  2. go to an server or service and send a 'check now' command

Expected behavior

IcingaDB module should try the second icicinga2 (server2) if the first one fails.

Your Environment

Include as many relevant details about the environment you experienced the problem in.

  • Icinga DB Web version (System - About): 1.1.1
  • Icinga Web 2 version (System - About): 2.12.1
  • Web browser: Safari
  • Icinga 2 version (icinga2 --version): 2.14.0
  • Icinga DB version (icingadb --version): 1.1.1
  • PHP version used (php --version): 8.0.30
  • Server operating system and version: Alma Linux 9.2
@nilmerg nilmerg added the bug Something isn't working label Dec 20, 2023
@nilmerg nilmerg added this to the 1.1.2 milestone Dec 20, 2023
@gbin2265
Copy link

Hello,

Can you also do the check that the icinga is not in progress with reloading it?

From this version , the API no longer accepts changes when it is reloading.

Icinga 2 v2.14.0
API: reject config modifications during reload with HTTP status 503.

This question is because reloading takes some time for us.
And if the command transporter refers to the host thas is reloading, then nothing happens.

@lbetz
Copy link
Member Author

lbetz commented Dec 29, 2023

Icinga2 wasn't in progress of reload.

@gbin2265
Copy link

gbin2265 commented Dec 29, 2023

sorry my english is not very good and maybe not explained very well.

I just ask that they do 2 tests.

IF

the first server icinga2 is not running (your check)

OR

the first server is running but has the icinga2 status reloading (my check)

THEN

go to the second server

@nilmerg nilmerg added difficulty/medium Not hard, but only because a detailed description of the needed solution is given difficulty/hard You can do this! Just ask someone for input first, please. And demand (some of) it as comment here! and removed difficulty/medium Not hard, but only because a detailed description of the needed solution is given labels Jan 8, 2024
nilmerg added a commit that referenced this issue Mar 18, 2024
nilmerg added a commit that referenced this issue Mar 18, 2024
@nilmerg nilmerg linked a pull request Mar 21, 2024 that will close this issue
@nilmerg nilmerg self-assigned this Mar 21, 2024
nilmerg added a commit that referenced this issue Mar 22, 2024
nilmerg added a commit that referenced this issue Mar 22, 2024
nilmerg added a commit that referenced this issue Mar 26, 2024
nilmerg added a commit that referenced this issue Mar 26, 2024
@nilmerg nilmerg removed the difficulty/hard You can do this! Just ask someone for input first, please. And demand (some of) it as comment here! label Mar 26, 2024
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
Development

Successfully merging a pull request may close this issue.

3 participants