Thread: Host configuration
I am running postgress 7.2 on a solaris system and trying to connect from a windows 2000 based laptop to a database on the solaris system using an interactive sql program (from McKoi in fact). I have altered the pg_hba.conf file by appending a line to said file: TYPE DATABASE IP_ADDRESS MASK AUTH_TYPE AUTH_ARGUMENT host all 196.45.23.27 255.255.0.0 trust This should let all other hosts connect to any database. The server was started with the -i option to allow TCP/IP connections. The logging from the server indicated a connection attempt was made but the error message was along the lines of - "No pg_hba.conf entry for host 196.45.23.27, user fdm, database mmpoint." A similar problem was found if an attempt was made to connect from another UNIX system but the connection was successful when a connection was attempeted on the local machine. I searched for any other instance of pg_hba.conf on the UNIX box, in case it was picking up a different one but there was just the single instance. My connection string from my laptop was 'java -classpath "famejdbc.jar;pgjdbc2.jar" com.datagenic.fusion.isql org.postgresql.Driver jdbc:postgresql://mambar.fame.com/mmpoint fdm fdm2' Does anyone have an idea of what I need to do?
I had a similar problem recently and in the end it seems to have been me not restarting the postmaster; changes to the pg_hba.conffile weren't seen until then (I am sure this is documented but I managed to overlook it; Informix' sqlhosts fileis read at connection time so changes are immediate - I was conditioned by this, I think). This was on a linux box runningpostgres and a Windows app (pgadmin) trying to connect. If this is not the case please forgive my banal suggestion ... Greg Williamson DBA GlobeXplorer LLC -----Original Message----- From: Paul Harrison [mailto:pharrison@fame.com] Sent: Fri 8/15/2003 8:54 AM To: pgsql-admin@postgresql.org Cc: Subject: [ADMIN] Host configuration I am running postgress 7.2 on a solaris system and trying to connect from a windows 2000 based laptop to a database on the solaris system using an interactive sql program (from McKoi in fact). I have altered the pg_hba.conf file by appending a line to said file: TYPE DATABASE IP_ADDRESS MASK AUTH_TYPE AUTH_ARGUMENT host all 196.45.23.27 255.255.0.0 trust This should let all other hosts connect to any database. The server was started with the -i option to allow TCP/IP connections. The logging from the server indicated a connection attempt was made but the error message was along the lines of - "No pg_hba.conf entry for host 196.45.23.27, user fdm, database mmpoint." A similar problem was found if an attempt was made to connect from another UNIX system but the connection was successful when a connection was attempeted on the local machine. I searched for any other instance of pg_hba.conf on the UNIX box, in case it was picking up a different one but there was just the single instance. My connection string from my laptop was 'java -classpath "famejdbc.jar;pgjdbc2.jar" com.datagenic.fusion.isql org.postgresql.Driver jdbc:postgresql://mambar.fame.com/mmpoint fdm fdm2' Does anyone have an idea of what I need to do? ---------------------------(end of broadcast)--------------------------- TIP 8: explain analyze is your friend
In addition to making sure you do a reload to pick up the new values, make sure that the pg_hba.conf file you are editing is in fact the one being read by the postmaster. There have been a few situations where a symbolic link pointing from the data directory to a conf file living somewhere else gets lost or some other oddity in the way Postgres is set up on a machine causes confusion. It looks like you've made the correct entry in the pg_hba file, so I'd look in the direction of a reason for the file not being read. (I remember a situation where the postgresql.conf file wasn't available & we learned that postmaster doesn't complain if it is missing- I suppose this might be the case with pg_hba as well, but I've never tested it.) -Nick > -----Original Message----- > From: pgsql-admin-owner@postgresql.org > [mailto:pgsql-admin-owner@postgresql.org]On Behalf Of Gregory S. > Williamson > Sent: Saturday, August 16, 2003 4:21 AM > To: Paul Harrison; pgsql-admin@postgresql.org > Subject: Re: [ADMIN] Host configuration > > > I had a similar problem recently and in the end it seems to have > been me not restarting the postmaster; changes to the pg_hba.conf > file weren't seen until then (I am sure this is documented but I > managed to overlook it; Informix' sqlhosts file is read at > connection time so changes are immediate - I was conditioned by > this, I think). This was on a linux box running postgres and a > Windows app (pgadmin) trying to connect. > > If this is not the case please forgive my banal suggestion ... > > Greg Williamson > DBA GlobeXplorer LLC > > -----Original Message----- > From: Paul Harrison [mailto:pharrison@fame.com] > Sent: Fri 8/15/2003 8:54 AM > To: pgsql-admin@postgresql.org > Cc: > Subject: [ADMIN] Host configuration > > I am running postgress 7.2 on a solaris system and trying to > connect from a > windows 2000 based laptop to a database on the solaris system using an > interactive sql program (from McKoi in fact). > > I have altered the pg_hba.conf file by appending a line to said file: > > TYPE DATABASE IP_ADDRESS MASK > AUTH_TYPE AUTH_ARGUMENT > host all 196.45.23.27 255.255.0.0 trust > > This should let all other hosts connect to any database. > > The server was started with the -i option to allow TCP/IP connections. > The logging from the server indicated a connection attempt was > made but the > error message was along the lines of - "No pg_hba.conf entry for host > 196.45.23.27, user fdm, database mmpoint." > > A similar problem was found if an attempt was made to connect from another > UNIX system but the connection was successful when a connection was > attempeted on the local machine. > > I searched for any other instance of pg_hba.conf on the UNIX box, > in case it > was picking up a different one but there was just the single instance. > My connection string from my laptop was 'java -classpath > "famejdbc.jar;pgjdbc2.jar" com.datagenic.fusion.isql org.postgresql.Driver > jdbc:postgresql://mambar.fame.com/mmpoint fdm fdm2' > Does anyone have an idea of what I need to do? > > > ---------------------------(end of broadcast)--------------------------- > TIP 8: explain analyze is your friend > > > > > ---------------------------(end of broadcast)--------------------------- > TIP 3: if posting/reading through Usenet, please send an appropriate > subscribe-nomail command to majordomo@postgresql.org so that your > message can get through to the mailing list cleanly >
At 02:21 AM 8/16/2003 , Gregory S. Williamson wrote: >I had a similar problem recently and in the end it seems to have been me >not restarting the postmaster; changes to the pg_hba.conf file weren't >seen until then (I am sure this is documented but I managed to overlook it; The file was read on each connection attempt up through 7.1 (I think). Now it is read on the postmaster startup. A "pg_ctl reload" will do it for you. -- CONFIDENTIALITY NOTICE -- This message is intended for the sole use of the individual and entity to whom it is addressed, and may contain informationthat is privileged, confidential and exempt from disclosure under applicable law. If you are not the intendedaddressee, nor authorized to receive for the intended addressee, you are hereby notified that you may not use, copy,disclose or distribute to anyone the message or any information contained in the message. If you have received thismessage in error, please immediately advise the sender by reply email, and delete the message. Thank you.