title: pg_autofailover setup with password
body: <p>I have created the postgres with pg_auto failover on one primary and one secondary node .
  I am followed this link. <a href="https://www.citusdata.com/blog/2019/05/30/introducing-pg-auto-failover/" rel="nofollow noreferrer">https://www.citusdata.com/blog/2019/05/30/introducing-pg-auto-failover/</a> I tested the failover and Replication without --auth tag on monitor and postgres node. It works fine without any authurization.
  Here are the commands</p>
  <pre><code>    export PATH=&quot;$PATH:/usr/pgsql-11/bin&quot;
      pg_autoctl create monitor --nodename 10.247.74.66 --pgport 6000
      export PGDATA=/var/lib/pgsql/node_a
      pg_autoctl create postgres --nodename 10.247.74.66 --pgport 6001 --dbname test --monitor postgres://autoctl_node@10.247.74.66:6000/pg_auto_failover
      pg_autoctl run
  </code></pre>
  <p>2nd node</p>
  <pre><code>export PATH=&quot;$PATH:/usr/pgsql-11/bin&quot;
  export PGDATA=/var/lib/pgsql/node_b
  pg_autoctl create postgres --nodename 10.247.74.67 --pgport 6002 --dbname test --monitor postgres://autoctl_node@10.247.74.66:6000/pg_auto_failover
  pg_autoctl run
  
  pg_autoctl show state
  
  
          Name |   Port | Group |  Node |     Current State |    Assigned State
  -------------+--------+-------+-------+-------------------+------------------
  10.247.74.66 |   6001 |     0 |     1 |           primary |           primary
  10.247.74.67 |   6002 |     0 |     2 |         secondary |         secondary
  </code></pre>
  <p>I added the autherization on monitor node as --auth md5 and altered the password of autoctl_node of pg_auto_failover database following this link <a href="https://pg-auto-failover.readthedocs.io/en/latest/security.html" rel="nofollow noreferrer">https://pg-auto-failover.readthedocs.io/en/latest/security.html</a> Monitor node also works fine. But when I added --auth md5 in primary node_a and node_b , nodes are stucked in waiting and catching up.</p>
  <pre><code>    export PGDATA=/var/lib/pgsql/monitor
      pg_autoctl create monitor --auth md5 --nodename 10.247.74.66 --pgport 6000
      export PGDATA=/var/lib/pgsql/node_a
      pg_autoctl create postgres --auth md5 --nodename 10.247.74.66 --pgport 6001 --dbname test --monitor postgres://autoctl_node:BMGAAES123z3RZ5ZSwq@10.247.74.66:6000/pg_auto_failover
      pg_autoctl config set replication.password ZUp3aEAy123BEmTb44A
      pg_autoctl run
  
      export PGPASSWORD=ZUp3aEAy123BEmTb44A
      export PGDATA=/var/lib/pgsql/node_b
      pg_autoctl create postgres --auth md5 --nodename 10.247.74.67 --pgport 6002 --dbname test --monitor postgres://autoctl_node:BMGAAES123z3RZ5ZSwq@10.247.74.66:6000/pg_auto_failover
      pg_autoctl config set replication.password ZUp3aEAy123BEmTb44A
      pg_autoctl run
  
          Name |   Port | Group |  Node |     Current State |    Assigned State
  -------------+--------+-------+-------+-------------------+------------------
  10.247.74.66 |   6001 |     0 |     1 |      wait_primary |      wait_primary
  10.247.74.67 |   6002 |     0 |     2 |        catchingup |        catchingup
  </code></pre>
  <p>Logs of primary node_a</p>
  <pre><code>2021-04-02 19:06:32.028 IST [19588] LOG:  connection received: host=10.247.74.66 port=52598
  2021-04-02 19:06:32.031 IST [19588] FATAL:  password authentication failed for user &quot;pgautofailover_monitor&quot;
  2021-04-02 19:06:32.031 IST [19588] DETAIL:  User &quot;pgautofailover_monitor&quot; has no password assigned.
          Connection matched pg_hba.conf line 95: &quot;host all &quot;pgautofailover_monitor&quot; 10.247.74.66/32 md5 # Auto-generated by pg_auto_failover&quot;
  2021-04-02 19:06:34.034 IST [19609] LOG:  connection received: host=10.247.74.66 port=52618
  2021-04-02 19:06:34.036 IST [19609] FATAL:  password authentication failed for user &quot;pgautofailover_monitor&quot;
  2021-04-02 19:06:34.036 IST [19609] DETAIL:  User &quot;pgautofailover_monitor&quot; has no password assigned.
          Connection matched pg_hba.conf line 95: &quot;host all &quot;pgautofailover_monitor&quot; 10.247.74.66/32 md5 # Auto-generated by pg_auto_failover&quot;
  2021-04-02 19:06:36.041 IST [19626] LOG:  connection received: host=10.247.74.66 port=52628
  2021-04-02 19:06:36.043 IST [19626] FATAL:  password authentication failed for user &quot;pgautofailover_monitor&quot;
  2021-04-02 19:06:36.043 IST [19626] DETAIL:  User &quot;pgautofailover_monitor&quot; has no password assigned.
          Connection matched pg_hba.conf line 95: &quot;host all &quot;pgautofailover_monitor&quot; 10.247.74.66/32 md5 # Auto-generated by pg_auto_failover&quot;
  </code></pre>
  <p>Logs of Secondary node_b</p>
  <pre><code>2021-04-02 19:08:32.099 IST [8755] LOG:  connection received: host=10.247.74.66 port=41682
  2021-04-02 19:08:32.101 IST [8755] FATAL:  password authentication failed for user &quot;pgautofailover_monitor&quot;
  2021-04-02 19:08:32.101 IST [8755] DETAIL:  User &quot;pgautofailover_monitor&quot; has no password assigned.
          Connection matched pg_hba.conf line 95: &quot;host all &quot;pgautofailover_monitor&quot; 10.247.74.66/32 md5 # Auto-generated by pg_auto_failover&quot;
  2021-04-02 19:08:34.105 IST [8758] LOG:  connection received: host=10.247.74.66 port=41732
  2021-04-02 19:08:34.107 IST [8758] FATAL:  password authentication failed for user &quot;pgautofailover_monitor&quot;
  2021-04-02 19:08:34.107 IST [8758] DETAIL:  User &quot;pgautofailover_monitor&quot; has no password assigned.
          Connection matched pg_hba.conf line 95: &quot;host all &quot;pgautofailover_monitor&quot; 10.247.74.66/32 md5 # Auto-generated by pg_auto_failover&quot;
  2021-04-02 19:08:36.111 IST [8760] LOG:  connection received: host=10.247.74.66 port=41762
  2021-04-02 19:08:36.115 IST [8760] FATAL:  password authentication failed for user &quot;pgautofailover_monitor&quot;
  2021-04-02 19:08:36.115 IST [8760] DETAIL:  User &quot;pgautofailover_monitor&quot; has no password assigned.
          Connection matched pg_hba.conf line 95: &quot;host all &quot;pgautofailover_monitor&quot; 10.247.74.66/32 md5 # Auto-generated by pg_auto_failover&quot;
  </code></pre>