[Bucardo-general] Replication won't start.

Donald StDenis donald.stdenis at goodsearch.com
Tue Jan 10 19:35:40 UTC 2017


Hi,

I finally got back to this project...  Used github to get latest from
master, ran the perl make, make, and make test (almost all succeeded,
couple of them failed) then installed it.  Then ran through the above
installation again.  Fails same way.

Its been a while since I debugged PERL but the PERL does not seem to be the
issue here...

I have never debugged Postgres stored procedures/functions BEFORE - but I
see quite a few in the schema file.  Which one would be the most
interesting to add logging lines to to debug?

I checked the master database carefully there are no entries put into the
Postgres log file when the sync is added.

Nothing appears to STDOUT or STDERR.

Is there a suggested debugging process I can follow to move forward here?


On Mon, Dec 19, 2016 at 2:00 PM, Donald StDenis <
donald.stdenis at goodsearch.com> wrote:

> Here’s the output from the command lines, I don’t see any errors or
> warnings in the database log file.  Earlier I tried the —debug options on
> the start and saw no differences.  Also previously (about 6 months ago
> while testing with 9.2->9.2 replication) I always got errors for trying to
> add tables without any UNIQUE or PRIMARY KEYS but there is none now.
>
> Current output:
>
> bucardo at ale-pg1:~$ echo "DROP DATABASE good_rails_production" | psql
> bucardo
> bucardo at ale-pg1:~$ pg_dump --host=10.223.160.229
> --dbname=good_rails_production --user=bucardo --schema-only --create
> --format=plain  > schema-all.sql
> bucardo at ale-pg1:~$ echo "
>   CREATE USER conn*** WITH LOGIN SUPERUSER ENCRYPTED PASSWORD '***';
>   CREATE USER repo*** WITH LOGIN ENCRYPTED PASSWORD '***';
> " | psql bucardo
> ERROR:  role "conn***" already exists
> ERROR:  role "repo***" already exists
> bucardo at ale-pg1:~$ psql --dbname=postgres --user=bucardo -f schema-all.sql
> <completes without error... very long>
>
> bucardo at ale-pg1:~$ bucardo add db source_db dbhost=10.223.160.229
> dbport=5432 dbname=good_rails_production dbuser=bucardo dbpass=****
> Added database "source_db"
> bucardo at ale-pg1:~$ bucardo add db dest_db dbname=good_rails_production
> dbuser=bucardo
> Added database "dest_db"
> bucardo at ale-pg1:~$ bucardo add all tables
> New tables added: 275
> bucardo at ale-pg1:~$ bucardo add all sequences
> New sequences added: 99
> bucardo at ale-pg1:~$ bucardo add herd copying_herd
> Created relgroup "copying_herd"
> bucardo at ale-pg1:~$ bucardo add sync the_sync relgroup=copying_herd
> dbs=source_db:source,dest_db:target onetimecopy=2
> WARNING:  Relgroup has no members: copying_herd
> Added sync "the_sync"
> Created a new dbgroup named "the_sync"
>
> bucardo at ale-pg1:~$ bucardo start
> Checking for existing processes
> Removing file "/var/run/bucardo/fullstopbucardo"
> Starting Bucardo
> bucardo at ale-pg1:~$ bucardo status
> PID of Bucardo MCP: 28741
>  Name       State    Last good    Time    Last I/D    Last bad    Time
> ==========+========+============+=======+===========+===========+=======
>  the_sync | Bad    | none       |       |           | 16:48:44  | 3s
> bucardo at ale-pg1:~$ bucardo status the_sync
> ======================================================================
> Use of uninitialized value $sourcedb in concatenation (.) or string at
> /usr/bin/bucardo line 6013.
> Last bad                 : Dec 19, 2016 16:48:44 (time until fail: 1s)
> Sync name                : the_sync
> Current state            : Bad
> Source relgroup/database : copying_herd /
> Tables in sync           : 0
> Status                   : Active
> Check time               : None
> Overdue time             : 00:00:00
> Expired time             : 00:00:00
> Stayalive/Kidsalive      : Yes / Yes
> Rebuild index            : No
> Autokick                 : Yes
> Onetimecopy              : No
> Post-copy analyze        : Yes
> Last error:              : Failed : DBD::Pg::st execute failed: ERROR:
>  schema "bucardo" does not exist LINE 1: ...ident(tname), MAX(EXTRACT(epoch
> FROM cdate)) FROM bucardo.bu...
>                  ^ at /usr/sh\
> are/perl5/Bucardo.pm line 3299. Line: 5041 Main DB state: ? Error: none DB
> dest_db state: ? Error: none DB source_db state: 3F000 Error: 7  (KID 28752)
> ======================================================================
> bucardo at ale-pg1:~$ bucardo stop
> Creating /var/run/bucardo/fullstopbucardo ... Done
>
>
>
> On Dec 19, 2016, at 1:49 PM, David Christensen <david at endpoint.com> wrote:
>
>
> On Dec 19, 2016, at 11:06 AM, Donald StDenis <
> donald.stdenis at goodsearch.com> wrote:
>
> Hi,
>
> I’ve been trying to set up Bucardo replication from Pg9.2 to Pg9.6 and I
> can’t seem to make the replication start.
>
> I did this from 9.2->9.2 about 6 months ago with almost no problems as I
> recall.
>
> The bucardo status error on the slave is:
>
> bacardi:~$ bucardo status
>
>
> [snip]
>
> Hi Donald,
>
> If it’s not finding the “bucardo” schema, that would indicate that the
> “validate_sync()” step did not complete successfully when you did an
> `bucardo add sync …`.  Do you have logs of the steps for setting this up
> and any errors encountered in that process?
>
> Best,
>
> David
> --
> David Christensen
> End Point Corporation
> david at endpoint.com
> 785-727-1171 <(785)%20727-1171>
>
>
>
>
>


-- 
--
*Donald St. Denis*
DevOps Engineer
*donald.stdenis at goodsearch.com <donald.stdenis at goodsearch.com>*
*707-331-9624*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.endcrypt.com/pipermail/bucardo-general/attachments/20170110/4195f9e8/attachment.html>


More information about the Bucardo-general mailing list