k8s icon indicating copy to clipboard operation
k8s copied to clipboard

The authentication type 10 is not supported

Open Kimi450 opened this issue 3 years ago • 5 comments

Issue: The authentication type 10 is not supported Chart version: 1.3.2 How to replicate:

# install postgres
helm uninstall postgresql; helm install postgresql bitnami/postgresql \
 --set global.postgresql.auth.username=guacamole \
 --set global.postgresql.auth.password=password \
 --set global.postgresql.auth.postgresPassword=password \
 --set global.postgresql.auth.database=guacamole --wait

# install guacamole
helm install guacamole . 

Try to access it and itll show the error in the logs

Error log:

### Error querying database.  Cause: org.postgresql.util.PSQLException: The authentication type 10 is not supported. Check that you have configured the pg_hba.conf file to include the client's IP address or subnet, and that it is using an authentication scheme supported by the driver.
### 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: The authentication type 10 is not supported. Check that you have configured the pg_hba.conf file to include the client's IP address or subnet, and that it is using an authentication scheme supported by the driver.

Solution: Wait for the new version of guacamole docker image to be released (whatever is after 1.4.0). https://lists.apache.org/thread/mp6gfxtxwhnnk215crcjbt0106w03o7l https://issues.apache.org/jira/browse/GUACAMOLE-1433

Kimi450 avatar Apr 27 '22 21:04 Kimi450

Workaround seems to be to update the pg_hba.conf (/opt/bitnami/postgresql/conf/pg_hba.conf) file in the postgres pod and include (or replace the file) with the following line.

host    all             all             0.0.0.0/0            password

Then run: pg_ctl reload

Or run the line below and itll do it for you.

kubectl exec $(kubectl get pods | grep postgres | awk '{print $1}') --  bash -c "echo 'host    all             all             0.0.0.0/0            password' >  /opt/bitnami/postgresql/conf/pg_hba.conf && pg_ctl reload"

You should be able to access it guacamole now. Default login in guacadmin/guacadmin

Kimi450 avatar May 05 '22 10:05 Kimi450

I've not run into this issue, but my install is also older, so I have this config

I have no name!@postgres-postgresql-0:/$ cat /opt/bitnami/postgresql/conf/pg_hba.conf
host     all             all             0.0.0.0/0               md5
host     all             all             ::/0                    md5
local    all             all                                     md5
host     all             all        127.0.0.1/32                 md5
host     all             all        ::1/128                      md5

btw for the last command you can do

kubectl exec sts/postgres-postgresql --  bash ...

BeryJu avatar May 05 '22 10:05 BeryJu

True, you can get into it with bash and run the commands manually. Thought a one liner would be simpler for people

Have you tried replicating the issue on a new namespace and seeing if it there for you still? My bet would be that its there. Because doing the above was teh only way I could get the UI to work for me.

Kimi450 avatar May 05 '22 10:05 Kimi450

@Kimi450 you can use an older version of Postgres like so:

helm install postgresql bitnami/postgresql \
                      --set image.tag=11 \
                      --set auth.username=guacamole \
                      --set auth.password=password \
                      --set auth.postgresPassword=password \
                      --set auth.database=guacamole --wait

I tried it with 11 and that works, maybe 12 or 13 also work as well.

mathiasringhof avatar May 11 '22 05:05 mathiasringhof

@mathiasringhof Thats good, thanks. It will work for now till the new version of guacamole is released.

Kimi450 avatar May 11 '22 10:05 Kimi450