Closed oktay454 closed 1 year ago
I've been wrangling with this issue for a while. Basically, due to the flatpak sandbox, it's currently not really possible to run ping when using flatpak (without breaking the sandbox).
Therefore, I recommend removing the ping monitor from the "defaults" group. If you really need ping to work, let me know.
Actually, it's not directly necessary. I might even suggest this instead: (We use this method in our self-developed commercial software) We send a TCP packet to the SSH port with Netcat. Thus, we do not have problems in environments where ping packets are blocked. We also understand whether there is access to the SSH port defined for the machine. According to the return response of the package; We check whether the machine is on, the port is closed, or is blocked by the firewall.
For example in Bash:
nc -w 1 -z "IP_ADDRESS" "PORT" && echo 'Open' || echo 'Close'
-w is timeout value
-z is for listening daemons, without sending any data to them
Good idea! I just implemented "tcp-connect" monitoring module for checking a TCP port's openness (port 22 by default). It'll replace ping in the default configuration.
It will be included in the next release (I'll publish in a week or so).
0.5.0 is now out. Since new default configuration will not overwrite your current configuration, you'll want to switch "ping" to "tcp-connect" in the "defaults" config group yourself.
I deleted all configurations and ran it again. But it gave a different error.
[2023-09-17T20:48:04Z WARN default] Qt: Session management error: Could not open network socket
[2023-09-17T20:48:06Z ERROR lightkeeper::connection_manager] [example-host] Error while connecting 127.0.0.1: Bağlantı reddedildi (os error 111)
[2023-09-17T20:48:06Z WARN lightkeeper::monitor_manager] No response messages received for monitor _internal-platform-info-ssh
[2023-09-17T20:48:06Z ERROR lightkeeper::monitor_manager] [example-host] Error from monitor _internal-platform-info-ssh: Error while connecting: Bağlantı reddedildi (os error 111)
[2023-09-17T20:48:06Z WARN default] file:///app/qml/DetailsView/HostDetailsMainView.qml:213:25: QML PropertyTable: the delegate's implicitWidth needs to be greater than zero
That's just the default example-host (localhost) that isn't responding. You'll have to edit it or remove it to add the real hosts that you want.
I am testing on my own machine. =D
We can turn this off. Since another control mechanism was preferred instead of ping, it is no longer necessary.