Thread: Need Help Enabling Remote Connections
I added a db user (with super-user privileges) and edited pg_hba.conf to allow 192.168.15.0/24 and 192.168.1.0/24 (the remote subnet, where I'm trying to connect from).
I edited postgresql.conf to:
listen_addresses = '*'
port = 5432
max_connections = 100
But I cannot connect remotely, I get "Server doesn't Listen" from pgAdmin.
Any ideas?
here is my pg_hba.conf file:
host all all 192.168.1.0/24 trust
host all all 192.168.15.0/24 trust
I don't understand why this isn't working.
http://www.postgresql.org/docs/8.2/interactive/auth-pg-hba-conf.htmlOn Wed, Mar 31, 2010 at 4:09 PM, Jonathan Mast <jhmast.developer@gmail.com> wrote:I've just installed Postgresql Server 8.1.xx on Cent OS 5.4, the server's IP is 192.168.15.113
I added a db user (with super-user privileges) and edited pg_hba.conf to allow 192.168.15.0/24 and 192.168.1.0/24 (the remote subnet, where I'm trying to connect from).
I edited postgresql.conf to:
listen_addresses = '*'
port = 5432
max_connections = 100
But I cannot connect remotely, I get "Server doesn't Listen" from pgAdmin.
Any ideas?
Thanks, but I'm not seeing anything new on the link.
here is my pg_hba.conf file:
host all all 192.168.1.0/24 trust
host all all 192.168.15.0/24 trust
I don't understand why this isn't working.On Wed, Mar 31, 2010 at 3:14 PM, Luiz Eduardo Cantanhede Neri <lecneri@gmail.com> wrote:http://www.postgresql.org/docs/8.2/interactive/auth-pg-hba-conf.htmlOn Wed, Mar 31, 2010 at 4:09 PM, Jonathan Mast <jhmast.developer@gmail.com> wrote:I've just installed Postgresql Server 8.1.xx on Cent OS 5.4, the server's IP is 192.168.15.113
I added a db user (with super-user privileges) and edited pg_hba.conf to allow 192.168.15.0/24 and 192.168.1.0/24 (the remote subnet, where I'm trying to connect from).
I edited postgresql.conf to:
listen_addresses = '*'
port = 5432
max_connections = 100
But I cannot connect remotely, I get "Server doesn't Listen" from pgAdmin.
Any ideas?
$SU -l postgres -c "$PGENGINE/initdb --pgdata='$PGDATA' --auth='ident sameuser'" >> "$PGLOG" 2>&1 < /dev/null
I placed the -i option right before the -c option and it wouldn't start at all.
What is the -i option supposed to be doing?
I was getting the same error on 8.3.5 on Suse – not sure if it applies.
I had to change a line in /etc/rc.d/postgresql (Note the –i before $OPTIONS)
pg_ctl start -s -w -p $H -D $DATADIR -o "\" $OPTIONS\""
to
pg_ctl start -s -w -p $H -D $DATADIR -o "\" -i $OPTIONS\""
From: pgsql-novice-owner@postgresql.org [mailto:pgsql-novice-owner@postgresql.org] On Behalf Of Jonathan Mast
Sent: Wednesday, March 31, 2010 3:32 PM
To: pgsql-novice@postgresql.org
Subject: Re: [NOVICE] Need Help Enabling Remote Connections
Thanks, but I'm not seeing anything new on the link.
here is my pg_hba.conf file:
host all all 192.168.1.0/24 trust
host all all 192.168.15.0/24 trust
I don't understand why this isn't working.On Wed, Mar 31, 2010 at 3:14 PM, Luiz Eduardo Cantanhede Neri <lecneri@gmail.com> wrote:
http://www.postgresql.org/docs/8.2/interactive/auth-pg-hba-conf.html
On Wed, Mar 31, 2010 at 4:09 PM, Jonathan Mast <jhmast.developer@gmail.com> wrote:
I've just installed Postgresql Server 8.1.xx on Cent OS 5.4, the server's IP is 192.168.15.113
I added a db user (with super-user privileges) and edited pg_hba.conf to allow 192.168.15.0/24 and 192.168.1.0/24 (the remote subnet, where I'm trying to connect from).
I edited postgresql.conf to:
listen_addresses = '*'
port = 5432
max_connections = 100
But I cannot connect remotely, I get "Server doesn't Listen" from pgAdmin.
Any ideas?
From: Jonathan Mast <jhmast.developer@gmail.com>
Date: Wed, Mar 31, 2010 at 4:33 PM
Subject: Re: [NOVICE] Need Help Enabling Remote Connections
To: "Wright, George" <george.wright@mag-ias.com>
So I set the listen_addresses to '*' so that means the -i option should be irrelevant, right?
Thanks
It’s a passthrough to the postgres command itself.
From the doc:
-i
Allows remote clients to connect via TCP/IP (Internet domain) connections. Without this option, only local connections are accepted. This option is equivalent to setting listen_addresses to * in postgresql.conf or via -h.
This option is deprecated since it does not allow access to the full functionality of listen_addresses. It's usually better to set listen_addresses directly.
From: pgsql-novice-owner@postgresql.org [mailto:pgsql-novice-owner@postgresql.org] On Behalf Of Jonathan Mast
Sent: Wednesday, March 31, 2010 4:16 PM
The equivalent file on CentOS uses this:
$SU -l postgres -c "$PGENGINE/initdb --pgdata='$PGDATA' --auth='ident sameuser'" >> "$PGLOG" 2>&1 < /dev/null
I placed the -i option right before the -c option and it wouldn't start at all.
What is the -i option supposed to be doing?On Wed, Mar 31, 2010 at 4:02 PM, Wright, George <george.wright@mag-ias.com> wrote:
I was getting the same error on 8.3.5 on Suse – not sure if it applies.
I had to change a line in /etc/rc.d/postgresql (Note the –i before $OPTIONS)
pg_ctl start -s -w -p $H -D $DATADIR -o "\" $OPTIONS\""
to
pg_ctl start -s -w -p $H -D $DATADIR -o "\" -i $OPTIONS\""
From: pgsql-novice-owner@postgresql.org [mailto:pgsql-novice-owner@postgresql.org] On Behalf Of Jonathan Mast
Sent: Wednesday, March 31, 2010 3:32 PM
To: pgsql-novice@postgresql.org
Subject: Re: [NOVICE] Need Help Enabling Remote Connections
Thanks, but I'm not seeing anything new on the link.
here is my pg_hba.conf file:
host all all 192.168.1.0/24 trust
host all all 192.168.15.0/24 trust
I don't understand why this isn't working.On Wed, Mar 31, 2010 at 3:14 PM, Luiz Eduardo Cantanhede Neri <lecneri@gmail.com> wrote:
http://www.postgresql.org/docs/8.2/interactive/auth-pg-hba-conf.html
On Wed, Mar 31, 2010 at 4:09 PM, Jonathan Mast <jhmast.developer@gmail.com> wrote:
I've just installed Postgresql Server 8.1.xx on Cent OS 5.4, the server's IP is 192.168.15.113
I added a db user (with super-user privileges) and edited pg_hba.conf to allow 192.168.15.0/24 and 192.168.1.0/24 (the remote subnet, where I'm trying to connect from).
I edited postgresql.conf to:
listen_addresses = '*'
port = 5432
max_connections = 100
But I cannot connect remotely, I get "Server doesn't Listen" from pgAdmin.
Any ideas?
Even though I listed my exact ip/port in pg_hba.conf, I could not connect without the –i option in postgresql.
It may be my OS and DB version, not sure.
From: pgsql-novice-owner@postgresql.org [mailto:pgsql-novice-owner@postgresql.org] On Behalf Of Jonathan Mast
Sent: Wednesday, March 31, 2010 4:34 PMSubject: Fwd: [NOVICE] Need Help Enabling Remote Connections
---------- Forwarded message ----------
From: Jonathan Mast <jhmast.developer@gmail.com>
Date: Wed, Mar 31, 2010 at 4:33 PM
Subject: Re: [NOVICE] Need Help Enabling Remote Connections
To: "Wright, George" <george.wright@mag-ias.com>
So I set the listen_addresses to '*' so that means the -i option should be irrelevant, right?
Thanks
On Wed, Mar 31, 2010 at 4:31 PM, Wright, George <george.wright@mag-ias.com> wrote:
It’s a passthrough to the postgres command itself.
From the doc:
-i
Allows remote clients to connect via TCP/IP (Internet domain) connections. Without this option, only local connections are accepted. This option is equivalent to setting listen_addresses to * in postgresql.conf or via -h.
This option is deprecated since it does not allow access to the full functionality of listen_addresses. It's usually better to set listen_addresses directly.
From: pgsql-novice-owner@postgresql.org [mailto:pgsql-novice-owner@postgresql.org] On Behalf Of Jonathan Mast
Sent: Wednesday, March 31, 2010 4:16 PM
To: pgsql-novice@postgresql.org
Subject: Re: [NOVICE] Need Help Enabling Remote Connections
The equivalent file on CentOS uses this:
$SU -l postgres -c "$PGENGINE/initdb --pgdata='$PGDATA' --auth='ident sameuser'" >> "$PGLOG" 2>&1 < /dev/null
I placed the -i option right before the -c option and it wouldn't start at all.
What is the -i option supposed to be doing?On Wed, Mar 31, 2010 at 4:02 PM, Wright, George <george.wright@mag-ias.com> wrote:
I was getting the same error on 8.3.5 on Suse – not sure if it applies.
I had to change a line in /etc/rc.d/postgresql (Note the –i before $OPTIONS)
pg_ctl start -s -w -p $H -D $DATADIR -o "\" $OPTIONS\""
to
pg_ctl start -s -w -p $H -D $DATADIR -o "\" -i $OPTIONS\""
From: pgsql-novice-owner@postgresql.org [mailto:pgsql-novice-owner@postgresql.org] On Behalf Of Jonathan Mast
Sent: Wednesday, March 31, 2010 3:32 PM
To: pgsql-novice@postgresql.org
Subject: Re: [NOVICE] Need Help Enabling Remote Connections
Thanks, but I'm not seeing anything new on the link.
here is my pg_hba.conf file:
host all all 192.168.1.0/24 trust
host all all 192.168.15.0/24 trust
I don't understand why this isn't working.On Wed, Mar 31, 2010 at 3:14 PM, Luiz Eduardo Cantanhede Neri <lecneri@gmail.com> wrote:
http://www.postgresql.org/docs/8.2/interactive/auth-pg-hba-conf.html
On Wed, Mar 31, 2010 at 4:09 PM, Jonathan Mast <jhmast.developer@gmail.com> wrote:
I've just installed Postgresql Server 8.1.xx on Cent OS 5.4, the server's IP is 192.168.15.113
I added a db user (with super-user privileges) and edited pg_hba.conf to allow 192.168.15.0/24 and 192.168.1.0/24 (the remote subnet, where I'm trying to connect from).
I edited postgresql.conf to:
listen_addresses = '*'
port = 5432
max_connections = 100
But I cannot connect remotely, I get "Server doesn't Listen" from pgAdmin.
Any ideas?
Jonathan Mast <jhmast.developer@gmail.com> writes: > So I set the listen_addresses to '*' so that means the -i option should be > irrelevant, right? Yeah, they're the same thing. Did you remember to restart the server after changing that option? What I'd do first is check "netstat -l --inet" to verify whether the server is listening on port 5432 with a foreign address of "*.*". If not, you haven't got the server configuration right yet. If you do see such an entry, then your problem is not with Postgres config. I'd bet on the kernel firewall not being configured to pass traffic for port 5432. regards, tom lane
I was getting the same error on 8.3.5 on Suse – not sure if it applies.
I had to change a line in /etc/rc.d/postgresql (Note the –i before $OPTIONS)
pg_ctl start -s -w -p $H -D $DATADIR -o "\" $OPTIONS\""
to
pg_ctl start -s -w -p $H -D $DATADIR -o "\" -i $OPTIONS\""
From: pgsql-novice-owner@postgresql.org [mailto:pgsql-novice-owner@postgresql.org] On Behalf Of Jonathan Mast
Sent: Wednesday, March 31, 2010 3:32 PM
To: pgsql-novice@postgresql.org
Subject: Re: [NOVICE] Need Help Enabling Remote Connections
Thanks, but I'm not seeing anything new on the link.
here is my pg_hba.conf file:
host all all 192.168.1.0/24 trust
host all all 192.168.15.0/24 trust
I don't understand why this isn't working.
On Wed, Mar 31, 2010 at 3:14 PM, Luiz Eduardo Cantanhede Neri <lecneri@gmail.com> wrote:
http://www.postgresql.org/docs/8.2/interactive/auth-pg-hba-conf.html
On Wed, Mar 31, 2010 at 4:09 PM, Jonathan Mast <jhmast.developer@gmail.com> wrote:
I've just installed Postgresql Server 8.1.xx on Cent OS 5.4, the server's IP is 192.168.15.113
I added a db user (with super-user privileges) and edited pg_hba.conf to allow 192.168.15.0/24 and 192.168.1.0/24 (the remote subnet, where I'm trying to connect from).
I edited postgresql.conf to:
listen_addresses = '*'
port = 5432
max_connections = 100
But I cannot connect remotely, I get "Server doesn't Listen" from pgAdmin.
Any ideas?
Even though I listed my exact ip/port in pg_hba.conf, I could not connect without the –i option in postgresql.
It may be my OS and DB version, not sure.
From: pgsql-novice-owner@postgresql.org [mailto:pgsql-novice-owner@postgresql.org] On Behalf Of Jonathan Mast
Sent: Wednesday, March 31, 2010 4:34 PM
To: pgsql-novice@postgresql.org
Subject: Fwd: [NOVICE] Need Help Enabling Remote Connections
---------- Forwarded message ----------
From: Jonathan Mast <jhmast.developer@gmail.com>
Date: Wed, Mar 31, 2010 at 4:33 PM
Subject: Re: [NOVICE] Need Help Enabling Remote Connections
To: "Wright, George" <george.wright@mag-ias.com>
So I set the listen_addresses to '*' so that means the -i option should be irrelevant, right?
Thanks
On Wed, Mar 31, 2010 at 4:31 PM, Wright, George <george.wright@mag-ias.com> wrote:
It’s a passthrough to the postgres command itself.
From the doc:
-i
Allows remote clients to connect via TCP/IP (Internet domain) connections. Without this option, only local connections are accepted. This option is equivalent to setting listen_addresses to * in postgresql.conf or via -h.
This option is deprecated since it does not allow access to the full functionality of listen_addresses. It's usually better to set listen_addresses directly.
From: pgsql-novice-owner@postgresql.org [mailto:pgsql-novice-owner@postgresql.org] On Behalf Of Jonathan Mast
Sent: Wednesday, March 31, 2010 4:16 PM
To: pgsql-novice@postgresql.org
Subject: Re: [NOVICE] Need Help Enabling Remote Connections
The equivalent file on CentOS uses this:
$SU -l postgres -c "$PGENGINE/initdb --pgdata='$PGDATA' --auth='ident sameuser'" >> "$PGLOG" 2>&1 < /dev/null
I placed the -i option right before the -c option and it wouldn't start at all.
What is the -i option supposed to be doing?
On Wed, Mar 31, 2010 at 4:02 PM, Wright, George <george.wright@mag-ias.com> wrote:
I was getting the same error on 8.3.5 on Suse – not sure if it applies.
I had to change a line in /etc/rc.d/postgresql (Note the –i before $OPTIONS)
pg_ctl start -s -w -p $H -D $DATADIR -o "\" $OPTIONS\""
to
pg_ctl start -s -w -p $H -D $DATADIR -o "\" -i $OPTIONS\""
From: pgsql-novice-owner@postgresql.org [mailto:pgsql-novice-owner@postgresql.org] On Behalf Of Jonathan Mast
Sent: Wednesday, March 31, 2010 3:32 PM
To: pgsql-novice@postgresql.org
Subject: Re: [NOVICE] Need Help Enabling Remote Connections
Thanks, but I'm not seeing anything new on the link.
here is my pg_hba.conf file:
host all all 192.168.1.0/24 trust
host all all 192.168.15.0/24 trust
I don't understand why this isn't working.
On Wed, Mar 31, 2010 at 3:14 PM, Luiz Eduardo Cantanhede Neri <lecneri@gmail.com> wrote:
http://www.postgresql.org/docs/8.2/interactive/auth-pg-hba-conf.html
On Wed, Mar 31, 2010 at 4:09 PM, Jonathan Mast <jhmast.developer@gmail.com> wrote:
I've just installed Postgresql Server 8.1.xx on Cent OS 5.4, the server's IP is 192.168.15.113
I added a db user (with super-user privileges) and edited pg_hba.conf to allow 192.168.15.0/24 and 192.168.1.0/24 (the remote subnet, where I'm trying to connect from).
I edited postgresql.conf to:
listen_addresses = '*'
port = 5432
max_connections = 100
But I cannot connect remotely, I get "Server doesn't Listen" from pgAdmin.
Any ideas?
It’s a passthrough to the postgres command itself.
From the doc:
-i
Allows remote clients to connect via TCP/IP (Internet domain) connections. Without this option, only local connections are accepted. This option is equivalent to setting listen_addresses to * in postgresql.conf or via -h.
This option is deprecated since it does not allow access to the full functionality of listen_addresses. It's usually better to set listen_addresses directly.
From: pgsql-novice-owner@postgresql.org [mailto:pgsql-novice-owner@postgresql.org] On Behalf Of Jonathan Mast
Sent: Wednesday, March 31, 2010 4:16 PM
To: pgsql-novice@postgresql.org
Subject: Re: [NOVICE] Need Help Enabling Remote Connections
The equivalent file on CentOS uses this:
$SU -l postgres -c "$PGENGINE/initdb --pgdata='$PGDATA' --auth='ident sameuser'" >> "$PGLOG" 2>&1 < /dev/null
I placed the -i option right before the -c option and it wouldn't start at all.
What is the -i option supposed to be doing?
On Wed, Mar 31, 2010 at 4:02 PM, Wright, George <george.wright@mag-ias.com> wrote:
I was getting the same error on 8.3.5 on Suse – not sure if it applies.
I had to change a line in /etc/rc.d/postgresql (Note the –i before $OPTIONS)
pg_ctl start -s -w -p $H -D $DATADIR -o "\" $OPTIONS\""
to
pg_ctl start -s -w -p $H -D $DATADIR -o "\" -i $OPTIONS\""
From: pgsql-novice-owner@postgresql.org [mailto:pgsql-novice-owner@postgresql.org] On Behalf Of Jonathan Mast
Sent: Wednesday, March 31, 2010 3:32 PM
To: pgsql-novice@postgresql.org
Subject: Re: [NOVICE] Need Help Enabling Remote Connections
Thanks, but I'm not seeing anything new on the link.
here is my pg_hba.conf file:
host all all 192.168.1.0/24 trust
host all all 192.168.15.0/24 trust
I don't understand why this isn't working.
On Wed, Mar 31, 2010 at 3:14 PM, Luiz Eduardo Cantanhede Neri <lecneri@gmail.com> wrote:
http://www.postgresql.org/docs/8.2/interactive/auth-pg-hba-conf.html
On Wed, Mar 31, 2010 at 4:09 PM, Jonathan Mast <jhmast.developer@gmail.com> wrote:
I've just installed Postgresql Server 8.1.xx on Cent OS 5.4, the server's IP is 192.168.15.113
I added a db user (with super-user privileges) and edited pg_hba.conf to allow 192.168.15.0/24 and 192.168.1.0/24 (the remote subnet, where I'm trying to connect from).
I edited postgresql.conf to:
listen_addresses = '*'
port = 5432
max_connections = 100
But I cannot connect remotely, I get "Server doesn't Listen" from pgAdmin.
Any ideas?