Quantcast
Channel: StackExchange Replication Questions
Viewing all articles
Browse latest Browse all 17268

Tungsten replicator-data doesn't replicate from master to slave

$
0
0

I configured a master slave replication using tungsten replicator with mysql as master and mongodb as slave.I followed this post of data charmer to set up the replication.I am able to configure all the things even the binlog position seems to appear same in both the servers,but data doesn't replicate to the slave.

Below is the tungsten replica status and its fine.

Mater-mysql

[root@localhost deploy]# ./mongodb/tungsten/tungsten-replicator/bin/trepctl -port 11500 services
Processing services command...
NAME              VALUE
----              -----
appliedLastSeqno: 149
appliedLatency  : 0.439
role            : master
serviceName     : mongodb
serviceType     : local
started         : true
state           : ONLINE
Finished services command...

Slave-Mongodb

[root@localhost deploy]# ./mongodb/tungsten/tungsten-replicator/bin/trepctl -port 11600 services
Processing services command...

NAME              VALUE
----              -----
appliedLastSeqno: 149
appliedLatency  : 0.439
role            : slave
serviceName     : mongodb
serviceType     : local
started         : true
state           : ONLINE
Finished services command...

I have made the below configurations in mysql:

Log bin enabled

mysql> SHOW VARIABLES LIKE 'log_bin';                                                                                                                                   +---------------+-------+
| Variable_name | Value |
+---------------+-------+
| log_bin       | ON    |
+---------------+-------+
1 row in set (0.00 sec)

Bin log format is ROW

mysql> show variables like '%binlog_format%';                                                                                                                           +---------------+-------+
| Variable_name | Value |
+---------------+-------+
| binlog_format | ROW   |
+---------------+-------+
1 row in set (0.00 sec)

Mater status

mysql> show master status;
+----------------------+----------+--------------+------------------+-------------------+
| File                 | Position | Binlog_Do_DB | Binlog_Ignore_DB | Executed_Gtid_Set |
+----------------------+----------+--------------+------------------+-------------------+
| localhost-bin.000012 |     2350 |              |                  |                   |
+----------------------+----------+--------------+------------------+-------------------+
1 row in set (0.00 sec)

Commit sequence number

mysql> select * from trep_commit_seqno \G
*************************** 1. row ***************************
          task_id: 0
            seqno: 149
           fragno: 0
        last_frag: 1
        source_id: 127.0.0.1
     epoch_number: 128
          eventid: localhost-bin.000012:0000000000002350;0
  applied_latency: 0
 update_timestamp: 2015-12-22 10:39:34
         shard_id: #UNKNOWN
extract_timestamp: 2015-12-22 10:39:34
1 row in set (0.00 sec)

Similarly in mongodb:

Commit Sequence number

> use tungsten_mongodb
switched to db tungsten_mongodb

> db.trep_commit_seqno.find().pretty()
{
        "_id" : ObjectId("5677a8d895c625ede7f98bc0"),
        "task_id" : 0,
        "seqno" : NumberLong(149),
        "fragno" : 0,
        "last_frag" : true,
        "source_id" : "127.0.0.1",
        "epoch_number" : NumberLong(128),
        "event_id" : "localhost-bin.000012:0000000000002350;0",
        "extract_timestamp" : NumberLong("1450760974000")
}

The log positions in both servers are 2350 which is same but it does not replicates the data.Also when new inputs are given the position or sequence number increases the same in both.What changes do i make to make the data to replicate into the slave.Any help is appreciable.

Thanks !!!


Viewing all articles
Browse latest Browse all 17268

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>