<div dir="ltr">Hi,<div><br></div><div>I&#39;m trying to do online recovery with master/slave replication and I&#39;m basically copying <a href="http://www.pgpool.net/docs/latest/pgpool-en.html#master_slave_mode">http://www.pgpool.net/docs/latest/pgpool-en.html#master_slave_mode</a> but I can&#39;t figure out how the users work and seem to be getting a &quot;host key verification failed&quot; issue.</div>
<div><br></div><div>Following the steps I setup the recovery_user and recovery_password for this I used the postgresql user &quot;postgres&quot; which I set a password for in the database and not the ubuntu user which seems to work, is this correct ?</div>
<div><br></div><div>It then says you need to be able to ssh from the primary to the standby which I assume uses the user postgres. I have ssh keys setup so I can connect from the primary to the standby like so: </div><div>
ssh standby as user postres works fine.</div><div><br></div><div>I have created the basebackup.sh file however I&#39;m not sure why this line uses localhost shouldn&#39;t it be $desthost ?</div><div>ssh -T localhost mv $destdir/recovery.done $destdir/recovery.conf<br>
</div><div><br></div><div>I have installed pgpool-recovery and updated pgpool_remote_start to use /usr/lib/postgresql/9.1/bin/ instead of /usr/local/pgsql/bin/pg_ctl</div><div><br></div><div><br></div><div>now when I run pcp_recovery_node like so this is my pgpool console debug output<br>
</div><div><br></div><div><div>pcp_recovery_node -d 10 localhost 9898 postgres postgres 1</div><div><div>DEBUG: send: tos=&quot;R&quot;, len=46</div><div>DEBUG: recv: tos=&quot;r&quot;, len=21, data=AuthenticationOK</div>
<div>DEBUG: send: tos=&quot;D&quot;, len=6</div><div>DEBUG: recv: tos=&quot;e&quot;, len=20, data=recovery failed</div><div>DEBUG: command failed. reason=recovery failed</div><div>BackendError</div><div>DEBUG: send: tos=&quot;X&quot;, len=4</div>
</div></div><div><br></div><div><br></div><div>postgresql primary log<br></div><div><br></div><div><div> pg_start_backup</div><div>-----------------</div><div> 0/12000020</div><div>(1 row)</div><div><br></div><div>Host key verification failed.</div>
<div>NOTICE:  WAL archiving is not enabled; you must ensure that all required WAL segments are copied through other means to complete the backup</div><div> pg_stop_backup</div><div>----------------</div><div> 0/120000D8</div>
</div><div><br></div><div><br></div><div>pgpool log</div><div><br></div><div><div>2013-07-23 10:09:36 LOG:   pid 7547: starting recovering node 1</div><div>2013-07-23 10:09:36 LOG:   pid 7547: starting recovery command: &quot;SELECT pgpool_recovery(&#39;basebackup.sh&#39;, &#39;10.0.11.150&#39;, &#39;/var/lib/postgresql/9.1/main/&#39;)&quot;</div>
<div>2013-07-23 10:09:37 LOG:   pid 7547: 1st stage is done</div><div>2013-07-23 10:09:37 LOG:   pid 7547: check_postmaster_started: try to connect to postmaster on hostname:10.0.11.150 database:postgres user:postgres (retry 0 times)</div>
<div>2013-07-23 10:09:37 LOG:   pid 7547: check_postmaster_started: failed to connect to postmaster on hostname:10.0.11.150 database:postgres user:postgres</div><div><br></div></div><div><br></div><div>the check_postmaster_started just keeps repeating for 90seconds which is the timeout.<br>
</div><div><br></div><div>postgres standby startup log</div><div><br></div><div><div>2013-07-23 10:18:17 UTC LOG:  database system was interrupted; last known up at 2013-07-23 10:13:35 UTC</div><div>2013-07-23 10:18:17 UTC LOG:  could not open file &quot;pg_xlog/000000010000000000000015&quot; (log file 0, segment 21): No s          uch file or directory</div>
<div>2013-07-23 10:18:17 UTC LOG:  invalid checkpoint record</div><div>2013-07-23 10:18:17 UTC FATAL:  could not locate required checkpoint record</div><div>2013-07-23 10:18:17 UTC HINT:  If you are not restoring from a backup, try removing the file &quot;/var/lib/postgresql/9          .1/main/backup_label&quot;.</div>
<div>2013-07-23 10:18:17 UTC LOG:  startup process (PID 7020) exited with exit code 1</div><div>2013-07-23 10:18:17 UTC LOG:  aborting startup due to startup process failure</div></div><div><br></div><div><br></div><div>basically it looks like it started to copy the files then fails ?</div>
<div><br></div><div><br></div><div><br></div></div>