[SOLVED] DISCONNECTED stations + solution

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
erickeke
Messages: 16
Registration: June 12, 2019 - 10:33

October 21, 2019 - 6:56 PM

Hi,

I had most of my machines disconnected.

This can happen if there's more than a 5-minute time difference between the client and server times.

In my case, that wasn't the problem.

Looking at my machines with TCPVIEW (from Sysinternals), I noticed they were trying to use the proxy.

I saw a post from sfonteneau saying that the WebSocket library sometimes insists on using the proxy.

On my machines, I had defined the environment variables http_proxy, https_proxy, and no_proxy for software like Git, npm, and other Linux-based tools.

However, when I looked at the code, I realized that the library couldn't read no_proxy for anything that was a subdomain: e.g., .mydomain.com.

So I updated my environment variable on all my machines by adding the FQDN of my server, wapt.mydomain.com: problem solved!

I only have one remaining issue, but I'm waiting to see if the procedure I started tonight will resolve it:

the Python service on my WAPT server is running at 99% CPU usage, and I'm getting several messages:
WARNING Invalid session 917a29931507404db3d67aad566bfb38.

The agents are up to date; I hope it's related to my proxy problem. More news tomorrow.

Detail for the Websocket library:

In C:\Program Files (x86)\wapt\lib\site-packages\websocket\_url.py:

The following function does not support subdomain verification (.mydomain.com)
def _is_no_proxy_host(hostname, no_proxy):
if not no_proxy:
v = os.environ.get("no_proxy", "").replace(" ", "")
no_proxy = v.split(",")
if not no_proxy:
no_proxy = DEFAULT_NO_PROXY_HOST

if hostname in no_proxy:
return True
elif _is_ip_address(hostname):
return any([_is_address_in_network(hostname, subnet) for subnet in no_proxy if _is_subnet_address(subnet)])

return False
User avatar
dcardon
WAPT Expert
Messages: 1929
Registration: June 18, 2014 - 09:58
Location: Saint Sébastien sur Loire
Contact :

October 22, 2019 - 8:55 AM

Hello Erickeke,
erickeke wrote: Oct 21, 2019 - 6:56 PM Most of my machines were disconnected.

It's worth noting that this can happen if there's more than a 5-minute time difference between the client and server times.

In my case, that wasn't the problem.

Looking at my machines with TCPVIEW (from Sysinternals), I realized they were trying to use the proxy.

I saw a message from sfonteneau saying that the WebSocket library sometimes insisted on using the proxy.

On my machines, I had defined the environment variables http_proxy, https_proxy, and no_proxy for software like Git, npm, and other Linux-based applications.

However, upon examining the code, I realized that the library couldn't read the `no_proxy` directive for anything in a subdomain, e.g., `.mydomain.com`.

So, I updated my environment variable on all my machines, adding the FQDN of my server, `wapt.mydomain.com`: problem solved!

I only have one remaining issue, but I'm waiting to see if the procedure I started tonight will resolve it:

the Python service on my Wapt server is running at 99% CPU usage, and I'm getting several messages: `
WARNING Invalid session 917a29931507404db3d67aad566bfb38`.

The agents are up to date; I hope this is related to my proxy problem. More news tomorrow.

Detail for the Websocket library:

In C:\Program Files (x86)\wapt\lib\site-packages\websocket\_url.py:

The following function does not support subdomain verification (.mydomain.com)
def _is_no_proxy_host(hostname, no_proxy):
if not no_proxy:
v = os.environ.get("no_proxy", "").replace(" ", "")
no_proxy = v.split(",")
if not no_proxy:
no_proxy = DEFAULT_NO_PROXY_HOST

if hostname in no_proxy:
return True
elif _is_ip_address(hostname):
return any([_is_address_in_network(hostname, subnet) for subnet in no_proxy if _is_subnet_address(subnet)])

return False
Indeed, this is a bug in the WebSocket library. Do you really need to define these environment variables at the system level? The WAPT agent runs in the LocalSystem account, and if the variables are only defined in the user context, it shouldn't be a problem.

Sincerely,

Denis
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
erickeke
Messages: 16
Registration: June 12, 2019 - 10:33

October 22, 2019 - 10:09

Thank you for your reply. I needed it for certain programming software to bypass the proxy, but now that I've found the workaround, no problem. :D

It was mainly to share for posterity. :)
User avatar
sfonteneau
WAPT Expert
Messages: 2318
Registered: July 10, 2014 - 11:52 PM
Contact :

October 23, 2019 - 11:47

Regarding your CPU usage problem at 99%,

see viewtopic.php?f=13&p=6617#p6617
Locked