Error: SASL: SCRAM-SERVER-FIRST-MESSAGE: client password must be a string

See original GitHub issue

Hello,

this error is thrown with this composer

version: "3"
services:
  db:
      image: postgres
      restart: always
      environment:
       - "POSTGRES_USER=root"
       - "POSTGRES_PASSWORD=root"
       - "POSTGRES_DB=root"
      volumes:
       - "db-data:/var/lib/postgresql/data"
       - ./docker_postgres_init.sql:/docker-entrypoint-initdb.d/docker_postgres_init.sql
      networks:
       - docs
 
  planka:
    image: ghcr.io/plankanban/planka:latest
    command: >
      bash -c
        "for i in `seq 1 30`; do
          ./start.sh &&
          s=$$? && break || s=$$?;
          echo \"Tried $$i times. Waiting 5 seconds...\";
          sleep 5;
        done; (exit $$s)"
    restart: always
    volumes:
      - user-avatars:/app/public/user-avatars
      - project-background-images:/app/public/project-background-images
      - attachments:/app/private/attachments
    ports:
      - 11082:1337
    networks:
       - docs
    links:
       - db
    environment:
      - BASE_URL=http://planka.whatever:11082
      - TRUST_PROXY=0
      - DATABASE_URL=postgresql://planka@db/planka
      - SECRET_KEY=planka
    depends_on:
      - db

networks:
    docs:
      driver: bridge

volumes:
    db-data:
      driver: local
    user-avatars:
      driver: local
    project-background-images:
      driver: local
    attachments:
      driver: local

And this is the init.sql mentioned inside DB

CREATE USER planka WITH PASSWORD 'planka' CREATEDB;
CREATE DATABASE planka
    WITH 
    OWNER = planka
    ENCODING = 'UTF8'
    LC_COLLATE = 'en_US.utf8'
    LC_CTYPE = 'en_US.utf8'
    TABLESPACE = pg_default
    CONNECTION LIMIT = -1;

(this is a tested and common template I use for wiki js, git servers etc, and works just fine)

the error I get is

Error: SASL: SCRAM-SERVER-FIRST-MESSAGE: client password must be a string
    at Object.continueSession (/app/node_modules/pg/lib/sasl.js:24:11)
    at Client._handleAuthSASLContinue (/app/node_modules/pg/lib/client.js:257:10)
    at Connection.emit (node:events:527:28)
    at /app/node_modules/pg/lib/connection.js:114:12
    at Parser.parse (/app/node_modules/pg-protocol/dist/parser.js:40:17)
    at Socket.<anonymous> (/app/node_modules/pg-protocol/dist/index.js:11:42)
    at Socket.emit (node:events:527:28)
    at addChunk (node:internal/streams/readable:315:12)
    at readableAddChunk (node:internal/streams/readable:289:9)
    at Socket.Readable.push (node:internal/streams/readable:228:10)

I tried password either with or without columns, the error is the same.

Thanks

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
raikougcommented, Jul 14, 2022

Hmmm I included an Nginx container to use my domestic dns (ahaha such a gorgeus way to call my hosts file!): BASE_URL=http://kanban.casa (just fo re reference, casa is home in italian XD)

Noe there is no error at all and it’s working, thanks again @meltyshev for everythin, my fault both cases 😕

0reactions
raikougcommented, Jul 14, 2022

Hence I close this because of my fault.

Read more comments on GitHub >

github_iconTop Results From Across the Web

SCRAM-SERVER-FIRST-MESSAGE: client password must be ...
Ive read documentation from several pages on SO of this issue, but i havent been able to fix my issue with this particular...
Read more >
Error: SASL: SCRAM-SERVER-FIRST-MESSAGE: client ...
14.0 but throws the SASL error in v18.7.0. Guarantee the password parameter is an empty string in both input options and .env files...
Read more >
String recognition error when compiling PostgreSQL typeORM ...
String recognition error when compiling PostgreSQL typeORM API ... Error: SASL: SCRAM-SERVER-FIRST-MESSAGE: client password must be a string.
Read more >
SCRAM-SERVER-FIRST-MESSAGE: client password must be ...
Error : SASL: SCRAM-SERVER-FIRST-MESSAGE: client password must be a string. I am using postgreSQL 14 database node version is v12.22.7
Read more >
NestJs - client password must be a string-postgresql
But when im running the app by npm start it throws this error: new Error('SASL: SCRAM-SERVER-FIRST-MESSAGE: client password must be a string').
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found