Closed Bu-Ble closed 6 months ago
tbh, i never tried to connect multiple LMDs in a row. But even if this is probably a rare use case, it should work. Some ideas for a workaround. Instead of LMD2, maybe a ssh tunnel or socat tunnel might improve things. Or if LMD1 would be able to directly access the Icinga 2 Backend. But i guess there are reasons for this setup.
What i saw in the wild already was something like this: Thruk -> (unix socket) -> LMD1 -> (https:remote) -> Thruk -> (unix socket) -> Icinga2 But no idea if commands work properly in such scenario. There might be even a second LMD between the remote Thruk and Icinga2.
Hi Sven, thanks for the hint. Replacing LMD2 with socat (OPENSSL-LISTEN + UNIX-CONNECT) solved the problem. 👍
Setup
Thruk -> (tcp:localhost) -> LMD1 -> (tls:remote) -> LMD2 -> (unix socket) -> Icinga2
Problem
When a user triggers a command in Thruk, the command shows up in the logs of LMD1 and LMD2, but it is not being sent to Icinga2.
Analysis
After some other debugging attempts I switched the connection LMD1 -> LMD2 to TCP instead of TLS, so that I could use tcpdump to see what was going on, but the problem was not reproducible over cleartext TCP. So it seems to be related with the TLS communication. Maybe some internal buffering issue?
Logs
TLS connection (command not forwarded):
lmd1.log:
lmd2.log:
TCP connection (no error):
lmd1.log:
lmd2.log:
Version
lmd - version 2.1.7 (Build: , go1.20.7)