invalid replicate state change
Posted in 2015
Topics: Versions, Editions & End-of-Life
I need some help activating two replicates on one of my instances.
uname -a
Linux psdb10rpr 2.6.32-431.17.1.el6.x86_64 #1 SMP Fri Apr 11 17:27:00 EDT 2014
x86_64 x86_64 x86_64 GNU/Linux
crt01rf:
onstat -
IBM Informix Dynamic Server Version 12.10.FC4 -- On-Line -- Up 44 days
00:27:08 -- 4355376 Kbytes
pscourts_rf:
onstat -
IBM Informix Dynamic Server Version 11.70.FC5 -- On-Line -- Up 100 days
19:22:35 -- 5364404 Kbytes
I've created a replicateset with 4 replicates that replicate across 3 informix
instances. All replicates on pscourts_rf and crt05sl started without incident.
However 2 of the replicates on crt10rf are inactive.
cdr start repl [replname] retunrs the 'invalid replicate state change' error.
This is the script I used to define the replicates and I added them to the
replset manually:
cdr define repl --master=g_pscourtsrf --conflict=timestamp --scope=tran --ats
--ris mentalgunrestrict_mental_case
"mentalgunrestrict@g_pscourtsrf:informix.mental_case" "select * from
mental_case" "mentalgunrestrict@g_crt10rf:informix.mental_case" "select * from
mental_case" "mentalgunrestrict@g_crt05sl:informix.mental_case" "select * from
mental_case"
cdr define repl --master=g_pscourtsrf --conflict=timestamp --scope=tran --ats
--ris mentalgunrestrict_mental_ident
"mentalgunrestrict@g_pscourtsrf:informix.mental_ident" "select * from
mental_ident" "mentalgunrestrict@g_crt10rf:informix.mental_ident" "select *
from mental_ident" "mentalgunrestrict@g_crt05sl:informix.mental_ident" "select
* from mental_ident"
cdr define repl --master=g_pscourtsrf --conflict=timestamp --scope=tran --ats
--ris mentalgunrestrict_ncic_posting
"mentalgunrestrict@g_pscourtsrf:informix.ncic_posting" "select * from
ncic_posting" "mentalgunrestrict@g_crt10rf:informix.ncic_posting" "select *
from ncic_posting" "mentalgunrestrict@g_crt05sl:informix.ncic_posting" "select
* from ncic_posting"
cdr define repl --master=g_pscourtsrf --conflict=timestamp --scope=tran --ats
--ris mentalgunrestrict_system_parameter
"mentalgunrestrict@g_pscourtsrf:informix.system_parameter" "select * from
system_parameter" "mentalgunrestrict@g_crt10rf:informix.system_parameter"
"select * from system_parameter"
"mentalgunrestrict@g_crt05sl:informix.system_parameter" "select * from
system_parameter"
crt10rf:cdr list replset mentalgunrestrict
REPLICATE SET:mentalgunrestrict
CURRENTLY DEFINED REPLICATES
-------------------------------
REPLICATE: mentalgunrestrict_mental_case
STATE: Inactive ON:g_crt10rf
CONFLICT: Timestamp
FREQUENCY: immediate
QUEUE SIZE: 0
PARTICIPANT: mentalgunrestrict:informix.mental_case
OPTIONS: transaction,ris,ats,fullrow
REPLID: 6488126 / 0x63003e
REPLMODE: PRIMARY ON:g_crt10rf
APPLY-AS: INFORMIX ON:g_crt10rf
REPLTYPE: Master
REPLICATE: mentalgunrestrict_mental_ident
STATE: Inactive ON:g_crt10rf
CONFLICT: Timestamp
FREQUENCY: immediate
QUEUE SIZE: 0
PARTICIPANT: mentalgunrestrict:informix.mental_ident
OPTIONS: transaction,ris,ats,fullrow
REPLID: 6488127 / 0x63003f
REPLMODE: PRIMARY ON:g_crt10rf
APPLY-AS: INFORMIX ON:g_crt10rf
REPLTYPE: Master
REPLICATE: mentalgunrestrict_ncic_posting
STATE: Active ON:g_crt10rf
CONFLICT: Timestamp
FREQUENCY: immediate
QUEUE SIZE: 0
PARTICIPANT: mentalgunrestrict:informix.ncic_posting
OPTIONS: transaction,ris,ats,fullrow
REPLID: 6488128 / 0x630040
REPLMODE: PRIMARY ON:g_crt10rf
APPLY-AS: INFORMIX ON:g_crt10rf
REPLTYPE: Master
REPLICATE: mentalgunrestrict_system_parameter
STATE: Active ON:g_crt10rf
CONFLICT: Timestamp
FREQUENCY: immediate
QUEUE SIZE: 0
PARTICIPANT: mentalgunrestrict:informix.system_parameter
OPTIONS: transaction,ris,ats,fullrow
REPLID: 6488129 / 0x630041
REPLMODE: PRIMARY ON:g_crt10rf
APPLY-AS: INFORMIX ON:g_crt10rf
REPLTYPE: Master
Sounds to me the primary key may be missing on those tables on the server that the rep is inactive. When you ran the command to create the replset if the pk was missing there should be a CDR error msg posted to the msg log at that timestamp. If not that then I suspect the some kind of mismatch between the schemas (you are using select * so the table schemas need to be the same). Regards, Mark
I suspect the some kind of mismatch between the schemas (you are using select * ) so the table schemas need to be the same including the primary key. When you created the repl set there would be a CDR error posted to the msg log on the server which the repl is Inactive. Regards, Mark