pgsync icon indicating copy to clipboard operation
pgsync copied to clipboard

Unable to run with docker.

Open nikhilbadyal opened this issue 3 years ago • 3 comments

PGSync version: pip install pgsync. So it will be latest.

Postgres version: FROM postgres:latest in docker file. So it will be latest too. ig (14.1)

Elasticsearch version: image: elasticsearch:7.16.3

Redis version: image: redis from docker file. So it will be latest.

Python version: FROM python. So it wil be latest(3.10 ig).

Problem Description: Container exits due to the error below.

Setup is working fine on windows but not on mac M1. And the fault is not in pgsync but one of the library used. psycopg2-binary. Currently there is a bug in binary. Is it possible not use binary and use psycopg2 directly. More about the bug.

  1. SO
  2. SO
  3. DockerForum
  4. Official Repo
  5. Official Repo

Error Message (if any):

Cannot connect to database: (psycopg2.OperationalError) SCRAM authentication requires libpq version 10 or above

OS - MAC M1 chip.

nikhilbadyal avatar Feb 03 '22 07:02 nikhilbadyal

it is up to m1 issue. see detail in how-can-i-solve-postgresql-scram-authentifcation-problem

export DOCKER_DEFAULT_PLATFORM=linux/amd64

# on your pgsync clone path
docker build -t pgsync_pgsync .

it worked for me.

xoxwgys56 avatar Jun 07 '22 05:06 xoxwgys56

I can confirm that this solves the issue for Apple MacBook M1 machines.

ElectroBuddha avatar Jun 24 '22 18:06 ElectroBuddha