Ask Your Question
4

puppet-enterprise-installer failes with DB startup failure

asked 2013-07-12 08:13:57 -0500

kbrashier gravatar image

Running the puppet-enterprise-installer supplied with 3.0.0. Runs fine until just after "PostgreSQL server configured"

I get the following:

!! ERROR: The PostgreSQL server failed to start; unable to proceed

ps -ef | grep postgres shows the appropriate postgres apps (logger,checkpointer,wal,etc) are running

The #port configured is not enabled in postgresql.conf. I am unable to psql directly into the DB as no port is active.

also - IPtables is not running

I have tried this one 3 different machines with the same results, any ideas.

edit retag flag offensive close merge delete

Comments

Please post the complete output from the installation script, including all of the answers chosen during the process. It would be best to do this on a clean system.

GregLarkin gravatar imageGregLarkin ( 2013-07-16 11:18:29 -0500 )edit

Another question for you - if you manually update the postgresql.conf file to configure the listening port, can you start psql successfully?

GregLarkin gravatar imageGregLarkin ( 2013-07-17 08:41:12 -0500 )edit

What do you see if you run `service pe-postgresql start` from the CLI?

cprice404 gravatar imagecprice404 ( 2013-07-17 09:17:01 -0500 )edit

Tail end of installation script pe-rubygem-trollop.noarch 0:1.16.2-2.pe.el6 pe-tanukiwrapper.x86_64 0:3.5.9-8.pe.el6 Dependency Installed: pe-ruby-mysql.x86_64 0:2.8.2-1.pe ...(more)

kbrashier gravatar imagekbrashier ( 2013-07-18 15:22:28 -0500 )edit

12 Answers

Sort by » oldest newest most voted
1

answered 2014-09-26 12:37:45 -0500

smathan gravatar image

After spending sometime on troubleshooting, I was able to solve this issue on PE 3.3 with CentOS 6.5 env. Postgresql DB is unable to start if the IP is not resolved and/or if the IP is NAT. Symptom: " LOG: could not bind IPv4 socket: Cannot assign requested address HINT: Is another postmaster already running on port 5432? If not, wait a few seconds and retry. WARNING: could not create listen socket for... FATAL: could not create any TCP/IP sockets " Two key things.

  1. As said earlier,. Add the FQDN to /etc/hosts.
  2. In case you are using openstack or alternate cloud VM, ensure the IPs that's resolving is not NAT'ed. It should be local IP.
edit flag offensive delete link more
1

answered 2014-08-14 08:25:17 -0500

despairblue gravatar image

updated 2014-08-25 05:31:15 -0500

I think I found the problem. It seems that puppet uses the FQDN as the listen address for the postgresql server, which will fail if the machine is behind a load balancer to which the FQDN resolves. Fix: Add the FQDN to /etc/hosts. A fix that does not seem to be documented.

edit flag offensive delete link more
1

answered 2013-07-23 13:25:23 -0500

bucksfan1991 gravatar image

I figured out that I had postgresql loaded and running. I removed postgresql and did an uninstall and install and it worked.

edit flag offensive delete link more

Comments

Removing all postgresql packages (postgresql-libs.x86_64 and postgresql-libs.x86_64 in my case ) *before* running the installer worked for me. Uninstall and install didn't work on my system.

umeditor gravatar imageumeditor ( 2013-07-25 11:09:41 -0500 )edit
0

answered 2014-08-14 07:55:43 -0500

despairblue gravatar image

Same problem with puppet-enterprise-3.3.1-ubuntu-14.04-amd64.

Installation stops with

Setting up pe-rubycas-server (1.1.17.3-1puppet1) ... Processing triggers for libc-bin (2.19-0ubuntu6) ... Setting up puppet master... Checking the agent certificate name detection... Setting up the database... Configuring postgresql server... PostgreSQL server configured. !! ERROR: The PostgreSQL server failed to start; unable to proceed

(I had to remove the hashes from the output since the markdown interpreter this website uses tries to interpret markdown inside of quotes and code blocks)

And pgstartup.log says:

LOG: could not bind IPv4 socket: Cannot assign requested address HINT: Is another postmaster already running on port 5432? If not, wait a few seconds and retry. WARNING: could not create listen socket for "xxxx.cloudapp.net" FATAL: could not create any TCP/IP sockets

It's a freshly provisioned ubuntu 14.04 with nothing done to it except downloading opening ports 3000 and 5432, downloading pe installer and running the installer. There is no other service listening on port 5432.

edit flag offensive delete link more
0

answered 2013-07-18 15:24:37 -0500

kbrashier gravatar image

updated 2013-07-25 13:50:33 -0500

Found the problem after all. If you have postgres installed on the box it will fail.

My solution was to 'yum remove postgres*' and puppet installed error free

edit flag offensive delete link more

Comments

Ok, it's possible that you didn't have all necessary dependencies already installed on your system, and that setting controls whether they can be installed from the OS vendor ...(more)

GregLarkin gravatar imageGregLarkin ( 2013-07-18 15:34:55 -0500 )edit

q_vendor_packages_install Y or N — Whether the installer has permission to install additional packages from the OS’s repositories. If this is set to N, the installation will fail if the ...(more)

GregLarkin gravatar imageGregLarkin ( 2013-07-18 15:35:01 -0500 )edit

Pardon my ignorance here, but how do I change this value? Do I just edit the answers file? I didn't notice it asking me about that during the install itself.

soehlert gravatar imagesoehlert ( 2013-07-24 11:54:01 -0500 )edit

Here is the page about using the answers file for an automated install: http://docs.puppetlabs.com/pe/latest/install_automated.html and the answers file reference, too: http://docs.puppetlabs ...(more)

GregLarkin gravatar imageGregLarkin ( 2013-07-24 14:56:39 -0500 )edit
0

answered 2013-07-18 16:13:49 -0500

rhondak gravatar image

Same problem here. I've uninstalled and re-installed, same result. It ends with:

Complete!

## Setting up puppet master...
## Checking the agent certificate name detection...
## Setting up puppet agent...
## Setting up the database...
Configuring postgresql server...
PostgreSQL server configured.
!! ERROR: The PostgreSQL server failed to start; unable to proceed

Here's my postgresql.conf file (comments mostly removed):

max_connections = 100                   # (change requires restart)

shared_buffers = 32MB                   # min 128kB

log_destination = 'stderr'              # Valid values are combinations of

logging_collector = on                  # Enable capturing of stderr and csvlog

log_directory = 'pg_log'                # directory where log files are written,
log_filename = 'postgresql-%a.log'      # log file name pattern,
log_truncate_on_rotation = on           # If ...
(more)
edit flag offensive delete link more

Comments

Sorry, I should have mentioned that this is a newly formatted RHEL 6.4 x86_64 system. iptables are not running. Here's the status of various processes: # service pe-httpd status ...(more)

rhondak gravatar imagerhondak ( 2013-07-18 16:21:57 -0500 )edit
0

answered 2013-07-17 08:18:48 -0500

bucksfan1991 gravatar image

I have the same problem on a Redhat 6.3 x8664 box. Below are the installlog and answer file. ###################################################

** locale -a | grep -E -q -i 'en_US.UTF.?8'

* set | grep -E -q '^q_.database.*$'

** mkdir -p /etc/puppetlabs/installer

** touch /etc/puppetlabs/installer/database_info.install

** chmod 600 /etc/puppetlabs/installer/database_info.install

** mkdir -p /etc/puppetlabs/installer

** touch /etc/puppetlabs/installer/answers.install

** chmod 600 /etc/puppetlabs/installer/answers.install

* sed "s/^(q_.password)=.*/#\1=REDACTED/g" < ${ANSWERFILETO_SAVE?} > "/etc/puppetlabs/installer/answers.install"

** mkdir -p /opt/puppet && chown root:root /opt/puppet && chmod 755 /opt/puppet ... (more)

edit flag offensive delete link more

Comments

Can you post the contents of postgresql.conf as well? Also, I don't see the error message reported by the OP in the output you posted above?

GregLarkin gravatar imageGregLarkin ( 2013-07-17 08:43:18 -0500 )edit
0

answered 2013-07-30 04:52:41 -0500

raittes gravatar image

updated 2013-07-30 04:55:46 -0500

If you have failed installing Puppet before, to succeed you must first completely uninstall Puppet:

./puppet-enterprise-uninstaller
rm -Rf /etc/puppetlabs/
rm -Rf /opt/puppet/

Then check if postgress still remains (and if so, uninstall it)

rpm -qa | grep postgres
yum remove pe-postgres*

And finally, reinstall Puppet, that now must succeed!

./puppet-enterprise-installer
edit flag offensive delete link more
0

answered 2013-12-02 10:53:15 -0500

AndyMc gravatar image

Also check all mount points. The installation script runs scripts /var/opt to configure the DB, which on our systems has noexec configured.

edit flag offensive delete link more
0

answered 2014-03-24 17:50:22 -0500

djsd123 gravatar image

The first thing you should do is check the logs... Namely the /var/log/pe-postgresql/pgstartup.log It will usually tell you exactly what the problem is. In my case the answer file had an invalid hostname answer to q_datbase_host=localhost When it should have been q_datbase_host=my_server.my_domain.com Note: You should always use the fqdn.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

5 followers

Stats

Asked: 2013-07-12 08:13:57 -0500

Seen: 2,798 times

Last updated: Aug 14 '14