The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

PostgreSQL Error

Discussion in 'General Discussion' started by PIS, Jul 2, 2011.

  1. PIS

    PIS Member

    Joined:
    Jul 2, 2011
    Messages:
    21
    Likes Received:
    0
    Trophy Points:
    1
    Hi,

    I have installed PostgreSQL recent version.
    Now, when cron runs, i get mail

    Subject: Cron <root@cpone> /usr/bin/test -x /usr/local/cpanel/scripts/update_db_cache && /usr/local/cpanel/scripts/update_db_cache

    Message: psql: FATAL: password authentication failed for user "postgres"


    How can i correct this error?
     
  2. Bdzzld

    Bdzzld Well-Known Member

    Joined:
    Apr 3, 2004
    Messages:
    356
    Likes Received:
    1
    Trophy Points:
    18
    Have you already set a new root password for your database server ?
     
  3. PIS

    PIS Member

    Joined:
    Jul 2, 2011
    Messages:
    21
    Likes Received:
    0
    Trophy Points:
    1
    Yes, of course
     
  4. Bdzzld

    Bdzzld Well-Known Member

    Joined:
    Apr 3, 2004
    Messages:
    356
    Likes Received:
    1
    Trophy Points:
    18
    If so, how did you set it? Did you set it via WHM? If not, please try to do it.
     
  5. PIS

    PIS Member

    Joined:
    Jul 2, 2011
    Messages:
    21
    Likes Received:
    0
    Trophy Points:
    1
    Of course i set it via WHM.

    I've reset it again, and now i'm waiting if ...
     
  6. PIS

    PIS Member

    Joined:
    Jul 2, 2011
    Messages:
    21
    Likes Received:
    0
    Trophy Points:
    1
    Can anyone help? :(
     
  7. Bdzzld

    Bdzzld Well-Known Member

    Joined:
    Apr 3, 2004
    Messages:
    356
    Likes Received:
    1
    Trophy Points:
    18
  8. Bdzzld

    Bdzzld Well-Known Member

    Joined:
    Apr 3, 2004
    Messages:
    356
    Likes Received:
    1
    Trophy Points:
    18
    Please also check your password for irregularaties, which may cause it not to be set correctly in both environments.
     
  9. PIS

    PIS Member

    Joined:
    Jul 2, 2011
    Messages:
    21
    Likes Received:
    0
    Trophy Points:
    1
    Bdzzld
    Thanks for reply
     
  10. PIS

    PIS Member

    Joined:
    Jul 2, 2011
    Messages:
    21
    Likes Received:
    0
    Trophy Points:
    1
    I've ReSolved :)
     
  11. Bdzzld

    Bdzzld Well-Known Member

    Joined:
    Apr 3, 2004
    Messages:
    356
    Likes Received:
    1
    Trophy Points:
    18
    Good to hear. If you post what appeared to be the problem or what was done to resolve it, it may be helpfull to others as well.
     
  12. PIS

    PIS Member

    Joined:
    Jul 2, 2011
    Messages:
    21
    Likes Received:
    0
    Trophy Points:
    1
    I've changed pass once again.
     
  13. 000

    000 Well-Known Member

    Joined:
    Jun 3, 2008
    Messages:
    150
    Likes Received:
    0
    Trophy Points:
    16
    I chang pass more of 20 times and forever:

    root@282968 [~]# /scripts/update_db_cache
    psql: FATAL: password authentication failed for user "postgres"
    password retrieved from file "/root/.pgpass"
    root@282968 [~]#

    Any help please?
     
  14. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    So, just to confirm, you set the password in WHM > SQL Services > Postgres Config area?

    Also, have you setup the configuration file in that same area using the "Install Config" button?

    If both of the above are not done, then you likely aren't going to be able to connect.
     
  15. 000

    000 Well-Known Member

    Joined:
    Jun 3, 2008
    Messages:
    150
    Likes Received:
    0
    Trophy Points:
    16
    Sure!

    I have OLD VPS where all run fine, included PgSQL.

    But now I have new VPS and in this PgSQL = wrong...

    I descovery this:

    OLD VPS: /var/lib/pgsql/data/global/pg_auth = EXISTS
    NEW VPS: /var/lib/pgsql/data/global/pg_auth = NO EXISTS !!!

    Who cfreate the file {/var/lib/pgsql/data/global/pg_auth} ??, WHEN ?

    Ouch!!, this file = PASSORD OF USERS !!!
    Included user postgres !!!

    Surely this is my error.

    How I can repair ?

    (CentOs 6.2)
     
  16. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Hello 000,

    For /var/lib/pgsql/data/global/pg_auth file, it exists on my VPS where I just installed postgres using /scripts/installpostgres command. How did you install postgres on your machine and how did you copy over data to your machine for the accounts?

    Next, the /var/lib/pgsql/data/global/pg_auth file is used by cPanel with md5-based hash passwords. Here's an example from my machine:

    Code:
    root@host [/var/lib/pgsql/data/global]# cat pg_auth 
    "postgres" "md5c4ec416e741734a92b72db10d974264d" ""
    Tell me, what is the plain text password for that? If you can decrypt that password, then I'll be extremely surprised.

    Finally, if we can avoid adding all capitals into posts, it would be easier for me to read the post.

    Thanks!
     
  17. 000

    000 Well-Known Member

    Joined:
    Jun 3, 2008
    Messages:
    150
    Likes Received:
    0
    Trophy Points:
    16
    I install with instructions taked from postgresql.org
     
  18. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Hello 000,

    Under cPanel, the only supported method for installing PostgreSQL is to use /scripts/installpostgres so, if you haven't used that method, please run this command to install a supported copy:

    Code:
    /scripts/installpostgres --force
    Otherwise, certainly feel free to open up a ticket with us using the link in my signature to have us properly install it using that command for you.

    Thanks!
     
Loading...

Share This Page