Closed brainrecall closed 1 year ago
Hi @brainrecall, I tried to run with your patch. 3ce54cd and it seems to work.
Is there a way to keep the line GUACD_HOSTNAME: guacd
in place? Maybe someone changed the docker defaults and they can not use 172.17.0.1
and if it is hardcoded it would be hard to find the problem for them?
Please understand that I don't want to have daily messages about things not working because the IP is hardcoded. Any ideas on that?
Anyways good work.
Maybe we can find a solution for the IP vs Name problem?
Regards Peter
Hi @boschkundendienst
Hmm, let me dig into this more. I found some information about differences between a user-defined bridge network (what you originally had) and automatic/default bridge networks (what tonytvbg used) that might make a difference.
And, because guacd is now on the host network, there's also the chance the guacd port number is already in use on the host which I don't have a way to correct. I'll investigate that.
Ugh, so docker made a mess of this, but essentially docker had a very inconsistent way to access the docker host. The gateway IP address was only valid for linux, while Mac and Windows had to use a DNS name that was not available on Linux and sometimes was different between Windows and Mac.
Anyways, this seems to be the universal fix: https://stackoverflow.com/questions/31324981/how-to-access-host-port-from-docker-container/43541732#43541732
I want to go back over my modifications, as the user-defined bridge network works fine and is probably better.
One additional wrinkle is apparently host networking is only available on Linux. Furthermore, there's no way to remap ports, so the port guacd uses (4822 by default) must be available on the host.
If these constraints are unacceptable, then WOL will have to remain broken.
The only other random thing I would mention is I've switched over to using the linuxserver.io version of the guacd server because of this bug: https://issues.apache.org/jira/browse/GUACAMOLE-1540 The standard version should be updated soon to fix this.
But otherwise, all good. Thanks for looking into this!
These are some simple network modifications to get the Guacamole features of sending WOL packets to function. WOL magic packets are low-level packets that are not supported by the standard docker networking, so the easiest and least-painful fix is to move guacd to the host network.
Big thanks to @tonytvbg who provided his fix for https://github.com/boschkundendienst/guacamole-docker-compose/issues/12