Also noted that when POSTGRESQL_PORT is not defined I get this warning. So that 
variable is being defined and pulling information from someplace else.
WARNING: POSTGRES_PORT detected, please use POSTGRESQL_PORT for further 
deployments.

I ended up adding a lifecycle to the deployment to remove tcp://*:5432 from 
that env. This seems to be something related to K8s. I wasn't able to find 
information on enabling debugging for the docker container to dig into this 
further.

      containers:
      - name: guacamole
        image: guacamole/guacamole:latest
        imagePullPolicy: Always
        lifecycle:
          postStart:
            exec:
              command: ["/bin/sh", "-c", "sed -i 's/postgresql-port: 
.*5432/postgresql-port: 5432/' /home/guacamole/.guacamole/guacamole.properties"]

________________________________
From: Lauren Phillips <circ...@circenn.city>
Sent: Sunday, September 1, 2024 10:49 PM
To: user@guacamole.apache.org <user@guacamole.apache.org>
Subject: Re: Docker guacamole/guacamole:latest - Property "postgresql-port" 
must be an integer

The only issue I could find like this was
https://sourceforge.net/p/guacamole/discussion/1110834/thread/8b46c96b/

Michael Jumper <https://sourceforge.net/u/zhangmaike/profile/> - 2015-09-15
This might be a regression due to the changes we made yesterday for 
GUAC-1291<https://glyptodon.org/jira/browse/GUAC-1291> ("Allow linking with 
non-Docker MySQL/PostgreSQL databases"). I'll check real quick.
________________________________
From: Nick Couchman <vn...@apache.org>
Sent: Sunday, September 1, 2024 10:34 PM
To: user@guacamole.apache.org <user@guacamole.apache.org>
Subject: Re: Docker guacamole/guacamole:latest - Property "postgresql-port" 
must be an integer

On Sun, Sep 1, 2024 at 10:15 PM Lauren Phillips <circ...@circenn.city.invalid> 
wrote:
From what I can tell the environment variable POSTGRESQL_PORT is completely 
ignored. Changing it to an arbitrary number still outputs the same value of 
"postgresql-port: tcp://10.108.245.56:5432<http://10.108.245.56:5432>" in 
/home/guacamole/.guacamole/guacamole.properties
10.108.245.56 is the ip of the postgres service

It seems like in your environment something is re-writing the postgresql-port 
value in guacamole.properties to more of full URI for the PostgreSQL service. 
If I use docker to pull the image and specify a port with the POSTGRESQL_PORT 
environment variable, it gets written as expected:

docker pull guacamole/guacamole:latest

# docker run --name test-guac -e 
POSTGRESQL_HOSTNAME=database.example.com<http://database.example.com> -e 
POSTGRESQL_PORT=6543 -e POSTGRESQL_DATABASE=guac -e POSTGRESQL_USER=guac -e 
POSTGRESQL_PASSWORD=guac -e 
GUACD_HOSTNAME=guacd.example.com<http://guacd.example.com> -e GUACD_PORT=4822 
-d -p 8080:8080 guacamole/guacamole

# docker exec -it test-guac /bin/bash
guacamole@92ba8fca8da0:/opt/guacamole$ cat 
/home/guacamole/.guacamole/guacamole.properties
# guacamole.properties - generated Mon Sep  2 02:27:41 AM UTC 2024
guacd-hostname: guacd.example.com<http://guacd.example.com>
guacd-port: 4822
postgresql-username: guac
postgresql-password: guac
postgresql-database: guac
postgresql-hostname: database.example.com<http://database.example.com>
postgresql-port: 6543

Is there something else in those transforms or YAML files that takes the 
various DB information and tries to rewrite it into a URI?

-NIck

Reply via email to