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

Unable to listen on 0.0.0.0:4317 when using "Poller initiated connection" #1759

Open
1 of 2 tasks
christophe-activiumid opened this issue Oct 11, 2024 · 1 comment
Open
1 of 2 tasks

Comments

@christophe-activiumid
Copy link

BUG REPORT INFORMATION

Prerequisites

Versions

CMA 24.04.06

Operating System

Windows 2019, Windows 11

How the the component has been installed and versions

  • from packages
  • components versions

Version: -- 24.10 (24.04.06)

Additional environment details (AWS, VirtualBox, physical, etc.):

Description

-- Describe the encountered issue --

Steps to Reproduce

Install the CMA, use Poller iniated connection and input "0.0.0.0:4317"
image

The service is running, the TCP Port is not opened / listening

Error log :

[2024-10-11 19:03:03.470] [centreon-monitoring-agent] [info] [main_win.cc:169] centreon-monitoring-agent start
[2024-10-11 19:03:03.470] [centreon-monitoring-agent] [debug] [grpc_client.cc:51] client this=0x1d9de49b360 activate compression deflate
[2024-10-11 19:03:03.470] [centreon-monitoring-agent] [info] [grpc_client.cc:78] unencrypted connection to 0.0.0.0:4317
[2024-10-11 19:03:03.472] [centreon-monitoring-agent] [info] [scheduler.cc:160] schedule 0 checks to execute in 1s
[2024-10-11 19:03:03.472] [centreon-monitoring-agent] [debug] [bireactor.cc:51] create client this=0x1d9de4e5a20 peer:0.0.0.0:4317
[2024-10-11 19:03:03.492] [centreon-monitoring-agent] [error] [bireactor.cc:99] 0x1d9de4e5a20 client peer:0.0.0.0:4317 fail read from stream
[2024-10-11 19:03:03.493] [centreon-monitoring-agent] [debug] [bireactor.cc:196] 0x1d9de4e5a20 client::shutdown
[2024-10-11 19:03:03.492] [centreon-monitoring-agent] [error] [bireactor.cc:146] 0x1d9de4e5a20 client peer 0.0.0.0:4317 fail write to stream
[2024-10-11 19:03:03.493] [centreon-monitoring-agent] [error] [bireactor.cc:187] 0x1d9de4e5a20 peer:0.0.0.0:4317 client::OnDone(failed to connect to all addresses; last error: UNAVAILABLE: ipv4:0.0.0.0:4317: WSA Error)
[2024-10-11 19:03:03.498] [centreon-monitoring-agent] [debug] [bireactor.cc:57] delete client this=0x1d9de4e5a20 peer:0.0.0.0:4317
[2024-10-11 19:03:13.507] [centreon-monitoring-agent] [debug] [bireactor.cc:51] create client this=0x1d9de528700 peer:0.0.0.0:4317
[2024-10-11 19:03:13.554] [centreon-monitoring-agent] [error] [bireactor.cc:99] 0x1d9de528700 client peer:0.0.0.0:4317 fail read from stream
[2024-10-11 19:03:13.554] [centreon-monitoring-agent] [error] [bireactor.cc:146] 0x1d9de528700 client peer 0.0.0.0:4317 fail write to stream
[2024-10-11 19:03:13.554] [centreon-monitoring-agent] [debug] [bireactor.cc:196] 0x1d9de528700 client::shutdown
[2024-10-11 19:03:13.554] [centreon-monitoring-agent] [error] [bireactor.cc:187] 0x1d9de528700 peer:0.0.0.0:4317 client::OnDone(failed to connect to all addresses; last error: UNAVAILABLE: ipv4:0.0.0.0:4317: WSA Error)
[2024-10-11 19:03:13.568] [centreon-monitoring-agent] [debug] [bireactor.cc:57] delete client this=0x1d9de528700 peer:0.0.0.0:4317

nothing is listening on tcp 4317, the port is free

when inputing the IP of the host interface instead of 0.0.0.0 the error is different :
[2024-10-11 19:05:37.815] [centreon-monitoring-agent] [info] [main_win.cc:169] centreon-monitoring-agent start
[2024-10-11 19:05:37.815] [centreon-monitoring-agent] [debug] [grpc_client.cc:51] client this=0x23f1c1c8bf0 activate compression deflate
[2024-10-11 19:05:37.815] [centreon-monitoring-agent] [info] [grpc_client.cc:78] unencrypted connection to 192.168.10.10:4317
[2024-10-11 19:05:37.817] [centreon-monitoring-agent] [info] [scheduler.cc:160] schedule 0 checks to execute in 1s
[2024-10-11 19:05:37.817] [centreon-monitoring-agent] [debug] [bireactor.cc:51] create client this=0x23f1c21f220 peer:192.168.10.10:4317
[2024-10-11 19:05:39.880] [centreon-monitoring-agent] [error] [bireactor.cc:99] 0x23f1c21f220 client peer:192.168.10.10:4317 fail read from stream
[2024-10-11 19:05:39.880] [centreon-monitoring-agent] [debug] [bireactor.cc:196] 0x23f1c21f220 client::shutdown
[2024-10-11 19:05:39.880] [centreon-monitoring-agent] [error] [bireactor.cc:146] 0x23f1c21f220 client peer 192.168.10.10:4317 fail write to stream
[2024-10-11 19:05:39.880] [centreon-monitoring-agent] [error] [bireactor.cc:187] 0x23f1c21f220 peer:192.168.10.10:4317 client::OnDone(failed to connect to all addresses; last error: UNAVAILABLE: ipv4:192.168.10.10:4317: Connection refused)
[2024-10-11 19:05:39.886] [centreon-monitoring-agent] [debug] [bireactor.cc:57] delete client this=0x23f1c21f220 peer:192.168.10.10:4317

(also same error with 127.0.0.1, but that's not useful)

@christophe-activiumid
Copy link
Author

christophe-activiumid commented Oct 11, 2024

I found the bug after reading the code :

_reverse_connection = get_bool("reverse_connection");

the registry key here is not the same as defined here:

"reversed_grpc_streaming":dword:00000000

I don't know where the client to configure that is coded, I could only fine the service code

when creating manually the registry key "reverse_connection" and setting it to DWORD 1, the service is running

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant