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

Issue with Django - "Postgres is unavailable - sleeping" #13

Closed
brandonmburroughs opened this issue Oct 15, 2019 · 1 comment
Closed

Comments

@brandonmburroughs
Copy link

Hello. First, thanks for making HiCAL available and so easy to spin up with Docker containers! It's made it much more convenient to test out.

The Problem

I recently ran into an error when trying to start HiCAL. I followed all of the instructions here and ran into the error on the last step (DOC_BIN=/data/athome4_sample.bin PARA_BIN=/data/athome4_para_sample.bin docker-compose -f HiCAL.yml up -d). I got the following error in the Django image, which prevented it from finishing bringing up the web server (i.e. you get a 502 Bad Gateway error when you navigate to http://localhost:9000/).

django_1    | Traceback (most recent call last):
django_1    |   File "<stdin>", line 2, in <module>
django_1    |   File "/usr/local/lib/python3.5/site-packages/psycopg2/__init__.py", line 50, in <module>
django_1    |     from psycopg2._psycopg import (                     # noqa
django_1    | ImportError: /usr/local/lib/python3.5/site-packages/psycopg2/.libs/libresolv-2-c4c53def.5.so: symbol __res_maybe_init version GLIBC_PRIVATE not defined in file libc.so.6 with link time reference
django_1    | Postgres is unavailable - sleeping

I did some searching and came across this thread that seems to indicate some issue with the psycopg2 binary.

The Fix

This issue seems to be solved by upgrading pyscopg2 to a newer version. I bumped the version to 2.8.0, which solved the issue for me.

I don't know enough about all of the interdependencies of this project or the new psycopg2 release to know if this affects anything else, but it at least fixed the issue for me.

System Setup

This was tested in Terminal on a Macbook running the Mojave OS 10.14.6 and Docker version 18.03.0-ce-mac60 (23751).

Let me know if you have any more questions about my setup or anything. Thanks!

@ammsa
Copy link
Member

ammsa commented Oct 16, 2019

Hi @brandonmburroughs

I recently came across this issue and the fix you suggested fixes the problem. Thanks!

@ammsa ammsa closed this as completed Oct 16, 2019
@ammsa ammsa reopened this Oct 16, 2019
@ammsa ammsa closed this as completed Oct 16, 2019
ammsa added a commit that referenced this issue Oct 16, 2019
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

2 participants