[racket] postgres connect problem - unexpected 'password required' error

From: Thomas Lynch (thomas.lynch at reasoningtechnology.com)
Date: Thu Jan 1 10:32:01 EST 2015

So yes,  the Unix socket and TCP local connection are different in the
config file, one being peer, the other being 'md5'

I assume setting the tcp socket to peer in the pg_hba.conf file would work.

I just tested your suggestion of  "adding `#:socket 'guess` to your
`postgresql-connect` call" and that works.  Thank you!

I don't know if there is an issue that caused the package to be distributed
with these config settings so I will go with the #:socket `guess approach
until I have a better understanding.

BTW, the other contingency of "`#:ssl 'yes` to `postgresql-connect" had no
affect in this case.

Thank you !



On Thu, Jan 1, 2015 at 11:20 PM, Thomas Lynch <
thomas.lynch at reasoningtechnology.com> wrote:

>
>
> On Thu, Jan 1, 2015 at 6:25 PM, Neil Van Dyke <neil at neilvandyke.org>
> wrote:
>
>> Thomas Lynch wrote on 01/01/2015 03:30 AM:
>>
>>> I am having difficulty connecting to the postgres server from Racket.
>>> It asks for a password, but role and authentication is set up so that the
>>> logged in local user does not need one.
>>>
>>>
>> Is `psql` is using a Unix domain socket to talk to PG,
>> `postgresql-connect` is using a `localhost` TCP port to PG, and your
>> `/etc/postgresql/*/main/pg_hba.conf` is configured to have different
>> authentication for the two different methods?
>>
>
> By gosh you are correct, this is the default for pg_hba.conf with the
> debian package install:
>
>
>>
>> If so, try either adding `#:socket 'guess` to your `postgresql-connect`
>> call, or modifying your `pg_hba.conf` (and restarting PG).
>>
>> If that's not quite it, try also adding `#:ssl 'yes` to
>> `postgresql-connect`, or modifying `pg_hba.conf` again.
>>
>> If that's not it, check for PG environment variables that `psql` could be
>> using.  Also, you can test the different methods by supplying different
>> `conninfo` strings on the `psql` command line.
>>
>> Neil V.
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20150101/3fd1d387/attachment.html>

Posted on the users mailing list.