GithubHelp home page GithubHelp logo

Comments (13)

tconroy avatar tconroy commented on April 27, 2024 19

I found that modifying my .env DATABASE_URL to specify my user account name (instead of postgres), seems to fix this:

- DATABASE_URL="postgresql://postgres:postgres@localhost:5432/postgres"
+ DATABASE_URL="postgresql://tom:postgres@localhost:5432/postgres"

But not entirely sure why? Would be nice is postgres worked so any developer on my team could get up and running quickly.

from blues-stack.

danielcrisp avatar danielcrisp commented on April 27, 2024 10

I had this problem and it was related to having postgres installed and running on my mac separately from the remix instance inside Docker.

Killing the local install solved it for me.

from blues-stack.

Saad29 avatar Saad29 commented on April 27, 2024 1

I found that modifying my .env DATABASE_URL to specify my user account name (instead of postgres), seems to fix this:

- DATABASE_URL="postgresql://postgres:postgres@localhost:5432/postgres"
+ DATABASE_URL="postgresql://tom:postgres@localhost:5432/postgres"

But not entirely sure why? Would be nice is postgres worked so any developer on my team could get up and running quickly.

Same problem here. By the way, which user name do you mean?

from blues-stack.

Benrobo avatar Benrobo commented on April 27, 2024 1

I had this problem and it was related to having postgres installed and running on my mac separately from the remix instance inside Docker.

Killing the local install solved it for me.

This works for me. I had a separate instance of posgres running aside from the one running in my docker container. stoping the local postgres instance made resolve the issue.

from blues-stack.

tconroy avatar tconroy commented on April 27, 2024

This is on an M1 MacBook Pro, running Docker Desktop 4.6.1 (76265). Otherwise just followed exact setup in the README.

# psql -U postgres
psql (11.3 (Debian 11.3-1.pgdg90+1))
Type "help" for help.

postgres=# \l
                                 List of databases
   Name    |  Owner   | Encoding |  Collate   |   Ctype    |   Access privileges
-----------+----------+----------+------------+------------+-----------------------
 postgres  | postgres | UTF8     | en_US.utf8 | en_US.utf8 |
 template0 | postgres | UTF8     | en_US.utf8 | en_US.utf8 | =c/postgres          +
           |          |          |            |            | postgres=CTc/postgres
 template1 | postgres | UTF8     | en_US.utf8 | en_US.utf8 | =c/postgres          +
           |          |          |            |            | postgres=CTc/postgres
(3 rows)

postgres=# \du
                                   List of roles
 Role name |                         Attributes                         | Member of
-----------+------------------------------------------------------------+-----------
 postgres  | Superuser, Create role, Create DB, Replication, Bypass RLS | {}

from blues-stack.

bradymwilliams avatar bradymwilliams commented on April 27, 2024

Same issue. Same versions. Updating to user name in env DATABASE_URL also worked for me.

from blues-stack.

CanRau avatar CanRau commented on April 27, 2024

Same error here, just bootstrapped a new blues stack. strangely the one I bootstrapped couple of days ago (pretty sure less than 19 days) didn't fail 🤔

Also found prisma/prisma#6778

Update: Not sure what's the exact solution as I docker-compose down && docker-compose up --force-recreate a bunch of times though I changed POSTGRES_USER, POSTGRES_PASSWORD & POSTGRES_DB as well as DATABASE_URL in .env

from blues-stack.

tconroy avatar tconroy commented on April 27, 2024

Same problem here. By the way, which user name do you mean?

@Saad29: I mean the name of your user account. What you see when you run this in your shell:

echo $USER

from blues-stack.

mcansh avatar mcansh commented on April 27, 2024

looking into this a bit, haven't found anything out of the ordinary in these set ups or during a bit of googling..

but in the interim, you should be able to do the following instead:

version: "3.7"
services:
  postgres:
    image: postgres:latest
    restart: unless-stopped
-   environment:
-     - POSTGRES_USER=postgres
-     - POSTGRES_PASSWORD=postgres
-     - POSTGRES_DB=postgres
+   env_file:
+   	— .env
    ports:
      - "5432:5432"
    volumes:
      - ./postgres-data:/var/lib/postgresql/data

then add the following to a .env file

POSTGRES_USER=myuser
POSTGRES_PASSWORD=postgres
POSTGRES_DB=postgres

you might also be able to keep the password/db in the compose env, but im not sure if those are a one or the other type of thing

from blues-stack.

machour avatar machour commented on April 27, 2024

Closing this issue as no response was provided.
Feel free to re-open it if it's still a problem.

from blues-stack.

sostenesapollo avatar sostenesapollo commented on April 27, 2024

My issue is related to postgres in another server, when I try it it shows

Error: Can't reach database server at `undefined.34.121.158.52`:`5432`

But just with this remix app, with nestjs and using local db it works normally

from blues-stack.

postmeback avatar postmeback commented on April 27, 2024

Postgresql-Error

I have implemented all the above suggestions, but none helps. Also, I am pretty new to Postgres, so would be nice if any suggestion comes up.

Please reopen the issue

from blues-stack.

lexNwimue avatar lexNwimue commented on April 27, 2024

@postmeback did you eventually find a fix? I'm in the same shoes now

from blues-stack.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.