PostgreSQL install failure - Please help

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
User avatar
gshergill
Posts: 231
Joined: Tue Aug 07, 2012 5:08 am

Re: PostgreSQL install failure - Please help

Post by gshergill »

Hi yancy,

By "starting the service again" you mean attempt the installation again?

Sorry am a bit confused don't want to mess anything up.

Kind Regards,

gshergill
yancy
Posts: 523
Joined: Thu Oct 06, 2011 10:12 am

Re: PostgreSQL install failure - Please help

Post by yancy »

gshergill,

Yes, please test running the Nagios installation again.


Regards,

-Yancy
User avatar
gshergill
Posts: 231
Joined: Tue Aug 07, 2012 5:08 am

Re: PostgreSQL install failure - Please help

Post by gshergill »

Hi yancy,

If you meant to run the install command again,

Code: Select all

./fullinstall
I tried that and still the same error.

Restored to before my first attempt at installation (so a fresh CentOS system) and ran the commands;

Code: Select all

restorecon /etc/nsswitch.conf
./fullinstall
That didn't work either.

No luck as of yet unfortunately.

Kind Regards,

gshergill
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: PostgreSQL install failure - Please help

Post by scottwilkerson »

Can you run the following to see what the problem might be with postgresql

Code: Select all

tail -f /var/lib/pgsql/pgstartup.log
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
User avatar
gshergill
Posts: 231
Joined: Tue Aug 07, 2012 5:08 am

Re: PostgreSQL install failure - Please help

Post by gshergill »

Hi scottwilkerson,

The following is the command and the output;

Code: Select all

tail -f /var/lib/pgsql/pgstartup.log
FATAL:  could not create any TCP/IP sockets
LOG:  could not translate host name "localhost", service "5432" to address: Name or service not known
WARNING:  could not create listen socket for "localhost"
FATAL:  could not create any TCP/IP sockets
LOG:  could not translate host name "localhost", service "5432" to address: Name or service not known
WARNING:  could not create listen socket for "localhost"
FATAL:  could not create any TCP/IP sockets
LOG:  could not translate host name "localhost", service "5432" to address: Name or service not known
WARNING:  could not create listen socket for "localhost"
FATAL:  could not create any TCP/IP sockets
The /etc/hosts file has the following;

Code: Select all

cat /etc/hosts
127.0.0.1		nagiosxi.<domain>   nagiosxi
::1		localhost6.localdomain6   localhost6
The 127.0.0.1 line I edited, the 2nd line was already there.

Hope this helps.

Thank you.

Kind Regards,

gshergill
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: PostgreSQL install failure - Please help

Post by lmiltchev »

You must have "localhost" on the line that starts with 127.0.0.1. For example you should have something like this:

Code: Select all

127.0.0.1               localhost.localdomain localhost
Hope this helps.
Be sure to check out our Knowledgebase for helpful articles and solutions!
yancy
Posts: 523
Joined: Thu Oct 06, 2011 10:12 am

Re: PostgreSQL install failure - Please help

Post by yancy »

gshergill,

If your still having issues, also check your selinux status

Code: Select all

 sestatus 
if selinux is enabled, try disabling it to test.

Regards,

-Yancy
User avatar
gshergill
Posts: 231
Joined: Tue Aug 07, 2012 5:08 am

Re: PostgreSQL install failure - Please help

Post by gshergill »

Hi guys,

Thanks lmiltchev, changing that line worked great.

The reason I changed it was to stop the error;

Code: Select all

httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
didn't realise it would effect the PostgreSQL installation.

Just wondering but how do I stop that from occurring? I use to get the same on other VM's with Apache2, changing 127.0.0.1 normally stopped it.

Hi yancy, the following is the result of the code;

Code: Select all

sestatus
SELinux status:                 enabled
SELinuxfs mount:                /selinux
Current mode:                   permissive
Mode from config file:          disabled
Policy version:                 24
Policy from config file:        targeted
Thanks again for the support.

Kind Regards,

gshergill
Last edited by gshergill on Tue Aug 14, 2012 7:00 am, edited 1 time in total.
Locked