You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@guacamole.apache.org by Thomas Besser <th...@kit.edu> on 2021/04/07 14:56:25 UTC

wol-wait-time vs connection timeout...

Hi,

our remote machines are switched off automatically at the evening. WOL 
is configured and does work. The remote machines coming up after about 
40 seconds.

If I set "wol-wait-time" to 40 the user connecting to this machine is 
getting a "connection error" after about 15 seconds: "The connection to 
the server was closed because of high latency...".

In an old thread I found something about an connection timeout of 15 
seconds, which seems to be wanted 
(https://sourceforge.net/p/guacamole/discussion/1110834/thread/4bd2fdde/).

Obviously "wol-wait-time" does not really "wait". How can I solve this 
issue?

Regards
Thomas

-- 
Karlsruher Institut für Technologie (KIT)
archIT [IT-Management der Fakultät Architektur]
Dipl.-Ing. Thomas Besser
Gebäude 11.40, Raum 010 | Fon +49 721 608 46024
http://www.arch.kit.edu/fakultaet/it-management.php

KIT - Die Forschungsuniversität in der Helmholtz-Gemeinschaft



Re: wol-wait-time vs connection timeout...

Posted by Nick Couchman <vn...@apache.org>.
On Tue, Apr 13, 2021 at 9:19 AM Thomas Besser <th...@kit.edu> wrote:

> Hi Mike,
>
> Am 09.04.21 um 01:17 schrieb Mike Jumper:
> > If you connect directly to the connection (without a balancing group at
> > all), does the connection wait for the expected 40 seconds?
>
> Yes.
>
> Unfortunately even the host is already running. A check (ping) before
> wol would be nice for the future.
>
>
Yeah, we discussed this when implementing the WoL feature, but didn't want
to delay the release to add it, so we talked about coming back and doing it
later. Unfortunately a ping isn't quite as easy as you might think - from
the O/S perspective a ping requires elevated (=root) privileges, so adding
it to guacd would mean some major work to allow guacd to elevate to root,
which we don't really want to do. However, we did talk about having guacd
check the configured IP or hostname and TCP port for the connection (TCP
ping, something like that), and that seems like a reasonable direction.

-Nick

Re: wol-wait-time vs connection timeout...

Posted by Thomas Besser <th...@kit.edu>.
Hi Mike,

Am 09.04.21 um 01:17 schrieb Mike Jumper:
> If you connect directly to the connection (without a balancing group at 
> all), does the connection wait for the expected 40 seconds?

Yes.

Unfortunately even the host is already running. A check (ping) before 
wol would be nice for the future.

> There is internal handling of connection failures within balancing 
> groups that is intended to automatically and transparently fail over to 
> another connection within the group if the current one explicitly fails. 
> It may be that this functionality is inadvertently eating the keep-alive 
> messages sent during the WoL wait, causing the connection to time out.

You are right, 'Host boot wait time' or 'wol-wait-time' does not work 
with 'balancing group'.

Regards
Thomas

-- 
Karlsruher Institut für Technologie (KIT)
archIT [IT-Management der Fakultät Architektur]
Dipl.-Ing. Thomas Besser
Gebäude 11.40, Raum 010 | Fon +49 721 608 46024
http://www.arch.kit.edu/fakultaet/it-management.php

KIT - Die Forschungsuniversität in der Helmholtz-Gemeinschaft


Re: wol-wait-time vs connection timeout...

Posted by Mike Jumper <mi...@glyptodon.com>.
On Wed, Apr 7, 2021 at 11:11 PM Thomas Besser <th...@kit.edu> wrote:

> Am 08.04.21 um 00:02 schrieb Mike Jumper:
> > On Wed, Apr 7, 2021 at 7:57 AM Thomas Besser <thomas.besser@kit.edu
> > <ma...@kit.edu>> wrote:
> >     Obviously "wol-wait-time" does not really "wait". How can I solve
> this
> >     issue?
> >
> > It should. There is a 15 second network timeout, yes, but Guacamole
> > should be sending messages back and forth while it waits for WoL,
> > keeping the connection alive despite the remote desktop not yet being
> > available. If you set "wol-wait-time" to "40", then the connection
> > process should wait at least 40 seconds before giving up.
> >
> > What protocol is being used to connect to the remote desktop in this
> case?
>
> RDP
>
> Here a log sequence from guacd:
>
> 2021-04-08T06:02:33.205499219Z guacd[2706]: DEBUG:      Client is using
> protocol version "VERSION_1_3_0"
> 2021-04-08T06:02:33.205533781Z guacd[2706]: DEBUG:      Sending
> Wake-on-LAN
> packet, and pausing for 40 seconds.
> 2021-04-08T06:02:48.221240007Z guacd[2706]: ERROR:      User is not
> responding.
> 2021-04-08T06:02:48.222878202Z guacd[2706]: INFO:       User
> "@69dc9288-c346-4701-ab35-1ebca1ae2ea6" disconnected (0 users remain)
> 2021-04-08T06:02:48.223000371Z guacd[2706]: INFO:       Last user of
> connection "$a55c90a9-5a75-4b5e-98d1-55973550523b" disconnected
> 2021-04-08T06:02:48.223235827Z guacd[2706]: DEBUG:      Requesting
> termination of client...
> 2021-04-08T06:02:53.224247047Z guacd[2706]: WARNING:    Client did not
> terminate in a timely manner. Forcibly terminating client and any child
> processes.
> 2021-04-08T06:02:53.232161722Z guacd[7]: INFO:  Connection
> "$a55c90a9-5a75-4b5e-98d1-55973550523b" removed.
>
> BTW it's a docker installation behind a proxy.
>
> As mentioned in another mail: I'm using 'balancing connection group'.
> Only if "enable session affinity" is activated it does work generally
> (with connection errors). If this option is disabled, it is looping and
> never connects to the remote host, even it is running meanwhile.
>

If you connect directly to the connection (without a balancing group at
all), does the connection wait for the expected 40 seconds?

There is internal handling of connection failures within balancing groups
that is intended to automatically and transparently fail over to another
connection within the group if the current one explicitly fails. It may be
that this functionality is inadvertently eating the keep-alive messages
sent during the WoL wait, causing the connection to time out.

Michael Jumper
CEO, Lead Developer
Glyptodon Inc <https://glyp.to/>.

Re: wol-wait-time vs connection timeout...

Posted by Thomas Besser <th...@kit.edu>.
Am 08.04.21 um 00:02 schrieb Mike Jumper:
> On Wed, Apr 7, 2021 at 7:57 AM Thomas Besser <thomas.besser@kit.edu 
> <ma...@kit.edu>> wrote:
>     Obviously "wol-wait-time" does not really "wait". How can I solve this
>     issue?
> 
> It should. There is a 15 second network timeout, yes, but Guacamole 
> should be sending messages back and forth while it waits for WoL, 
> keeping the connection alive despite the remote desktop not yet being 
> available. If you set "wol-wait-time" to "40", then the connection 
> process should wait at least 40 seconds before giving up.
> 
> What protocol is being used to connect to the remote desktop in this case?

RDP

Here a log sequence from guacd:

2021-04-08T06:02:33.205499219Z guacd[2706]: DEBUG:	Client is using 
protocol version "VERSION_1_3_0"
2021-04-08T06:02:33.205533781Z guacd[2706]: DEBUG:	Sending Wake-on-LAN 
packet, and pausing for 40 seconds.
2021-04-08T06:02:48.221240007Z guacd[2706]: ERROR:	User is not responding.
2021-04-08T06:02:48.222878202Z guacd[2706]: INFO:	User 
"@69dc9288-c346-4701-ab35-1ebca1ae2ea6" disconnected (0 users remain)
2021-04-08T06:02:48.223000371Z guacd[2706]: INFO:	Last user of 
connection "$a55c90a9-5a75-4b5e-98d1-55973550523b" disconnected
2021-04-08T06:02:48.223235827Z guacd[2706]: DEBUG:	Requesting 
termination of client...
2021-04-08T06:02:53.224247047Z guacd[2706]: WARNING:	Client did not 
terminate in a timely manner. Forcibly terminating client and any child 
processes.
2021-04-08T06:02:53.232161722Z guacd[7]: INFO:	Connection 
"$a55c90a9-5a75-4b5e-98d1-55973550523b" removed.

BTW it's a docker installation behind a proxy.

As mentioned in another mail: I'm using 'balancing connection group'. 
Only if "enable session affinity" is activated it does work generally 
(with connection errors). If this option is disabled, it is looping and 
never connects to the remote host, even it is running meanwhile.

Regards
Thomas

-- 
Karlsruher Institut für Technologie (KIT)
archIT [IT-Management der Fakultät Architektur]
Dipl.-Ing. Thomas Besser
Gebäude 11.40, Raum 010 | Fon +49 721 608 46024
http://www.arch.kit.edu/fakultaet/it-management.php

KIT - Die Forschungsuniversität in der Helmholtz-Gemeinschaft


Re: wol-wait-time vs connection timeout...

Posted by Mike Jumper <mi...@glyptodon.com>.
On Wed, Apr 7, 2021 at 7:57 AM Thomas Besser <th...@kit.edu> wrote:

> Hi,
>
> our remote machines are switched off automatically at the evening. WOL
> is configured and does work. The remote machines coming up after about
> 40 seconds.
>
> If I set "wol-wait-time" to 40 the user connecting to this machine is
> getting a "connection error" after about 15 seconds: "The connection to
> the server was closed because of high latency...".
>
> In an old thread I found something about an connection timeout of 15
> seconds, which seems to be wanted
> (https://sourceforge.net/p/guacamole/discussion/1110834/thread/4bd2fdde/).
>
> Obviously "wol-wait-time" does not really "wait". How can I solve this
> issue?
>

It should. There is a 15 second network timeout, yes, but Guacamole should
be sending messages back and forth while it waits for WoL, keeping the
connection alive despite the remote desktop not yet being available. If you
set "wol-wait-time" to "40", then the connection process should wait at
least 40 seconds before giving up.

What protocol is being used to connect to the remote desktop in this case?

Michael Jumper
CEO, Lead Developer
Glyptodon Inc <https://glyp.to/>.

Re: wol-wait-time vs connection timeout...

Posted by Thomas Besser <th...@kit.edu>.
Am 07.04.21 um 17:10 schrieb Tom Lawson:
> 
> Does it connect if you wait longer?

It's a bit more complicated. The machines are in a "balancing connection 
group", so that each user only can have one connection at the same time.

Yes, it does work if "enable session affinity" is activated. And No if 
this option is disabled. Then it is looping. Reconnecting after 15 
seconds (countdown) then connection timeout after 15 seconds. And so on, 
even if the machine is running meanwhile.

If I deleting "wol-wait-time" completely login works immediatly if the 
machine is already running. If not, after one or two "connection errors" 
it does connect.

But for the normal users the "connection error" can be irritating. I 
would await, that if "wol-wait-time" is configured, that no error is 
shown at least.

Regards
Thomas

-- 
Karlsruher Institut für Technologie (KIT)
archIT [IT-Management der Fakultät Architektur]
Dipl.-Ing. Thomas Besser
Gebäude 11.40, Raum 010 | Fon +49 721 608 46024
http://www.arch.kit.edu/fakultaet/it-management.php

KIT - Die Forschungsuniversität in der Helmholtz-Gemeinschaft


Re: wol-wait-time vs connection timeout...

Posted by Tom Lawson <to...@tuta.io.INVALID>.
Does it connect if you wait longer? ------------------

I'm not a tinfoil hat kind of guy, but data privacy is a rapidly growing issue. Most 'free' services are are actually paid for with your privacy. Did you know Google, Microsoft, Yahoo etc all scan your email, its attachments etc and use it to profile you? 

Four quick steps: 
1. Get free encrypted email @ www.tutanota.com <http://www.tutanota.com>. 
2. Change your DNS to Quad9 @ www.quad9.net <https://www.quad9.net/>
3. Switch browser to Firefox @ www.mozilla.org/en-GB/firefox/new <https://www.mozilla.org/en-GB/firefox/new/>/
4. Install Cloudflare WARP on your phone @ blog.cloudflare.com/1111-warp-better-vpn/ <https://blog.cloudflare.com/1111-warp-better-vpn/>



7 Apr 2021, 15:56 by thomas.besser@kit.edu:

> Hi,
>
> our remote machines are switched off automatically at the evening. WOL is configured and does work. The remote machines coming up after about 40 seconds.
>
> If I set "wol-wait-time" to 40 the user connecting to this machine is getting a "connection error" after about 15 seconds: "The connection to the server was closed because of high latency...".
>
> In an old thread I found something about an connection timeout of 15 seconds, which seems to be wanted (https://sourceforge.net/p/guacamole/discussion/1110834/thread/4bd2fdde/).
>
> Obviously "wol-wait-time" does not really "wait". How can I solve this issue?
>
> Regards
> Thomas
>
> -- 
> Karlsruher Institut für Technologie (KIT)
> archIT [IT-Management der Fakultät Architektur]
> Dipl.-Ing. Thomas Besser
> Gebäude 11.40, Raum 010 | Fon +49 721 608 46024
> http://www.arch.kit.edu/fakultaet/it-management.php
>
> KIT - Die Forschungsuniversität in der Helmholtz-Gemeinschaft
>