Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

panic: pq: password authentication failed for user #445

Open
catchra opened this issue May 28, 2024 · 1 comment
Open

panic: pq: password authentication failed for user #445

catchra opened this issue May 28, 2024 · 1 comment

Comments

@catchra
Copy link

catchra commented May 28, 2024

I have tried this on 3 different postgres servers and get the same error and yet
I can login with both navicat and psql on the command line

docker run -d
  --name='Matrix-Synapse-SlidingSync'
  --net='bridge'
  -e HOST_OS="Unraid"
  -e HOST_HOSTNAME="UNRAID"
  -e HOST_CONTAINERNAME="Matrix-Synapse-SlidingSync"
  -e 'SYNCV3_SERVER'='http://192.168.137.53:8008'
  -e 'SYNCV3_SECRET'='b512< SECRET>f20e'
  -e 'SYNCV3_BINDADDR'='0.0.0.0:8009'
  -e 'SYNCV3_DB'='user=catchra dbname=syncv3 sslmode=disable host=192.168.137.53 port=5433 password=SECRET'\'''
  -l net.unraid.docker.managed=dockerman
  -l net.unraid.docker.icon='https://raw.githubusercontent.com/Richy1989/unraid-icons/main/icons/matrix.png'
  -p '8009:8009/tcp' 'ghcr.io/matrix-org/sliding-sync:latest'
panic: pq: password authentication failed for user "catchra"

goroutine 1 [running]:
github.com/jmoiron/sqlx.MustExec(...)
        github.com/jmoiron/sqlx@v1.3.3/sqlx.go:722
github.com/jmoiron/sqlx.(*DB).MustExec(0x0?, {0xdc964c?, 0x40fca7?}, {0x0?, 0x7deaa6?, 0xc0003df901?})
        github.com/jmoiron/sqlx@v1.3.3/sqlx.go:366 +0x46
github.com/matrix-org/sliding-sync/state.NewRoomsTable(...)
        github.com/matrix-org/sliding-sync/state/rooms_table.go:24
github.com/matrix-org/sliding-sync/state.NewStorageWithDB(0xc0004842a0, 0x8?)
        github.com/matrix-org/sliding-sync/state/storage.go:90 +0x46
github.com/matrix-org/sliding-sync.Setup({0xc00003e00e, 0x1a}, {0xc00004200a, 0x5c}, {0xc00004005e, 0x40}, {0x0, 0x0, 0x0, 0x3b9aca00, ...})
        github.com/matrix-org/sliding-sync/v3.go:117 +0x212
main.main()
        github.com/matrix-org/sliding-sync/cmd/syncv3/main.go:213 +0x175b
Sync v3 [0.99.18] (ea3baf2)
Debug=false LogLevel= MaxConns=0
$psql -p 5433 -U catchra -d syncv3 -h 192.168.137.53
Password for user catchra: 
psql (15.6 (Debian 15.6-0+deb12u1), server 14.12 (Debian 14.12-1.pgdg120+1))
Type "help" for help.

syncv3=#
@finga
Copy link

finga commented Aug 3, 2024

Looks like parsing the connection string is not implemented correctly. Setting SYNCV3_DB to postgresql://USER:PASSWORD@HOST fails with "panic: parse "postgresql://USER:PASSWORD": invalid port ":PASSWORD" after host". Though it should be valid syntax: https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-CONNSTRING-URIS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants