Skip to content

gleam run -m squirrel returns error "no pg_hba.conf entry for host" #85

@edkelly303

Description

@edkelly303

Hi Jak!

I'm running into a new exciting error when trying to connect to my database with Squirrel v3.0.4:

➜  event_store git:(master) ✗ gleam run -m squirrel                                Compiled in 0.10s
    Running squirrel.main
Error: Cannot authenticate (no-method)

I ran into an unexpected problem while trying to authenticate with the Postgres
server. This is most definitely a bug!

Please open an issue at
https://github.com/giacomocavalieri/squirrel/issues/new with some
details about what you where doing, including the following message:
  Expected: AuthMethod, Got: BeErrorResponse(Set(dict.from_list([#(Code("28000"), []), #(File("auth.c"), []), #(Line("542"), []), #(Message("no pg_hba.conf entry for host \"XX.XXX.XXX.XX\", user \"XXXXXstaging\", database \"XXXXX__staging__2024-11-25_11-00\", no encryption"), []), #(Routine("ClientAuthentication"), []), #(Severity("FATAL"), []), #(SeverityLocalized("FATAL"), [])])))

I'm pretty sure this Postgres user/role has a SCRAM password, not an MD5 one, so it's (presumably) not the same issue that we spoke about at Lambda Days.

If helpful, I'm running Gleam 1.11.1 on WSL/Ubuntu on Windows 10, connecting to a remote Postgres 16.8 database, and my deps in gleam.toml are:

[dependencies]
gleam_stdlib = ">= 0.51.0 and < 2.0.0"
mist = ">= 4.0.0 and < 5.0.0"
gleam_erlang = ">= 0.33.0 and < 1.0.0"
gleam_http = ">= 4.0.0 and < 5.0.0"
gleam_otp = ">= 0.16.1 and < 1.0.0"
pog = ">= 3.0.0 and < 4.0.0"
envoy = ">= 1.0.2 and < 2.0.0"
gleam_json = ">= 3.0.0 and < 4.0.0"

[dev-dependencies]
gleeunit = ">= 1.0.0 and < 2.0.0"
squirrel = ">= 3.0.4 and < 4.0.0"

Ed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions