Failed to find pg_ctl errror

Comments

9 comments

  • Official comment
    Avatar
    Sebastian Insausti

    Hi Fabio,
    It looks like ClusterControl can't find the pg_ctl command.

    Please, can you try to run the following command from your ClusterControl server to the PostgreSQL server?

    $ time ssh -i /path/to/key user@hostname "sudo -n env" 
    or 
    $ time ssh -i /path/to/key user@hostname "echo SUDOPASS| sudo -S env"
    (If you have a password for sudo user)

    Where /path/to/key is the path for the SSH key, user is the username in the OS, and hostname is the PostgreSQL hostname. If you have a password for sudo, you need to replace SUDOPASS for the corresponding sudo password.

    In the env output, please, check if you can find the pg_ctl path in the PATH variable.

    If you prefer, you can create a support request here:  https://severalnines.zendesk.com/hc/en-us/requests/new

    And we can continue checking this issue there.

    Regards,

    Sebastian.

    Comment actions Permalink
  • Avatar
    Duncan Kabue Mwangi

    Hi Adam,

    Most likely you're using a user whose path doesn't include the pg_ctl path. You can try to add the pg_ctl path there and try again:

    $ vi ~/.bashrc
    $ export PATH=/usr/lib/ppstgresql/0/bin:$PATH
    $ source ~/.bashrc

    Please, let me know how it goes.

    Regards,
    Duncan.

    -1
    Comment actions Permalink
  • Avatar
    Adam Paul

    Hello,

    I'm still getting the same error

    from export -p

    declare -x PATH="/usr/pgsql-13/bin:/usr/lib/ppstgresql/0/bin:/home/general/.local/bin:/home/general/bin:/bin"

    And still getting the error from cluster control deploy job:

    [09:15:41]:
    Could not find postgresql tool binary 'pg_ctl'.
    Investigated paths were :
    /usr/lib/postgresql/0/bin/pg_ctl,/usr/lib/postgresql/0.0/bin/pg_ctl,/usr/pgsql-0/bin/pg_ctl,/usr/pgsql-0.0/bin/pg_ctl,/usr/bin/pg_ctl,/usr/local/bin/pg_ctl,/usr/sbin/pg_ctl,/usr/local/sbin/pg_ctl

    pg_ctl is confirmed in /usr/pgsql-13/bin

    0
    Comment actions Permalink
  • Avatar
    Adam Paul

    Hello,

    Just updating this. I tried with the latest version version of cluster control targeting a fresh Rocky VM, with postgres 14 and I'm still getting the same error:

    •  [12:46:49]:
      192.168.48.22:5432: Failed to find pg_ctl binary.
    •  [12:46:49]:
      Could not find postgresql tool binary 'pg_ctl'.
      Investigated paths were :
      /usr/lib/postgresql/0/bin/pg_ctl,/usr/lib/postgresql/0.0/bin/pg_ctl,/usr/pgsql-0/bin/pg_ctl,/usr/pgsql-0.0/bin/pg_ctl,/usr/bin/pg_ctl,/usr/local/bin/pg_ctl,/usr/sbin/pg_ctl,/usr/local/sbin/pg_ctl

    Is there some install script that's not updating the version number? /usr/pgsql-0/bin/pg_ctl would be correct if the "0" was a "14".

    # cd /usr/pgsql-14/bin/
    # ls
    clusterdb oid2name pg_config pg_receivewal pg_test_timing postgresql-14-setup
    createdb pg_amcheck pg_controldata pg_recvlogical pg_upgrade postmaster
    createuser pg_archivecleanup pg_ctl pg_resetwal pg_verifybackup psql
    dropdb pg_basebackup pg_dump pg_restore pg_waldump reindexdb
    dropuser pgbench pg_dumpall pg_rewind postgres vacuumdb
    initdb pg_checksums pg_isready pg_test_fsync postgresql-14-check-db-dir vacuumlo

    Thanks,

    0
    Comment actions Permalink
  • Avatar
    Duncan Kabue Mwangi

    Hi Adam,

    If possible, kindly create a support request at the following link:  https://severalnines.zendesk.com/hc/en-us/requests/new

    You could also generate the error report from ClusterControl: choose the cluster > Logs > Error Reports > Create Error Report and attach the tarball to the ticket.

    So we can follow this issue there.

    Regards,
    Duncan.

    0
    Comment actions Permalink
  • Avatar
    Fabio Palladino

    I have same problem with  PostgreSQL 11, 12, 13 it's same.

    Do you find a solutions?

    Thanks in advance

    Fabio

     

    0
    Comment actions Permalink
  • Avatar
    Adam Paul

    Hello,

    This issue ended up being an internal firewall that was blocking postgres (port 5432)  Make sure both the OS and any other firewalls are allowing access over that port.

    Cheers, 

    0
    Comment actions Permalink
  • Avatar
    Fabio Palladino

    No, I don't think the firewall is stopped.

    The problem is "Could not find postgresql tool binary 'pg_ctl'." how missing PATH in enviroment variable is connect with firewall

     

    0
    Comment actions Permalink
  • Avatar
    Fabio Palladino

    I created a support request.

    Thanks

    0
    Comment actions Permalink

Please sign in to leave a comment.

Powered by Zendesk