invalid connection type "listen_addresses='*'

Started by Aram Fingalover 11 years ago7 messagesgeneral
Jump to latest
#1Aram Fingal
fingal@multifactorial.com

I just tried to set up a PostgreSQL server on an existing instillation of Ubuntu 13.10 server but I am getting an error trying to start the server and I am not finding anything relevant to the error searching the web.

Here’s what I did to install:

$ sudo apt-get install postgresql
$ sudo apt-get install postgresql-contrib

I set a password for the postgres user and edited the pg_hba.conf file as follows:

<skipping a bunch of comments>

# Put your actual configuration here
# ----------------------------------
#
# If you want to allow non-local connections, you need to add more
# "host" records. In that case you will also need to make PostgreSQL
# listen on a non-local interface via the listen_addresses
# configuration parameter, or via the -i or -h command line switches.

listen_addresses='*'

# DO NOT DISABLE!
# If you change this first entry you will need to make sure that the
# database superuser can access the database using some other method.
# Noninteractive access to all databases is required during automatic
# maintenance (custom daily cronjobs, replication, and similar tasks).
#
# Database administrative login by Unix domain socket
local all postgres peer

# TYPE DATABASE USER ADDRESS METHOD

# "local" is for Unix domain socket connections only
local all all peer
# IPv4 local connections:
host all all 127.0.0.1/32 md5
host all all all md5

# IPv6 local connections:
host all all ::1/128 md5
# Allow replication connections from localhost, by a user with the
# replication privilege.
#local replication postgres peer
#host replication postgres 127.0.0.1/32 md5
#host replication postgres ::1/128 md5

Then I try to restart the server:

$ sudo /etc/init.d/postgresql restart
* Restarting PostgreSQL 9.1 database server * The PostgreSQL server failed to start. Please check the log output:
2014-07-10 16:34:39 EDT LOG: invalid connection type "listen_addresses='*'"
2014-07-10 16:34:39 EDT CONTEXT: line 75 of configuration file "/etc/postgresql/9.1/main/pg_hba.conf"
2014-07-10 16:34:39 EDT FATAL: could not load pg_hba.conf

#2Paul Jungwirth
pj@illuminatedcomputing.com
In reply to: Aram Fingal (#1)
Re: invalid connection type "listen_addresses='*'

listen_addresses='*'

I'm pretty sure that listen_addresses belongs in postgresql.conf, not
pg_hba.conf.

Paul

On Thu, Jul 10, 2014 at 1:40 PM, Aram Fingal <fingal@multifactorial.com> wrote:

I just tried to set up a PostgreSQL server on an existing instillation of Ubuntu 13.10 server but I am getting an error trying to start the server and I am not finding anything relevant to the error searching the web.

Here’s what I did to install:

$ sudo apt-get install postgresql
$ sudo apt-get install postgresql-contrib

I set a password for the postgres user and edited the pg_hba.conf file as follows:

<skipping a bunch of comments>

# Put your actual configuration here
# ----------------------------------
#
# If you want to allow non-local connections, you need to add more
# "host" records. In that case you will also need to make PostgreSQL
# listen on a non-local interface via the listen_addresses
# configuration parameter, or via the -i or -h command line switches.

listen_addresses='*'

# DO NOT DISABLE!
# If you change this first entry you will need to make sure that the
# database superuser can access the database using some other method.
# Noninteractive access to all databases is required during automatic
# maintenance (custom daily cronjobs, replication, and similar tasks).
#
# Database administrative login by Unix domain socket
local all postgres peer

# TYPE DATABASE USER ADDRESS METHOD

# "local" is for Unix domain socket connections only
local all all peer
# IPv4 local connections:
host all all 127.0.0.1/32 md5
host all all all md5

# IPv6 local connections:
host all all ::1/128 md5
# Allow replication connections from localhost, by a user with the
# replication privilege.
#local replication postgres peer
#host replication postgres 127.0.0.1/32 md5
#host replication postgres ::1/128 md5

Then I try to restart the server:

$ sudo /etc/init.d/postgresql restart
* Restarting PostgreSQL 9.1 database server * The PostgreSQL server failed to start. Please check the log output:
2014-07-10 16:34:39 EDT LOG: invalid connection type "listen_addresses='*'"
2014-07-10 16:34:39 EDT CONTEXT: line 75 of configuration file "/etc/postgresql/9.1/main/pg_hba.conf"
2014-07-10 16:34:39 EDT FATAL: could not load pg_hba.conf

--
_________________________________
Pulchritudo splendor veritatis.

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

#3Igor Neyman
ineyman@perceptron.com
In reply to: Aram Fingal (#1)
Re: invalid connection type "listen_addresses='*'

From: pgsql-general-owner@postgresql.org [mailto:pgsql-general-owner@postgresql.org] On Behalf Of Aram Fingal
Sent: Thursday, July 10, 2014 4:40 PM
To: Postgres-General General
Subject: [GENERAL] invalid connection type "listen_addresses='*'

I just tried to set up a PostgreSQL server on an existing instillation of Ubuntu 13.10 server but I am getting an error trying to start the server and I am not finding anything relevant to the error searching the web.

Here's what I did to install:

$ sudo apt-get install postgresql
$ sudo apt-get install postgresql-contrib

I set a password for the postgres user and edited the pg_hba.conf file as follows:

<skipping a bunch of comments>

# Put your actual configuration here
# ----------------------------------
#
# If you want to allow non-local connections, you need to add more
# "host" records.  In that case you will also need to make PostgreSQL
# listen on a non-local interface via the listen_addresses
# configuration parameter, or via the -i or -h command line switches.

listen_addresses='*'

# DO NOT DISABLE!
# If you change this first entry you will need to make sure that the
# database superuser can access the database using some other method.
# Noninteractive access to all databases is required during automatic
# maintenance (custom daily cronjobs, replication, and similar tasks).
#
# Database administrative login by Unix domain socket
local   all             postgres                                peer

# TYPE  DATABASE        USER            ADDRESS                 METHOD

# "local" is for Unix domain socket connections only
local   all             all                                     peer
# IPv4 local connections:
host    all             all             127.0.0.1/32            md5
host    all             all             all             md5

# IPv6 local connections:
host    all             all             ::1/128                 md5
# Allow replication connections from localhost, by a user with the
# replication privilege.
#local   replication     postgres                                peer
#host    replication     postgres        127.0.0.1/32            md5
#host    replication     postgres        ::1/128                 md5

Then I try to restart the server:

$ sudo /etc/init.d/postgresql restart
 * Restarting PostgreSQL 9.1 database server                                                                                                                                                 * The PostgreSQL server failed to start. Please check the log output:
2014-07-10 16:34:39 EDT LOG:  invalid connection type "listen_addresses='*'"
2014-07-10 16:34:39 EDT CONTEXT:  line 75 of configuration file "/etc/postgresql/9.1/main/pg_hba.conf"
2014-07-10 16:34:39 EDT FATAL:  could not load pg_hba.conf

Adam,

"listen_addresses='*'" parameter doesn't belong in pg_hba.conf

This parameter should be in postgresql.conf

Regards,
Igor Neyman

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

#4Aram Fingal
fingal@multifactorial.com
In reply to: Igor Neyman (#3)
Re: invalid connection type "listen_addresses='*'

"listen_addresses='*'" parameter doesn't belong in pg_hba.conf

This parameter should be in postgresql.conf

Thanks. That was really unclear, at least the way I followed the online documentation:

http://www.postgresql.org/docs/9.1/static/auth-pg-hba-conf.html

…even after following the link to the listen_addresses parameter.

-Aram

#5David G. Johnston
david.g.johnston@gmail.com
In reply to: Aram Fingal (#4)
Re: invalid connection type "listen_addresses='*'

Aram Fingal wrote

"listen_addresses='*'" parameter doesn't belong in pg_hba.conf

This parameter should be in postgresql.conf

Thanks. That was really unclear, at least the way I followed the online
documentation:

http://www.postgresql.org/docs/9.1/static/auth-pg-hba-conf.html

…even after following the link to the listen_addresses parameter.

It is non-specific since it is assumed at this point in the documentation
that you realize ALL "configuration parameters" are defined in postgres.conf
or its includes. The fact the comment is in a note, and links elsewhere,
implicitly reinforces that fact - if it belonged in the pg_hba.conf file its
description would be part of the normal document and not a sidebar.

Admittedly this is all perfectly clear when you actually understand
everything already. While the documentation may be unclear to you
unfortunately you are the only person in a long while to actually post the
complaint to the lists and so its hard to justify figuring out how to make
the documentation clearer. It is equally important not to be redundant,
verbose and/or repetitive. The occasional confusion making its way to the
list it preferred.

David J.

--
View this message in context: http://postgresql.1045698.n5.nabble.com/invalid-connection-type-listen-addresses-tp5811177p5811192.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

#6David G. Johnston
david.g.johnston@gmail.com
In reply to: David G. Johnston (#5)
Re: invalid connection type "listen_addresses='*'

David G Johnston wrote

Aram Fingal wrote

"listen_addresses='*'" parameter doesn't belong in pg_hba.conf

This parameter should be in postgresql.conf

Thanks. That was really unclear, at least the way I followed the online
documentation:

http://www.postgresql.org/docs/9.1/static/auth-pg-hba-conf.html

…even after following the link to the listen_addresses parameter.

It is non-specific since it is assumed at this point in the documentation
that you realize ALL "configuration parameters" are defined in
postgres.conf or its includes. The fact the comment is in a note, and
links elsewhere, implicitly reinforces that fact - if it belonged in the
pg_hba.conf file its description would be part of the normal document and
not a sidebar.

Admittedly this is all perfectly clear when you actually understand
everything already. While the documentation may be unclear to you
unfortunately you are the only person in a long while to actually post the
complaint to the lists and so its hard to justify figuring out how to make
the documentation clearer. It is equally important not to be redundant,
verbose and/or repetitive. The occasional confusion making its way to the
list it preferred.

All that said I would not be opposed to adding a parethetical to the note:

"[...] value for the listen_addresses configuration parameter (in
postgres.conf), since the default [...]"

since indeed the reader's mind is on the pg_hba.conf file and so easing the
context switch is an easy improvement.

David J.

--
View this message in context: http://postgresql.1045698.n5.nabble.com/invalid-connection-type-listen-addresses-tp5811177p5811194.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

#7Paul Jungwirth
pj@illuminatedcomputing.com
In reply to: David G. Johnston (#6)
Re: invalid connection type "listen_addresses='*'

It is non-specific since it is assumed at this point in the documentation
that you realize ALL "configuration parameters" are defined in
postgres.conf or its includes.

I think the comments in pg_hba.conf are a lot more misleading than the
online documentation, and are more likely to be read. They say:

# Put your actual configuration here
# ----------------------------------
#
# If you want to allow non-local connections, you need to add more
# "host" records. In that case you will also need to make PostgreSQL
# listen on a non-local interface via the listen_addresses
# configuration parameter, or via the -i or -h command line switches.

Followed by four blank lines, then some more comments and the default
settings. It really invites the user to fill in that blank space with
a listen_addresses line.

Paul

On Thu, Jul 10, 2014 at 3:25 PM, David G Johnston
<david.g.johnston@gmail.com> wrote:

David G Johnston wrote

Aram Fingal wrote

"listen_addresses='*'" parameter doesn't belong in pg_hba.conf

This parameter should be in postgresql.conf

Thanks. That was really unclear, at least the way I followed the online
documentation:

http://www.postgresql.org/docs/9.1/static/auth-pg-hba-conf.html

…even after following the link to the listen_addresses parameter.

It is non-specific since it is assumed at this point in the documentation
that you realize ALL "configuration parameters" are defined in
postgres.conf or its includes. The fact the comment is in a note, and
links elsewhere, implicitly reinforces that fact - if it belonged in the
pg_hba.conf file its description would be part of the normal document and
not a sidebar.

Admittedly this is all perfectly clear when you actually understand
everything already. While the documentation may be unclear to you
unfortunately you are the only person in a long while to actually post the
complaint to the lists and so its hard to justify figuring out how to make
the documentation clearer. It is equally important not to be redundant,
verbose and/or repetitive. The occasional confusion making its way to the
list it preferred.

All that said I would not be opposed to adding a parethetical to the note:

"[...] value for the listen_addresses configuration parameter (in
postgres.conf), since the default [...]"

since indeed the reader's mind is on the pg_hba.conf file and so easing the
context switch is an easy improvement.

David J.

--
View this message in context: http://postgresql.1045698.n5.nabble.com/invalid-connection-type-listen-addresses-tp5811177p5811194.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

--
_________________________________
Pulchritudo splendor veritatis.

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general