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

Unable to run with docker. #239

Open
nikhilbadyal opened this issue Feb 3, 2022 · 3 comments
Open

Unable to run with docker. #239

nikhilbadyal opened this issue Feb 3, 2022 · 3 comments

Comments

@nikhilbadyal
Copy link

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.

@xoxwgys56
Copy link

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.

@ElectroBuddha
Copy link

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

@toluaina toluaina pinned this issue Jun 29, 2022
@KevinRizzoTO
Copy link

FYI this should be fixed now and can probably be closed. I put in an initial PR to bump the version of psycopg2-binary which included the updated libpq, but the dependencies have since been updated to use this.

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

4 participants