Connection loss

Questions about WAPT Server / Requests and help related to the WAPT server
Forum Rules
Community Forum Rules
* English support on www.reddit.com/r/wapt
* French community support is available on this forum
* Please prefix the topic title with [RESOLVED] if it is resolved.
* Please do not edit a topic that is tagged [RESOLVED]. Open a new topic referencing the old one.
* Specify the installed WAPT version, full version, and build number (2.2.1.11957 / 2.2.2.12337 / etc.) as well as the Enterprise/Discovery edition.
* Versions 1.8.2 and earlier are no longer supported. The only questions accepted regarding version 1.8.2 are related to upgrading to a supported version (2.1, 2.2, etc.).
* Specify the server OS (Linux/Windows) and version (Debian Buster/Bullseye - CentOS 7 - Windows Server 2012/2016/2019).
* Specify the OS of the administration/package creation machine and the machine with the problematic agent, if applicable (Windows 7/10/11/Debian 11/etc.).
* Avoid asking multiple questions when opening a topic, otherwise it may be ignored. If there are multiple topics, open separate topics, preferably one after the other and not all at the same time (i.e., do not spam the forum).
* Include code snippets, screenshots, and other images directly in the post. Links to Pastebin, Bitly, and other third-party sites will be systematically removed.
* As with any community forum, support is provided voluntarily by members. If you require commercial support, you can contact Tranquil IT's sales department at 02.40.97.57.55
Locked
flipflip
Messages: 56
Registration: May 31, 2022 - 09:05

February 22, 2023 - 2:13 PM

Hello everyone,

I have a problem with a rather unusual case.

On my PC, I have a Windows 7 VM (yes, not ideal, but I don't have a choice at the moment) managed with VirtualBox, which I use, among other things, to manage the PC fleet with the Wapt console. I work on-site, sometimes from home, or even while traveling (4G connection).

When I'm on-site, my VM is configured this way at the network level, and my network's DHCP server assigns me a local IP address in the 192.168.xx range
wapt-1.png
wapt-1.png (12.44 KB) Viewed 3815 times
When I'm at home, the VPN is launched by the host and my VM is configured in NAT mode with a 10.xxx IP address

In both cases, the machine's IP address in the console updates correctly.

Yesterday, from home, on this VM, I modified the host package to add a program to install. I clicked save to launch the installation when the machine shut down. In the evening, I shut down my VM but prevented the installation from completing.

This morning I arrived on site, modified the network settings of my VM as shown in the first screenshot, and started the VM. I logged in and launched the console. My machine appeared as reachable with my local network IP address, and I decided to shut it down again to run the package installation I had scheduled yesterday. However, everything didn't go as planned, and the installation failed before I had time to note the error message.

I launch the wapt console and look at the "Tasks" tab of my machine and I get the message:

Code: Select all

Impossible de récupérer l'action. Error on server:
EWaptTimeoutWaitingForResult('Timeout, client did not send result within 15.0 s')
And while we wait a little longer, the to-do list is loading but practically everything is Pending.
wapt-2.png
wapt-2.png (39.08 KB) Viewed 3815 times
To test, I shut down my VM, switched VirtualBox back to NAT, and restarted. My VM obtained a 10.xxx IP address, and I launched the console. My machine appeared correctly with the new address, but the tasks remained pending or displayed a timeout error.

It's as if the Wapt server could see my machine but didn't really know where to send all that data.
User avatar
dcardon
WAPT Expert
Messages: 1930
Registration: June 18, 2014 - 09:58
Location: Saint Sébastien sur Loire
Contact :

February 24, 2023 - 11:53

Hello Flipflip,

Could you please check the WAPT service logs to see what the problem is? Are you able to reproduce it deterministically on-premises by switching to 4G/NAT, then to LAN/Bridge, and then back again? What is the DNS suffix of your domain? Is it .local? Which DNS server are you using when you are in NAT mode?

In WAPT's operating mode, the server never connects directly to the workstation (in the TCP/IP sense). The workstation always connects to the server and establishes a bidirectional WebSocket.

Best regards,

Denis

PS: From an architectural point of view, it would be good to have a management machine accessible via RDP on your production network.
Denis Cardon - Tranquil IT
Share your experiences on WAPT! Send us your blog and article URLs in the "Your Opinion of the forum, and we'll feature them on the WAPT
flipflip
Messages: 56
Registration: May 31, 2022 - 09:05

February 27, 2023 - 4:30 PM

Good morning,

Sorry for the delayed response. I took the time to continue my tests, and it might be a complete coincidence that this is happening with my VM. Let me explain.

I deployed the agent across my entire network, and for 98% of the machines it works perfectly; it's even incredibly effective. But there's still the remaining 2%. The only thing these machines have in common is their domain name, which is displayed in uppercase, while on all the other machines it's displayed in lowercase. And in this 2%, apart from my VM, these machines are always used on the local network.

On the server log side, the same timeout error was reported, but no further information was provided.

Whether remotely or locally, I use the local DNS and the domain name is dom.hilaire

On one of the affected machines I tried a few things with wapt-get and it's undeniable.

wapt-1.png
wapt-1.png (19.18 KB) Viewed 3756 times

And on the console side, the tasks remain "pending"

wapt-2.png
wapt-2.png (53.3 KB) Viewed 3756 times
flipflip
Messages: 56
Registration: May 31, 2022 - 09:05

February 28, 2023 - 11:45

I am continuing my research.

I modified the server-side logging level before uninstalling the agent on one of the affected machines and reinstalling the agent in the same way as on the other machines. Here's what I have in the server logs:

Code: Select all

Feb 28 11:28:10 svwapt waptserver[93875]: 2023-02-28 11:28:10,083 [waptserver     ] INFO Trying to register host B6519CB9-65B4-11E8-B01D-4C52620D5213
Feb 28 11:28:10 svwapt waptserver[93875]: 2023-02-28 11:28:10,087 [waptserver     ] WARNING Unable to trust supplied host certificate: EWaptCertificateUntrustedIssuer(None)
Feb 28 11:28:10 svwapt waptserver[93875]: 2023-02-28 11:28:10,088 [waptdb         ] INFO Connecting to waptdb explicitely. Count: 0
Feb 28 11:28:10 svwapt waptserver[93875]: 2023-02-28 11:28:10,091 [waptserver     ] INFO Authenticated user: B6519CB9-65B4-11E8-B01D-4C52620D5213 , Registration auth user: None Issuing a signed certificate for B6519CB9-65B4-11E8-B01D-4C52620D5213
Feb 28 11:28:10 svwapt waptserver[93875]: 2023-02-28 11:28:10,145 [waptdb         ] INFO packages status updated: 0
Feb 28 11:28:10 svwapt waptserver[93875]: 2023-02-28 11:28:10,175 [waptdb         ] INFO {}
Feb 28 11:28:10 svwapt waptserver[93875]: 2023-02-28 11:28:10,186 [waptdb         ] INFO Applied data for host B6519CB9-65B4-11E8-B01D-4C52620D5213: ['host_info', 'wapt_status', 'host_capabilities', 'host_metrics', 'last_update_status', 'audit_status', 'dmi', 'wmi', 'installed_softwares', 'installed_packages']
Feb 28 11:28:10 svwapt waptserver[93875]: 2023-02-28 11:28:10,186 [waptdb         ] INFO update_host_data B6519CB9-65B4-11E8-B01D-4C52620D5213: {'Store Hosts': 0.014422178268432617, 'Store installed_softwares': 0.02853250503540039, 'Store installed_packages': 0.030587196350097656, 'Store waptwua': 0.0006496906280517578, 'Store audit_data': 0.0003113746643066406, 'Store known_ssl_certificates': 4.0531158447265625e-05, 'Update host config': 0.000873565673828125, 'Update update_file_tree': 9.5367431640625e-07, 'Store status_hashes': 0.009252309799194336}
Feb 28 11:28:10 svwapt waptserver[93875]: 2023-02-28 11:28:10,192 [waptserver     ] INFO 192.168x.x,127.0.0.1 - - [28/Feb/2023 11:28:10] "POST /add_host HTTP/1.1" 200 2745 0.114185
Feb 28 11:28:10 svwapt waptserver[93875]: 2023-02-28 11:28:10,929 [waptserver     ] INFO Connecting to waptdb before request. Count: 0
Feb 28 11:28:10 svwapt waptserver[93875]: 2023-02-28 11:28:10,929 [waptserver     ] INFO updating host status B6519CB9-65B4-11E8-B01D-4C52620D5213 (pcprobleme.DOM.HILAIRE), data:['uuid', 'computer_fqdn', 'status_revision', 'host_capabilities', 'host_metrics', 'status_hashes']
Feb 28 11:28:10 svwapt waptserver[93875]: 2023-02-28 11:28:10,932 [waptserver     ] INFO Data successfully checked with certificate CN B6519CB9-65B4-11E8-B01D-4C52620D5213 for B6519CB9-65B4-11E8-B01D-4C52620D5213
Feb 28 11:28:10 svwapt waptserver[93875]: 2023-02-28 11:28:10,978 [waptdb         ] INFO {}
Feb 28 11:28:10 svwapt waptserver[93875]: 2023-02-28 11:28:10,988 [waptdb         ] INFO Applied data for host B6519CB9-65B4-11E8-B01D-4C52620D5213: ['host_capabilities', 'host_metrics']
Feb 28 11:28:10 svwapt waptserver[93875]: 2023-02-28 11:28:10,988 [waptdb         ] INFO update_host_data B6519CB9-65B4-11E8-B01D-4C52620D5213: {'Store Hosts': 0.013550043106079102, 'Store installed_softwares': 0.00034165382385253906, 'Store installed_packages': 0.03032994270324707, 'Store waptwua': 0.0006935596466064453, 'Store audit_data': 0.0003123283386230469, 'Store known_ssl_certificates': 2.86102294921875e-06, 'Update host config': 1.1920928955078125e-06, 'Update update_file_tree': 4.76837158203125e-07, 'Store status_hashes': 0.009570121765136719}
flipflip
Messages: 56
Registration: May 31, 2022 - 09:05

March 13, 2023 - 11:14

Hello everyone,

Little by little I am fixing the configuration problems but I still have 3 machines where the operation of the agent is totally incomprehensible.

In all three cases, the machine appears in "OK" status and is reachable, but there's no way to get it to install or update the host package. Two are VMs (one VMware and one VirtualBox), and the other is a physical PC.

All three machines are up to date with the latest Windows 7 updates, and the firewall is not enabled on any of them. I've already tried uninstalling the agent, cleaning the directories, rebooting the machines, and reinstalling the agent... but I still encounter the same problem.

The most surprising thing is that when the machine is shut down, I do get the installation window with the pending packages, but nothing happens until the timeout.

wapt-1.png
wapt-1.png (36.3 KB) Viewed 3624 times
Locked