Giter Club home page Giter Club logo

Comments (6)

ingalls avatar ingalls commented on July 20, 2024

@benstadin thanks a ton for opening an issue! Let's rule out the low lying fruit.

  • Did you run the schema file located here? https://github.com/mapbox/Hecate/blob/master/src/schema.sql
    • Once you create a new database it can be loaded with psql -U postgres -f src/schema.sql <DATABASE_NAME>
  • Can you confirm the hecate and hecate_read users were created successfully?
    • echo "\du" | psql -U postgres will output a list of users
  Role name  |                         Attributes                         | Member of 
-------------+------------------------------------------------------------+-----------
 hecate      | No inheritance                                             | {}
 hecate_read | No inheritance                                             | {}
 postgres    | Superuser, Create role, Create DB, Replication, Bypass RLS | {}
  • Do all users have local access enabled? If you are running ubuntu I've had trouble with this one before when initially trying to get set up.
    • echo "show hba_file;" | psql -U postgres will print the path location
    • If you can take a look and ensure local connections are trusted that would be great!
    • I typically use the following on my dev machine
local all postgres trust
local all all trust
host all all 127.0.0.1/32 trust
host all all ::1/128 trust
host replication postgres samenet trust

Let me know if any of these fix the problem, if so I'd love to update the docs with some troubleshooting help.

from hecate.

benstadin avatar benstadin commented on July 20, 2024

@benstadin thanks a ton for opening an issue! Let's rule out the low lying fruit.

Yes. I used the same DB name, commands and users as in the Build example.

  • Once you create a new database it can be loaded with psql -U postgres -f src/schema.sql <DATABASE_NAME>
  • Can you confirm the hecate and hecate_read users were created successfully?

Yes.

  • echo "\du" | psql -U postgres will output a list of users
  Role name  |                         Attributes                         | Member of 
-------------+------------------------------------------------------------+-----------
 hecate      | No inheritance                                             | {}
 hecate_read | No inheritance                                             | {}
 postgres    | Superuser, Create role, Create DB, Replication, Bypass RLS | {}
  Role name  |                         Attributes                         | Member of 
-------------+------------------------------------------------------------+-----------
 hecate      | No inheritance                                             | {}
 hecate_read | No inheritance                                             | {}
 postgres    | Superuser, Create role, Create DB, Replication, Bypass RLS | {}
  • Do all users have local access enabled? If you are running ubuntu I've had trouble with this one before when initially trying to get set up.

    • echo "show hba_file;" | psql -U postgres will print the path location
    • If you can take a look and ensure local connections are trusted that would be great!
    • I typically use the following on my dev machine
local all postgres trust
local all all trust
host all all 127.0.0.1/32 trust
host all all ::1/128 trust
host replication postgres samenet trust

Let me know if any of these fix the problem, if so I'd love to update the docs with some troubleshooting help.

This is what it's showing for me:

# TYPE  DATABASE        USER            ADDRESS                 METHOD

# "local" is for Unix domain socket connections only
local   all             all                                     md5
# IPv4 local connections:
host    all             all             127.0.0.1/32            md5
# IPv6 local connections:
host    all             all             ::1/128                 md5
# Allow replication connections from localhost, by a user with the
# replication privilege.
local   replication     all                                     md5
host    replication     all             127.0.0.1/32            md5
host    replication     all             ::1/128                 md5

My environment:

  • OS X 10.13.6
  • postgres 11.1
  • rust nightly as per build instruction

Update
I updated the postgres config and it works now. Thanks!
The error message ("password authentication failed for user ...") is misleading. It's probably from the driver, though it should rather say the connection failed for that user.

from hecate.

ingalls avatar ingalls commented on July 20, 2024

@benstadin yeah this is an error passed via the driver. I have a ticket here: #90 to improve initial database connection errors.

Going to close this one out and add the hba fix to the setup docs. Thanks a ton for reporting this, look forward to more bug reports if you find any!

from hecate.

mapsgeek avatar mapsgeek commented on July 20, 2024

I'm following all the instructions for the installation but i keep getting this error
ERROR: Connection unable obtain postgres version using (READ/WRITE) hecate@localhost:5432/hecate
however i can connect to the database using the hecate user from pgadmin and everything looks fine from the command line.
any thoughts?

from hecate.

ingalls avatar ingalls commented on July 20, 2024

@mapsgeek What version of Postgres/Postgis are you using?

from hecate.

mapsgeek avatar mapsgeek commented on July 20, 2024

v14, postgis 3.1
should i downgrade?!

from hecate.

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.