-
-
Notifications
You must be signed in to change notification settings - Fork 25
Cannot access dockerized local Postgres container from Linux machine #23
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
Comments
If your Postgres is running in a Docker container, I believe you have to run any psql commands against Docker (docker exec container-name psql, or something like that) |
@angelocordon I had a feeling that maybe I should open up a terminal inside the container. However, @lpatmo did confirm that |
Huh... maybe this issue isn't linux-specific. I got the same problem on OSX just now:
|
According to this issue, the order of the commands might screw things up (although it doesn't on my OSX machine, and I have no idea why): docker-library/postgres#592 Try switching things around to:
|
@bengineerdavis Earlier this afternoon I got the same error, and it turned out that: 1/ I had too many postgres images (which I ended up deleting) I updated https://github.com/codebuddies/django-concept/wiki/Contribution-instructions to the best of my ability, but something that would be more useful is probably taking a look at https://github.com/codebuddies/django-concept/pull/44/files, which @billglover worked on. Is there any chance you can try taking a look at that/following the setup instructions there, when you have time? Thanks! |
Do you still have this issue with |
Hi Linda,
I finally finished my work week, so I can devote a few hours over the next
few days catching up on this.
…On Wed, Jan 15, 2020, 4:43 AM Linda ***@***.***> wrote:
@bengineerdavis <https://github.com/bengineerdavis> Earlier this
afternoon I got the same error, and it turned out that:
1/ I had too many postgres images (which I ended up deleting)
2/ I had docker pulled postgres 12 (latest) instead of doing docker pull
postgres:11.1
I updated
https://github.com/codebuddies/django-concept/wiki/Contribution-instructions
to the best of my ability, but something that would be more useful is
probably taking a look at
https://github.com/codebuddies/django-concept/pull/44/files, which
@billglover <https://github.com/billglover> worked on. Is there any
chance you can try taking a look at that/following the setup instructions
there, when you have time?
Thanks!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#23>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AMQU4TTHD7LQFR2BG6ULSDLQ53LFRANCNFSM4KEBPAIA>
.
|
With #44 now merged into master and confirmed as working on Linux, Mac OS, and Windows I'm closing this for now. We can reopen this if issues with Linux remain. |
Thanks for all you work on these issues and setup Bill!
…On Sun, Feb 2, 2020, 4:00 PM Bill Glover ***@***.***> wrote:
Closed #23 <#23>.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#23>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AMQU4TSATQMAN7PTR2PRBE3RA4X5FANCNFSM4KEBPAIA>
.
|
Referring to #12 and #3.
On Fedora 30, I'm having issues using command from hackernoon article references in #12.
Ran
docker run --rm --name pg-docker -e POSTGRES_PASSWORD=docker -d -p 5432:5432 -v $HOME/docker/volumes/postgres:/var/lib/postgresql/data postgres
Resulted in a hash. No container present when I used the
docker ps
command.(source)
If I modify the command to:
docker run --name some-postgres -e POSTGRES_PASSWORD=mysecretpassword -d postgres
, I get a working container of Postgres.Going back to the article above, I then use the command
psql -h localhost -U postgres -d postgres
, I get this message:psql -h localhost -U postgres -d postgres psql: /usr/pgsql-11/lib/libpq.so.5: no version information available (required by psql) psql: /usr/pgsql-11/lib/libpq.so.5: no version information available (required by psql) psql: could not connect to server: Connection refused Is the server running on host "localhost" (::1) and accepting TCP/IP connections on port 5432? could not connect to server: Connection refused Is the server running on host "localhost" (127.0.0.1) and accepting TCP/IP connections on port 5432?
I suspect this is an issue with my Fedora setup, but anyone with Linux experience would be greatly appreciated for insights.
The text was updated successfully, but these errors were encountered: