Can't Connect Guacamole Docker to Database Cluster
Sorry if it seems elemental, but this is driving me crazy, I have done this in Digital_Ocean, my own Home Servers, Office Remote Server and this is the first time I can't set Guacamole using their official Docker Container connected to an External PostgreSQL Database, so considering I set a Cluster right here in Linode I can only assume it's Linode related.
I'm running the guacd container with:
docker run --name guacd -d guacamole/guacd
Then the Guacamole container with the following environment parameters so it can connect to an external PostgreSQL Database:
docker run --name guacamole -p 8080:8080 --env POSTGRES_HOSTNAME=my-linode-private-database-cluster --env POSTGRES_DATABASE=guacamole --env POSTGRES_USER=guacamole --env POSTGRES_PASSWORD=MyPassword --link guacd:guacd -d guacamole/guacamole
Once I try http://my-linode-ip:8080/guacamole I get on the docker logs this error:
Error querying database. Cause: org.postgresql.util.PSQLException: FATAL: no pg_hba.conf entry for host "pri.va.te.ip", user "guacamole", database "guacamole", no encryption
The error may exist in org/apache/guacamole/auth/jdbc/user/UserMapper.xml
The error may involve org.apache.guacamole.auth.jdbc.user.UserMapper.selectOne
The error occurred while executing a query
Cause: org.postgresql.util.PSQLException: FATAL: no pg_hba.conf entry for host "pri.va.te.ip", user "guacamole", database "guacamole", no encryption
Same result if I try to do it with the External IP, the one not Private. only change is the IP number on the Error.
Both IPs are on the list for Access Control in the Cluster Database, , my own current Home IP is also set and I can access the Cluster with no issues via:
psql -U guacamole -h my-linode-database-cluster -d guacamole --set=sslmode=require
Why would I be required to give access manually via the pg_hba.conf (that I don't have access to in the cluster)? and why would connections originating from the same Data Center in Linode be blocked while External ones connect just fine? even to the same Cluster
1 Reply
According to this post with a similar error, you will need to allow access on your PostgreSQL database for the user attempting to connect. They mention you can do this by editing the pg_hba.conf
file.
However, since the Linode Managed Databases do not allow superuser access by design you may need to reach out to the Support Team in a ticket to see if this is something they are able to do for you.
Alternatively, you should be able to connect to the guacamole database as the linpostgres
user.