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

syn2mas requires PostgreSQL password #3742

Open
xanderio opened this issue Jan 4, 2025 · 0 comments
Open

syn2mas requires PostgreSQL password #3742

xanderio opened this issue Jan 4, 2025 · 0 comments

Comments

@xanderio
Copy link

xanderio commented Jan 4, 2025

Describe the bug
A clear and concise description of what the bug is.

When trying to migrate my synapse installation to MAS I've noticed that syn2mas is unable to handle connecting to a postgres database without a password being set in the config. This is that case as my synapse installation uses postgres peer authentication via a unix domain socket.

This somewhat unhelpful error is printed to the console.

[2025-01-04T14:30:06.477] [ERROR] default - Error: SASL: SCRAM-SERVER-FIRST-MESSAGE: client password must be a string
    at Object.continueSession (/nix/store/yapm7qri4f4rmgjima6spz90pzd4lb85-syn2mas-0.12.0/lib/node_modules/@vector-im/syn2mas/node_modules/pg/lib/crypto/sasl.js:24:11)
    at Client._handleAuthSASLContinue (/nix/store/yapm7qri4f4rmgjima6spz90pzd4lb85-syn2mas-0.12.0/lib/node_modules/@vector-im/syn2mas/node_modules/pg/lib/client.js:272:18)
    at Connection.emit (node:events:518:28)
    at /nix/store/yapm7qri4f4rmgjima6spz90pzd4lb85-syn2mas-0.12.0/lib/node_modules/@vector-im/syn2mas/node_modules/pg/lib/connection.js:117:12
    at Parser.parse (/nix/store/yapm7qri4f4rmgjima6spz90pzd4lb85-syn2mas-0.12.0/lib/node_modules/@vector-im/syn2mas/node_modules/pg-protocol/dist/parser.js:36:17)
    at Socket.<anonymous> (/nix/store/yapm7qri4f4rmgjima6spz90pzd4lb85-syn2mas-0.12.0/lib/node_modules/@vector-im/syn2mas/node_modules/pg-protocol/dist/index.js:11:42)
    at Socket.emit (node:events:518:28)
    at addChunk (node:internal/streams/readable:561:12)
    at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)
    at Readable.push (node:internal/streams/readable:392:5)

To Reproduce
Steps to reproduce the behavior:

  1. Create homeserver.yaml containg
database:
  args:
    database: matrix-synapse
    user: matrix-synapse
  name: psycopg2
  1. sudo -u matrix-synapse syn2mas --command=advisor --synapseConfigFile=homeserver.yaml
  2. See error

Expected behavior
syn2mas being able to connect to a postgres without the need for a password.

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

1 participant