postgres icon indicating copy to clipboard operation
postgres copied to clipboard

Permission denied error causes server to fail

Open Coronon opened this issue 3 years ago • 3 comments

Bug report

Describe the bug

Starting with 14.1.0.55 the server fails with Permission denied for /usr/lib/postgresql/14/bin/pgsodium_getkey_urandom.sh

To Reproduce

  1. Try to start supabase/postgres:14.1.0.55 or newer
  2. Watch it fail

Expected behavior

The container starts running and will not crash

Screenshots

Screenshot

System information

OS:

Distributor ID: Ubuntu
Description:    Ubuntu 22.04.1 LTS
Release:        22.04
Codename:       jammy

Docker: Docker version 20.10.17, build 100c701

Additional context

n.a.

Coronon avatar Aug 21 '22 12:08 Coronon

Hi @Coronon

Apologies for the delayed response, would you mind sharing the exact steps you've taken to allow us to attempt to replicate the bug?

Thanks!

dragarcia avatar Sep 26 '22 08:09 dragarcia

Hi @dragarcia, there were not a lot of steps involved: I wanted to share a db between multiple self hosted instances. Because im most familiar with docker-compose, I simply wrote a bare bones docker-compose file:


version: "3.8"

services:
  db:
    container_name: supabase-db
    image: supabase/postgres:14.1.0.34
    command: postgres -c config_file=/etc/postgresql/postgresql.conf
    restart: unless-stopped
    hostname: db
    ports:
      - ${POSTGRES_PORT}:5432
    networks:
      - app1-net
      - app2-net
      - app3-net
    environment:
      POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
    volumes:
      - ./data:/var/lib/postgresql/data
      # - ./volumes/postgres/init:/docker-entrypoint-initdb.d
      # Custom config that disables infinite logging of _all_ statements
      - ./volumes/postgres/conf/postgresql.conf:/etc/postgresql/postgresql.conf

networks:
  app1-net:
    driver: bridge
  app2-net:
    driver: bridge
  app3-net:
    driver: bridge

Where I simply put a more recent image version as mentioned in my initial report. The ‘custom’ config simply changes the logging a little but is based on the original config in the image. The issue also persists when not using a custom image and simply using a bare-bones setup.

When you then run docker-compose up, you will see the above error message with the pgsodium problems.

If you have any further questions I am more than happy to provide you with further setup details :)

Coronon avatar Sep 26 '22 09:09 Coronon

That's odd. Just attempted to replicate with the docker-compose file you provided and was able to have a running container both for supabase/postgres:14.1.0.34 and the latest one which is supabase/postgres:14.1.0.66. Would you mind sharing the modifications you've made to postgresql.conf?

dragarcia avatar Sep 29 '22 11:09 dragarcia

Seems like wasn't possible to reproduce and there was no feedback for several months. I'll close the issue. @Coronon if the problem still exists please give details in the thread and re-open the thread.

pashkinelfe avatar Jan 20 '23 11:01 pashkinelfe