Page 2 of 2

Re: PostgreSQL install failure - Please help

Posted: Mon Aug 13, 2012 9:56 am
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

Re: PostgreSQL install failure - Please help

Posted: Mon Aug 13, 2012 10:11 am
by yancy
gshergill,

Yes, please test running the Nagios installation again.


Regards,

-Yancy

Re: PostgreSQL install failure - Please help

Posted: Mon Aug 13, 2012 10:11 am
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

Re: PostgreSQL install failure - Please help

Posted: Mon Aug 13, 2012 11:16 am
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

Re: PostgreSQL install failure - Please help

Posted: Mon Aug 13, 2012 11:22 am
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

Re: PostgreSQL install failure - Please help

Posted: Mon Aug 13, 2012 1:45 pm
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.

Re: PostgreSQL install failure - Please help

Posted: Mon Aug 13, 2012 4:33 pm
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

Re: PostgreSQL install failure - Please help

Posted: Tue Aug 14, 2012 3:40 am
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