help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: failure to connect to postgres DB via pg.el


From: Tim X
Subject: Re: failure to connect to postgres DB via pg.el
Date: Sun, 08 Oct 2006 12:20:12 +1000
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

Martin Steffen <msteffen@ifi.uio.no> writes:

>
>   signal(error ("Backend error: FATAL:  Ident authentication failed for user 
> \"user-name\"\n"))
>   error("Backend error: %s" "FATAL:  Ident authentication failed for user 
> \"msteffen\"\n")
>
>   byte-code("..... process connection pg:SM_USER pg:SM_OPTIONS pg:SM_UNUSED 
> generate-new-buffer " *PostgreSQL*" nil open-network-stream "postgres" 
> fboundp set-buffer-process-coding-system binary set-buffer-multibyte vector 
> cl-struct-pgcon 1 pg:send-int 4 2 pg:send accept-process-output 0 error 
> "pgcon-process accessing a non-pgcon" pg:read-char 69 "Backend error: %s" 
> pg:read-string 4096 82 pg:read-net-int pg:initialize-parsers pg:exec "SET 
> datestyle = 'ISO'" throw --cl-block-pg:connect-- 5 "Crypt authentication not 
> supported" "Kerberos4 authentication not supported" "Kerberos5 authentication 
> not supported" "Can't do that type of authentication: %s" "Problem 
> connecting: expected an authentication response" pg:SM_TTY user-packet-length 
> host port pg:StartupPacketSize pg:PG_PROTOCOL_63_MAJOR ...] 7)
>

I'm not a postgres expert, but recently when setting up a pg database
for the first time, I remember there is quite a complex set of options
for connecting to postgres. 

You have two types of connections - local unix domain sockets and tcp.
In addition to that, you have various levels of authentication (i.e.
different strengths). For example, a basic username and password or
possibly a username and password and additional verification via
identd. 

Beware the assumption that the database is OK because you can connect
via the pg command line tool. I suspect your problem is authentication
over a tcp connection. The command line pg tool almost certainly uses
unix domain sockets, but the pg.el software is using tcp ports. 

>From memory, you can get the command line pg tool to use tcp sockets
if you give it a switch. I would recommend doing that and then
debugging from there. Once you ahve it working, try pg.el again. Note
that from your error message, I suspect pg has been configured to make
a call to identd to verify you are who you say you are (i.e. a user
with that name from that IP address). Make sure identd is running and
available or change the pg config so that it doesn't use ident.

HTH

Tim
 
-- 
tcross (at) rapttech dot com dot au


reply via email to

[Prev in Thread] Current Thread [Next in Thread]