[Bucardo-general] Bucardo 4.99.7 and PostgreSQL 9.1.9 on debian 7 : stuck in "bad" state

Jérôme Gaulin jerume at assiniemafia.com
Fri Sep 27 09:47:19 UTC 2013


Hello,

First of all thank you for this awesome tool. I am trying to use it correctly since 2 days and I am taking a lot of fun :)  

I am on debian 7, bucardo 4.99.7 get from source, postgresql 9.1.9 from a official stable package.

So after few hundreds tabs, here I am :)


After the install and the setup, I have tried to play a little bit with this tool before using it for my company in production across the atlantic. And at a time, from "Good" state it switched to  "Bad" State. And i really don't know what to do with it. 

FYI Bucardo is installed on the same host than FR_BDD.

My configuration :

~ % bucardo list dbs                                                                                                                             ~
Database: LA_BDD   Status: active  Conn: psql -p  -U bucardo -d mybdd -h IP_LA
Database: FR_BDD  Status: active  Conn: psql -p  -U bucardo -d mybdd -h IP_FR

~ % bucardo list dbgroup                                                                                                                         
Database group: BDD_GROUP  Members: LA_BDD:source FR_BDD:source

~ % bucardo list tables | head                                                                                                                   
630. Table: public.admin_right              DB: LA_BDD  PK: id_admin_right (int4)                                    Syncs: BDD_SYNC
639. Table: public.admin_user               DB: LA_BDD  PK: id_admin_user (int4)                                     Syncs:BDD_SYNC
631. Table: public.alias                    DB: LA_BDD  PK: alias_id (int4)                                          Syncs: BDD_SYNC
[...]

~ % bucardo list sequences | head                                                                                                                
Sequence: public.admin_right_id_admin_right_seq                    DB: LA_BDD
Sequence: public.admin_user_id_admin_user_seq                      DB: LA_BDD
Sequence: public.alias_alias_id_seq                                DB: LA_BDD
[…]

 ~ % bucardo list herds                                                                                                                           
Relgroup: BDD_HERD1  DB: LA_BDD  Members: public.admin_right, public.admin_user, […]
  Used in syncs: BDD_SYNC

~ % bucardo list syncs                                                                                                                           
Sync: BDD_SYNC   Relgroup: BDD_HERD1 [Active]
  DB group BDD_GROUP: LA_BDD (source) FR_BDD (source)

I have few questions : 

1/ So i have now a "Bad" State and i really don't know what to do with it. 

I have tried a :
bucardo reload sync MY_BDD_SYNC  ( what are the exact meaning of this command by the way ? )
bucardo validate   ( what are the exact meaning of this command by the way ? )
bucartdo stop / start 

Without knowing what i was really doing… and this didn't change anything to my problem. I have looked for some informations a little bit everywhere on the internet but without success. 
FYI all the tables have just fews columns, without data. I played with just few INSERT.

~ % bucardo status                                                                                                                               

 Name                     State    Last good    Time         Last I/D    Last bad    Time       
========================+========+============+============+===========+===========+============
 BDD_SYNC | Bad    | 02:27:38   | 7h 58m 46s | 0/1       | 02:51:12  | 7h 35m 13s 

What can I do in such situations ?
Maybe there is a http link somewhere that I missed ?

2 / When i added my tables: 

~ %  bucardo add all tables herd=BDD_HERD1 db=LA_BDD

I choose to add the tables which are on the distant host (THERE). Why not choosing the tables which are on the same host (HERE, the one which have bucardo installed on ) ?
I do have to choose only tables from one pgsql server right ? not from both like : bucardo add all tables herd=BDD_HERD1 db=LA_BDD && bucardo add all tables herd=BDD_HERD1 db=FR_BDD  ? 

3/  I launch the process bucardo with a bucardo system user, which is not root. I have changed the rights of /var/run/bucardo and /var/log/bucardo. Is that ok for you ?  I do not see any errors in normal logging mode.

4/ Is there a way to remove all tables from a database without destroying the database ?

If I want to remove all tables I currently do :
~ %  bucardo remove database LA_BDD --force


5 / When i add a sync : 

bucardo add sync BDD_SYNC herd=BDD_HERD1 dbs=BDD_GROUP ping=false autokick=1

Why choosing ping=false ?


6 / When i try to update a config : 

For exemple : 

~ % bucardo update sync BDD_SYNC autokick=0

Then i do a : 

~ % bucardo reload config                                   ~
Forcing Bucardo to reload the bucardo_config table

and I have this warning/error message : 

Waited, but Bucardo never confirmed the configuration reload!
zsh: exit 11    bucardo reload config


7/ Wnen i try a  "bucardo show all", i have got an exit 1 at the end. Is it ok?

~ % bucardo show all                                                                                                                             ~
autosync_ddl              = newcol
bucardo_current_version   = 4.99.7
bucardo_vac               = 1
bucardo_version           = 4.99.7
ctl_checkonkids_time      = 10
ctl_createkid_time        = 0.5
ctl_sleep                 = 0.2
default_conflict_strategy = bucardo_latest
default_email_from        = nobody at example.com
default_email_host        = localhost
default_email_to          = nobody at example.com
email_debug_file          = 
endsync_sleep             = 1.0
flatfile_dir              = .
host_safety_check         = 
kid_deadlock_sleep        = 0.5
kid_nodeltarows_sleep     = 0.5
kid_pingtime              = 60
kid_restart_sleep         = 1
kid_serial_sleep          = 0.5
kid_sleep                 = 0.5
log_conflict_file         = bucardo_conflict.log
log_level                 = normal
log_microsecond           = 0
log_showlevel             = 0
log_showline              = 0
log_showpid               = 1
log_showtime              = 3
mcp_dbproblem_sleep       = 15
mcp_loop_sleep            = 0.2
mcp_pingtime              = 60
mcp_vactime               = 60
piddir                    = /var/run/bucardo
reason_file               = bucardo.restart.reason.txt
semaphore_table           = bucardo_status
statement_chunk_size      = 10000
stats_script_url          = http://www.bucardo.org/
stopfile                  = fullstopbucardo
syslog_facility           = log_local1
tcp_keepalives_count      = 0
tcp_keepalives_idle       = 0
tcp_keepalives_interval   = 0
vac_run                   = 30
vac_sleep                 = 120
warning_file              = bucardo.warning.log
zsh: exit 1     bucardo show all

If you have a little bit of time, any helps will be very appreciate. Specially for the point number 1/


Regards,





-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.endcrypt.com/pipermail/bucardo-general/attachments/20130927/c88fd609/attachment-0001.html>


More information about the Bucardo-general mailing list