1 (edited by cygni 2013-09-29 19:19:20)

Topic: iRedMail installer sets postgres listening port to localhost

==== Required information ====
- iRedMail version:
- Store mail accounts in which backend (LDAP/MySQL/PGSQL):
- Linux/BSD distribution name and version:
- Related log if you're reporting an issue:
====

iRedMail version 0.8.5 installer for fresh Debian 7 install fails because it  changes 'postgresql.conf' listening port from "*" (all) to "localhost" which causes a connection issue. The database server will not start unless the listening port is set to "*" and this causes the installation to be unsuccessful because it cannot create necessary tables.

psql: could not connect to server: No such file or directory
        Is the server running locally and accepting
        connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
psql: could not connect to server: No such file or directory
        Is the server running locally and accepting
        connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
< INFO > Configure Postfix (Message Transfer Agent).
< INFO > Configure Policyd (postfix policy server, code name cluebringer).
psql: could not connect to server: No such file or directory
        Is the server running locally and accepting
        connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
< INFO > Configure Dovecot (pop3/imap/managesieve server, version 2).
< INFO > Configure ClamAV (anti-virus toolkit).
< INFO > Configure Amavisd-new (interface between MTA and content checkers).
psql: could not connect to server: No such file or directory
        Is the server running locally and accepting
        connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
< INFO > Configure SpamAssassin (content-based spam filter).
< INFO > Configure iRedAPD (postfix policy daemon).
< INFO > Configure iRedAdmin (official web-based admin panel).
psql: could not connect to server: No such file or directory
        Is the server running locally and accepting
        connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
< INFO > Configure Fail2ban (authentication failure monitor).
< INFO > Configure Awstats (logfile analyzer for mail and web server).
< INFO > Configure Roundcube webmail.
psql: could not connect to server: No such file or directory
        Is the server running locally and accepting
        connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
< INFO > Configure phpPgAdmin (web-based PostgreSQL management tool).

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: iRedMail installer sets postgres listening port to localhost

It works for me here, Debian 7, amd64, iRedMail with PostgreSQL backend.
Any related log or message while starting PostgreSQL manually after iRedMail installation?

3 (edited by cygni 2013-09-30 00:48:47)

Re: iRedMail installer sets postgres listening port to localhost

ZhangHuangbin wrote:

It works for me here, Debian 7, amd64, iRedMail with PostgreSQL backend.
Any related log or message while starting PostgreSQL manually after iRedMail installation?

Well, what is happening is when it gets to the point where it configures postgres, it changes the listening address to 'localhost', and without the listening address set to '*', postgres server fails to start:


Starting PostgreSQL 9.1 database server: mainThe PostgreSQL server failed to start. Please check the log output: 2013-09-29 11:56:03 EDT LOG: could not bind IPv4 socket: Cannot assign requested address 2013-09-29 11:56:03 EDT HINT: Is another postmaster already running on port 5432? If not, wait a few seconds and retry. 2013-09-29 11:56:03 EDT LOG: could not bind IPv6 socket: Cannot assign requested address 2013-09-29 11:56:03 EDT HINT: Is another postmaster already running on port 5432? If not, wait a few seconds and retry. 2013-09-29 11:56:03 EDT WARNING: could not create listen socket for "localhost" 2013-09-29 11:56:03 EDT FATAL: could not create any TCP/IP sockets ... failed!
failed!

I can start postgres server just fine with listening port is set to all.

4

Re: iRedMail installer sets postgres listening port to localhost

Solved!

The issue was, 'iface lo inet loopback' was missing from '/etc/network/interfaces'

Thanks!