talk@lists.collectionspace.org

WE HAVE SUNSET THIS LISTSERV - Join us at collectionspace@lyrasislists.org

View all threads

Re: [Talk] Fwd: problem running psql on windows machine

JK
John Keller
Thu, Nov 10, 2011 9:04 PM

Bingo! Thanks for catching that "hint", Aron. Un-commenting the IPv6
line in pg_hba.conf fixes the problem.

Does this mean my machine must use IPv6 for the jboss/nuxeo/cspace
connections too?
Or that I have to somehow tell it to use IPv4 instead?

  • john

On 11/10/2011 12:23 PM, Aron Roberts wrote:

Hi John,

(Continuing off-list for now ...)

Could this be an issue of enabling at least IPv6 address(es) in the

pg_hba.conf file?  The mention of 'no pg_hba.conf entry for host
"::1"' hints that maybe your machine is configured to use IPv6, but
PostgreSQL isn't finding any entries for that protocol.

Aron

On Thu, Nov 10, 2011 at 12:04 PM, John Kellerjkeller@berkeley.edu  wrote:

Thanks for the suggestion, but it doesn't help.
(I had already tried that, per the note in the docs, but forgot to mention
it in my original post).

  • john

On 11/10/2011 11:42 AM, Jesse Martinez wrote:

Forgot to CC the talk list.

---------- Forwarded message ----------
From: Jesse Martinezjmartinez@movingimage.us
Date: Thu, Nov 10, 2011 at 1:41 PM
Subject: Re: [Talk] problem running psql on windows machine
To: John Kellerjkeller@berkeley.edu

Hi John,
Try using 127.0.0.1/32 as the address value instead of 'samehost'. I think
the samehost term is platform dependent and Postgres for Win7 doesn't use it
well. I haven't tried but possibly also 'localhost' may work too. I believe
they're semantically the same.
Additional info for
9.1: http://www.postgresql.org/docs/9.1/static/auth-pg-hba-conf.html
- Jesse

On Thu, Nov 10, 2011 at 1:07 PM, John Kellerjkeller@berkeley.edu  wrote:

I'm configuring PostgreSQL 9.1 on a Windows 7 machine. Following the
instructions at
http://wiki.collectionspace.org/display/DOC/PostgreSQL+Installation+-+Windows%2C+Mac+OS+X%2C+Generic+Linux,
when I try to run psql with the command "psql -d template1 -U postgres", I
receive this error:

psql: FATAL:  no pg_hba.conf entry for host "::1", user "postgres",
database "template1", SSL off

Here are the contents of my pg_hba.conf file:

TYPE  DATABASE        USER            ADDRESS                METHOD

IPv4 local connections:

host    all            postgres        samehost                md5
host    jbossdb        jboss          samehost                md5
host    nuxeo          nuxeo          samehost                md5
host    cspace          cspace          samehost                md5

IPv6 local connections:

#host    all            all            ::1/128                md5

Allow replication connections from localhost, by a user with the

replication privilege.

#host    replication    postgres        127.0.0.1/32            md5
#host    replication    postgres        ::1/128                md5

Note that no "local" connection was present after install, and trying to
add one like "local all all md5" makes it impossible to restart the database
service.

Help?

thanks,
john

--
John W. Keller
Web/Db Applications Programmer
EECS and IST, UC Berkeley
jkeller@berkeley.edu


Talk mailing list
Talk@lists.collectionspace.org

http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org

--
John W. Keller
Web/Db Applications Programmer
EECS and IST, UC Berkeley
jkeller@berkeley.edu

Bingo! Thanks for catching that "hint", Aron. Un-commenting the IPv6 line in pg_hba.conf fixes the problem. Does this mean my machine must use IPv6 for the jboss/nuxeo/cspace connections too? Or that I have to somehow tell it to use IPv4 instead? - john On 11/10/2011 12:23 PM, Aron Roberts wrote: > Hi John, > > (Continuing off-list for now ...) > > Could this be an issue of enabling at least IPv6 address(es) in the > pg_hba.conf file? The mention of 'no pg_hba.conf entry for host > "::1"' hints that maybe your machine is configured to use IPv6, but > PostgreSQL isn't finding any entries for that protocol. > > Aron > > On Thu, Nov 10, 2011 at 12:04 PM, John Keller<jkeller@berkeley.edu> wrote: >> Thanks for the suggestion, but it doesn't help. >> (I had already tried that, per the note in the docs, but forgot to mention >> it in my original post). >> >> - john >> >> >> On 11/10/2011 11:42 AM, Jesse Martinez wrote: >> >> Forgot to CC the talk list. >> >> ---------- Forwarded message ---------- >> From: Jesse Martinez<jmartinez@movingimage.us> >> Date: Thu, Nov 10, 2011 at 1:41 PM >> Subject: Re: [Talk] problem running psql on windows machine >> To: John Keller<jkeller@berkeley.edu> >> >> >> Hi John, >> Try using 127.0.0.1/32 as the address value instead of 'samehost'. I think >> the samehost term is platform dependent and Postgres for Win7 doesn't use it >> well. I haven't tried but possibly also 'localhost' may work too. I believe >> they're semantically the same. >> Additional info for >> 9.1: http://www.postgresql.org/docs/9.1/static/auth-pg-hba-conf.html >> - Jesse >> >> On Thu, Nov 10, 2011 at 1:07 PM, John Keller<jkeller@berkeley.edu> wrote: >>> I'm configuring PostgreSQL 9.1 on a Windows 7 machine. Following the >>> instructions at >>> http://wiki.collectionspace.org/display/DOC/PostgreSQL+Installation+-+Windows%2C+Mac+OS+X%2C+Generic+Linux, >>> when I try to run psql with the command "psql -d template1 -U postgres", I >>> receive this error: >>> >>> psql: FATAL: no pg_hba.conf entry for host "::1", user "postgres", >>> database "template1", SSL off >>> >>> Here are the contents of my pg_hba.conf file: >>> # TYPE DATABASE USER ADDRESS METHOD >>> >>> # IPv4 local connections: >>> host all postgres samehost md5 >>> host jbossdb jboss samehost md5 >>> host nuxeo nuxeo samehost md5 >>> host cspace cspace samehost md5 >>> # IPv6 local connections: >>> #host all all ::1/128 md5 >>> # Allow replication connections from localhost, by a user with the >>> # replication privilege. >>> #host replication postgres 127.0.0.1/32 md5 >>> #host replication postgres ::1/128 md5 >>> >>> >>> Note that no "local" connection was present after install, and trying to >>> add one like "local all all md5" makes it impossible to restart the database >>> service. >>> >>> Help? >>> >>> thanks, >>> john >>> >>> -- >>> John W. Keller >>> Web/Db Applications Programmer >>> EECS and IST, UC Berkeley >>> jkeller@berkeley.edu >>> >>> _______________________________________________ >>> Talk mailing list >>> Talk@lists.collectionspace.org >>> >>> http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org >>> >> >> >> >> _______________________________________________ >> Talk mailing list >> Talk@lists.collectionspace.org >> http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org >> >> -- >> John W. Keller >> Web/Db Applications Programmer >> EECS and IST, UC Berkeley >> jkeller@berkeley.edu >> >> _______________________________________________ >> Talk mailing list >> Talk@lists.collectionspace.org >> http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org >> >> -- John W. Keller Web/Db Applications Programmer EECS and IST, UC Berkeley jkeller@berkeley.edu
AR
Aron Roberts
Thu, Nov 10, 2011 9:45 PM

On Thu, Nov 10, 2011 at 1:04 PM, John Keller jkeller@berkeley.edu wrote:

Bingo! Thanks for catching that "hint", Aron. Un-commenting the IPv6 line in
pg_hba.conf fixes the problem.

Does this mean my machine must use IPv6 for the jboss/nuxeo/cspace
connections too?
Or that I have to somehow tell it to use IPv4 instead?

I can't off-hand think of any drawbacks to setting up, in
PostgreSQL's host-based authentication config file, pg_hba.conf, a
full set of access configuration for IPv6 parallel to those already
present for IPv4.

A speculative set of those configurations is now in the docs:

http://wiki.collectionspace.org/display/UNRELEASED/PostgreSQL+Installation+-+Windows%2C+Mac+OS+X%2C+Generic+Linux

(See the Info note about 25% into that file: "Recent systems, such
as PCs running operating systems like Windows 7 and Windows Vista, may
come with IPv6 enabled by default. If IPv6 is enabled on your system,
you might experiment with the following configuration (untried by this
writer), noting that ::1/128 signifies the loopback (aka "localhost")
address ..."

Aron

  • john

On 11/10/2011 12:23 PM, Aron Roberts wrote:

Hi John,

  (Continuing off-list for now ...)

  Could this be an issue of enabling at least IPv6 address(es) in the
pg_hba.conf file?  The mention of 'no pg_hba.conf entry for host
"::1"' hints that maybe your machine is configured to use IPv6, but
PostgreSQL isn't finding any entries for that protocol.

Aron

On Thu, Nov 10, 2011 at 12:04 PM, John Kellerjkeller@berkeley.edu
 wrote:

Thanks for the suggestion, but it doesn't help.
(I had already tried that, per the note in the docs, but forgot to
mention
it in my original post).

  • john

On 11/10/2011 11:42 AM, Jesse Martinez wrote:

Forgot to CC the talk list.

---------- Forwarded message ----------
From: Jesse Martinezjmartinez@movingimage.us
Date: Thu, Nov 10, 2011 at 1:41 PM
Subject: Re: [Talk] problem running psql on windows machine
To: John Kellerjkeller@berkeley.edu

Hi John,
Try using 127.0.0.1/32 as the address value instead of 'samehost'. I
think
the samehost term is platform dependent and Postgres for Win7 doesn't use
it
well. I haven't tried but possibly also 'localhost' may work too. I
believe
they're semantically the same.
Additional info for
9.1: http://www.postgresql.org/docs/9.1/static/auth-pg-hba-conf.html
  - Jesse

On Thu, Nov 10, 2011 at 1:07 PM, John Kellerjkeller@berkeley.edu
 wrote:

I'm configuring PostgreSQL 9.1 on a Windows 7 machine. Following the
instructions at

http://wiki.collectionspace.org/display/DOC/PostgreSQL+Installation+-+Windows%2C+Mac+OS+X%2C+Generic+Linux,
when I try to run psql with the command "psql -d template1 -U postgres",
I
receive this error:

psql: FATAL:  no pg_hba.conf entry for host "::1", user "postgres",
database "template1", SSL off

Here are the contents of my pg_hba.conf file:

TYPE  DATABASE        USER            ADDRESS                 METHOD

IPv4 local connections:

host    all             postgres        samehost                md5
host    jbossdb         jboss           samehost                md5
host    nuxeo           nuxeo           samehost                md5
host    cspace          cspace          samehost                md5

IPv6 local connections:

#host    all             all             ::1/128                 md5

Allow replication connections from localhost, by a user with the

replication privilege.

#host    replication     postgres        127.0.0.1/32            md5
#host    replication     postgres        ::1/128                 md5

Note that no "local" connection was present after install, and trying to
add one like "local all all md5" makes it impossible to restart the
database
service.

Help?

thanks,
john

--
John W. Keller
Web/Db Applications Programmer
EECS and IST, UC Berkeley
jkeller@berkeley.edu


Talk mailing list
Talk@lists.collectionspace.org

http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org

--
John W. Keller
Web/Db Applications Programmer
EECS and IST, UC Berkeley
jkeller@berkeley.edu

On Thu, Nov 10, 2011 at 1:04 PM, John Keller <jkeller@berkeley.edu> wrote: > Bingo! Thanks for catching that "hint", Aron. Un-commenting the IPv6 line in > pg_hba.conf fixes the problem. Cool! That solution is now listed in the Troubleshooting doc: <http://wiki.collectionspace.org/display/UNRELEASED/Troubleshooting+Installation+Problems#TroubleshootingInstallationProblems-%27nopghba.confentryforhost%22%3A%3A1%22%27errors> > Does this mean my machine must use IPv6 for the jboss/nuxeo/cspace > connections too? > Or that I have to somehow tell it to use IPv4 instead? I can't off-hand think of any drawbacks to setting up, in PostgreSQL's host-based authentication config file, pg_hba.conf, a full set of access configuration for IPv6 parallel to those already present for IPv4. A *speculative* set of those configurations is now in the docs: <http://wiki.collectionspace.org/display/UNRELEASED/PostgreSQL+Installation+-+Windows%2C+Mac+OS+X%2C+Generic+Linux> (See the Info note about 25% into that file: "Recent systems, such as PCs running operating systems like Windows 7 and Windows Vista, may come with IPv6 enabled by default. If IPv6 is enabled on your system, you might experiment with the following configuration (untried by this writer), noting that ::1/128 signifies the loopback (aka "localhost") address ..." Aron > > - john > > > > On 11/10/2011 12:23 PM, Aron Roberts wrote: >> >> Hi John, >> >>   (Continuing off-list for now ...) >> >>   Could this be an issue of enabling at least IPv6 address(es) in the >> pg_hba.conf file?  The mention of 'no pg_hba.conf entry for host >> "::1"' hints that maybe your machine is configured to use IPv6, but >> PostgreSQL isn't finding any entries for that protocol. >> >> Aron >> >> On Thu, Nov 10, 2011 at 12:04 PM, John Keller<jkeller@berkeley.edu> >>  wrote: >>> >>> Thanks for the suggestion, but it doesn't help. >>> (I had already tried that, per the note in the docs, but forgot to >>> mention >>> it in my original post). >>> >>> - john >>> >>> >>> On 11/10/2011 11:42 AM, Jesse Martinez wrote: >>> >>> Forgot to CC the talk list. >>> >>> ---------- Forwarded message ---------- >>> From: Jesse Martinez<jmartinez@movingimage.us> >>> Date: Thu, Nov 10, 2011 at 1:41 PM >>> Subject: Re: [Talk] problem running psql on windows machine >>> To: John Keller<jkeller@berkeley.edu> >>> >>> >>> Hi John, >>> Try using 127.0.0.1/32 as the address value instead of 'samehost'. I >>> think >>> the samehost term is platform dependent and Postgres for Win7 doesn't use >>> it >>> well. I haven't tried but possibly also 'localhost' may work too. I >>> believe >>> they're semantically the same. >>> Additional info for >>> 9.1: http://www.postgresql.org/docs/9.1/static/auth-pg-hba-conf.html >>>   - Jesse >>> >>> On Thu, Nov 10, 2011 at 1:07 PM, John Keller<jkeller@berkeley.edu> >>>  wrote: >>>> >>>> I'm configuring PostgreSQL 9.1 on a Windows 7 machine. Following the >>>> instructions at >>>> >>>> http://wiki.collectionspace.org/display/DOC/PostgreSQL+Installation+-+Windows%2C+Mac+OS+X%2C+Generic+Linux, >>>> when I try to run psql with the command "psql -d template1 -U postgres", >>>> I >>>> receive this error: >>>> >>>> psql: FATAL:  no pg_hba.conf entry for host "::1", user "postgres", >>>> database "template1", SSL off >>>> >>>> Here are the contents of my pg_hba.conf file: >>>> # TYPE  DATABASE        USER            ADDRESS                 METHOD >>>> >>>> # IPv4 local connections: >>>> host    all             postgres        samehost                md5 >>>> host    jbossdb         jboss           samehost                md5 >>>> host    nuxeo           nuxeo           samehost                md5 >>>> host    cspace          cspace          samehost                md5 >>>> # IPv6 local connections: >>>> #host    all             all             ::1/128                 md5 >>>> # Allow replication connections from localhost, by a user with the >>>> # replication privilege. >>>> #host    replication     postgres        127.0.0.1/32            md5 >>>> #host    replication     postgres        ::1/128                 md5 >>>> >>>> >>>> Note that no "local" connection was present after install, and trying to >>>> add one like "local all all md5" makes it impossible to restart the >>>> database >>>> service. >>>> >>>> Help? >>>> >>>> thanks, >>>> john >>>> >>>> -- >>>> John W. Keller >>>> Web/Db Applications Programmer >>>> EECS and IST, UC Berkeley >>>> jkeller@berkeley.edu >>>> >>>> _______________________________________________ >>>> Talk mailing list >>>> Talk@lists.collectionspace.org >>>> >>>> >>>> http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org >>>> >>> >>> >>> >>> _______________________________________________ >>> Talk mailing list >>> Talk@lists.collectionspace.org >>> >>> http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org >>> >>> -- >>> John W. Keller >>> Web/Db Applications Programmer >>> EECS and IST, UC Berkeley >>> jkeller@berkeley.edu >>> >>> _______________________________________________ >>> Talk mailing list >>> Talk@lists.collectionspace.org >>> >>> http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org >>> >>> > > -- > John W. Keller > Web/Db Applications Programmer > EECS and IST, UC Berkeley > jkeller@berkeley.edu > >