[ 
https://issues.apache.org/jira/browse/GUACAMOLE-374?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17881561#comment-17881561
 ] 

Nick Couchman edited comment on GUACAMOLE-374 at 9/13/24 1:24 PM:
------------------------------------------------------------------

[~mjumper]: There's an interesting thing happening, here, with the new 
configuration when you try to use container linking to link the Postgres 
container to the guacamole/guacamole container. It looks like Docker inserts 
some extra POSTGRES-related variables:

{code:bash}
$ set|grep POSTGRES
POSTGRESQL_DATABASE=guacamole
POSTGRESQL_PASSWORD=yummyGuacamole
POSTGRESQL_PORT=5432
POSTGRESQL_USERNAME=postgres
POSTGRES_ENV_GOSU_VERSION=1.17
POSTGRES_ENV_LANG=en_US.utf8
POSTGRES_ENV_PGDATA=/var/lib/postgresql/data/pgdata
POSTGRES_ENV_PG_MAJOR=16
POSTGRES_ENV_PG_VERSION=16.4-1.pgdg120+1
POSTGRES_ENV_POSTGRES_PASSWORD=yummyGuacamole
POSTGRES_NAME=/guac-client/postgres
POSTGRES_PORT=tcp://172.17.0.3:5432
POSTGRES_PORT_5432_TCP=tcp://172.17.0.3:5432
POSTGRES_PORT_5432_TCP_ADDR=172.17.0.3
POSTGRES_PORT_5432_TCP_PORT=5432
POSTGRES_PORT_5432_TCP_PROTO=tcp
{code}

The one that has been reported on the mailing list that is causing issues is 
the POSTGRES_PORT variable, as it seems that Guacamole looks at that one (and 
actually prefers it over POSTGRESQL_PORT), resulting in the following error 
message:

{code}
01:14:30.294 [main] ERROR o.a.g.extension.ProviderFactory - authentication 
provider extension failed to start: Property "postgresql-port" must be an 
integer.
01:14:30.295 [main] ERROR o.a.g.extension.ProviderFactory - authentication 
provider extension failed to start: Property "postgresql-port" must be an 
integer.
{code}

I suspect this is related to GUACAMOLE-1978, and is also what was reported on 
the mailing list 
(https://lists.apache.org/thread/mgyfo3v3py9yppnlhlb4lxwfs0fvo75r).

I'm working through some more testing to make sure it doesn't occur if I don't 
use linking (and that I can still get to the DB), but we may need to tweak 
documentation or possibly remove support for the legacy variables.


was (Author: nick.couch...@yahoo.com):
[~mjumper]: There's an interesting thing happening, here, with the new 
configuration when you try to use container linking to link the Postgres 
container to the guacamole/guacamole container. It looks like Docker inserts 
some extra POSTGRES-related variables:

{code:shell}
$ set|grep POSTGRES
POSTGRESQL_DATABASE=guacamole
POSTGRESQL_PASSWORD=yummyGuacamole
POSTGRESQL_PORT=5432
POSTGRESQL_USERNAME=postgres
POSTGRES_ENV_GOSU_VERSION=1.17
POSTGRES_ENV_LANG=en_US.utf8
POSTGRES_ENV_PGDATA=/var/lib/postgresql/data/pgdata
POSTGRES_ENV_PG_MAJOR=16
POSTGRES_ENV_PG_VERSION=16.4-1.pgdg120+1
POSTGRES_ENV_POSTGRES_PASSWORD=yummyGuacamole
POSTGRES_NAME=/guac-client/postgres
POSTGRES_PORT=tcp://172.17.0.3:5432
POSTGRES_PORT_5432_TCP=tcp://172.17.0.3:5432
POSTGRES_PORT_5432_TCP_ADDR=172.17.0.3
POSTGRES_PORT_5432_TCP_PORT=5432
POSTGRES_PORT_5432_TCP_PROTO=tcp
{code}

The one that has been reported on the mailing list that is causing issues is 
the POSTGRES_PORT variable, as it seems that Guacamole looks at that one (and 
actually prefers it over POSTGRESQL_PORT), resulting in the following error 
message:

{code}
01:14:30.294 [main] ERROR o.a.g.extension.ProviderFactory - authentication 
provider extension failed to start: Property "postgresql-port" must be an 
integer.
01:14:30.295 [main] ERROR o.a.g.extension.ProviderFactory - authentication 
provider extension failed to start: Property "postgresql-port" must be an 
integer.
{code}

I suspect this is related to GUACAMOLE-1978, and is also what was reported on 
the mailing list 
(https://lists.apache.org/thread/mgyfo3v3py9yppnlhlb4lxwfs0fvo75r).

I'm working through some more testing to make sure it doesn't occur if I don't 
use linking (and that I can still get to the DB), but we may need to tweak 
documentation or possibly remove support for the legacy variables.

> Installing Guacamole with Docker improvements
> ---------------------------------------------
>
>                 Key: GUACAMOLE-374
>                 URL: https://issues.apache.org/jira/browse/GUACAMOLE-374
>             Project: Guacamole
>          Issue Type: Improvement
>          Components: Documentation, guacamole-docker
>         Environment: sven@fangorn:~$ docker version
> Client:
>  Version:      17.06.1-ce
>  API version:  1.30
>  Go version:   go1.8.3
>  Git commit:   874a737
>  Built:        Thu Aug 17 22:51:12 2017
>  OS/Arch:      linux/amd64
> Server:
>  Version:      17.06.1-ce
>  API version:  1.30 (minimum version 1.12)
>  Go version:   go1.8.3
>  Git commit:   874a737
>  Built:        Thu Aug 17 22:50:04 2017
>  OS/Arch:      linux/amd64
>  Experimental: false
>            Reporter: Sven Gottwald
>            Assignee: Mike Jumper
>            Priority: Minor
>             Fix For: 1.6.0
>
>
> I installed guacamole as docker container for the first time. Great software! 
> I followed the guide on 
> [https://guacamole.incubator.apache.org/doc/gug/guacamole-docker.html]. There 
> is a lot of unnecessary work to get the container up and running, here are 
> some suggestions to improve the documentation:
> # The link flag is a deprecated legacy feature of Docker. It may eventually 
> be removed. [Legacy container links 
> |https://docs.docker.com/engine/userguide/networking/default_network/dockerlinks/].
>  It is no problem to get guacamole running with a user defined network.
> # The database should be generated automatically on first run. The user and 
> database could be automatically created by 
> [mariadb|https://hub.docker.com/_/mariadb/].
> # ...You should add mariadb as possible backend.
> # Due to its complexity (three services) you should provide a 
> {{docker-compose.yml}} file for use with 
> [docker-compose|https://docs.docker.com/compose/]. This also creates an user 
> defined network.
> Here is an example {{docker-compose.yml}} for use with mariadb:
> {noformat}
> version: '3'
> services:
>   guacd:
>     image: guacamole/guacd
>     depends_on:
>       - db
>   guac:
>     image: guacamole/guacamole
>     ports:
>       - 8080:8080
>     depends_on:
>       - db
>       - guacd
>     environment:
>       - GUACD_HOSTNAME=guacd
>       - MYSQL_PASSWORD=x
>       - MYSQL_DATABASE=guacamole_db
>       - MYSQL_USER=guacamole_user
>       - MYSQL_HOSTNAME=db
>   db:
>     image: mariadb
>     volumes:
>       - /srv/docker/guacamole-mysql:/var/lib/mysql
>     environment:
>       - MYSQL_ROOT_PASSWORD=x
>       - MYSQL_PASSWORD=x
>       - MYSQL_DATABASE=guacamole_db
>       - MYSQL_USER=guacamole_user
> {noformat}
> I don't know why, but {{GUACD_HOSTNAME}} and {{MYSQL_HOSTNAME}} are needed 
> (maybe a bug?)



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to