Skip to content

Instantly share code, notes, and snippets.

@dwelch2344
Last active June 18, 2017 09:53
Show Gist options
  • Save dwelch2344/77279f1a62d751486721643624c4bf79 to your computer and use it in GitHub Desktop.
Save dwelch2344/77279f1a62d751486721643624c4bf79 to your computer and use it in GitHub Desktop.
root@29f186d8a68f:/# python3 -m venv /pg_chameleon
root@29f186d8a68f:/# /pg_chameleon/bin/chameleon.py create_schema
Jun 18 02:24:21: [DEBUG] - mysql_lib.py (474): getting table metadata
Jun 18 02:24:21: [INFO] - mysql_lib.py (477): table copy limited to tables: dummy_user
Jun 18 02:24:21: [INFO] - pg_lib.py (583): Installing service schema base
root@29f186d8a68f:/# /pg_chameleon/bin/chameleon.py add_source --config default;
Jun 18 02:24:21: [DEBUG] - mysql_lib.py (474): getting table metadata
Jun 18 02:24:21: [INFO] - mysql_lib.py (477): table copy limited to tables: dummy_user
root@29f186d8a68f:/# /pg_chameleon/bin/chameleon.py init_replica --config default;
Jun 18 02:24:24: [DEBUG] - mysql_lib.py (474): getting table metadata
Jun 18 02:24:24: [INFO] - mysql_lib.py (477): table copy limited to tables: dummy_user
Jun 18 02:24:24: [INFO] - global_lib.py (307): Importing mysql schema
Jun 18 02:24:24: [INFO] - mysql_lib.py (579): locking the tables
Jun 18 02:24:24: [INFO] - mysql_lib.py (670): releasing the lock
Jun 18 02:24:24: [DEBUG] - pg_lib.py (678): master data: table file t_log_replica_1, log name: mysql-bin.000003, log position: 154
Jun 18 02:24:24: [INFO] - pg_lib.py (706): saving master data id source: 1 log file: mysql-bin.000003 log position:154 Last event: None
Jun 18 02:24:24: [INFO] - pg_lib.py (711): cleaning not replayed batches for source 1
Jun 18 02:24:24: [INFO] - pg_lib.py (351): creating the indices
root@29f186d8a68f:/# /pg_chameleon/bin/chameleon.py start_replica --config default;
Jun 18 02:24:32: [DEBUG] - mysql_lib.py (474): getting table metadata
root@29f186d8a68f:/# /pg_chameleon/bin/chameleon.py start_replica
Jun 18 02:27:30: [DEBUG] - mysql_lib.py (474): getting table metadata
Jun 18 02:27:30: [INFO] - mysql_lib.py (477): table copy limited to tables: dummy_user
Jun 18 02:27:30: [INFO] - global_lib.py (348): exit file detected, removing the pid file and terminating the replica process
@the4thdoctor
Copy link

the4thdoctor commented Jun 18, 2017

row 29 is strange. it seems to me the start_replica fails for some reasons. when re replica fail the source state is set to error and the exit file prevents the replica to start again until the issue is solved.

can you please attach the postgres and mysql logs ?
when starting the replica try to redirect the stdout to a file.
/pg_chameleon/bin/chameleon.py start_replica --config default > /pg_chameleon/replica.log 2>&1
this should give more info.
thanks :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment