signal18 / replication-manager

Signal 18 repman - Replication Manager for MySQL / MariaDB / Percona Server
https://signal18.io/products/srm
GNU General Public License v3.0
649 stars 167 forks source link

Error 1146: Table 'replication_manager_schema.pseudo_gtid_v' doesn't exist #235

Open nigel889 opened 6 years ago

nigel889 commented 6 years ago

used replication-manager-pro-2.0.0_20_g97b7a-1.x86_64.rpm installed percona5.6.32 gtid mode = off 1master --> 2 slave master: 10.1.1.173 slave1: 10.1.1.171 slave2: 10.1.1.172

when switchover, mrm show logs: Could not get pseudoGTID on slave 10.1.1.172:3306, Error 1146: Table 'replication_manager_schema.pseudo_gtid_v' doesn't exist 10.1.1.172:3306 Slave_SQL_Running: no ,replication stop. how to fix it.

svaroqui commented 6 years ago

Hello,

Are you using replication-filters like do-db or ignore-db ?

/svar

Le 17 mai 2018 à 13:37, nigel889 notifications@github.com a écrit :

used replication-manager-pro-2.0.0_20_g97b7a-1.x86_64.rpm installed percona5.6.32 gtid mode = off 1master --> 2 slave master: 10.1.1.173 slave1: 10.1.1.171 slave2: 10.1.1.172

when switchover, mrm show logs: Could not get pseudoGTID on slave 10.1.1.172:3306, Error 1146: Table 'replication_manager_schema.pseudo_gtid_v' doesn't exist 10.1.1.172:3306 Slave_SQL_Running: no ,replication stop. how to fix it.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/signal18/replication-manager/issues/235, or mute the thread https://github.com/notifications/unsubscribe-auth/AC1RIEw68_m9vyE5Vxl_WI6wX6ZsLBYIks5tzWDdgaJpZM4UC5nl.

Stéphane Varoqui, VP of Products Phone: +33 695-926-401, skype: svaroqui https://signal18.io/ https://signal18.io/

nigel889 commented 6 years ago

my.cnf setting replicate-wild-ignore-table :

replicate-wild-ignore-table = mysql.% replicate-wild-ignore-table = information_schema.% replicate-wild-ignore-table = performance_schema.% replicate-wild-ignore-table = temp.%

nigel889 commented 6 years ago

my.cnf remove replicate-wild-ignore-table:

replicate-wild-ignore-table = mysql.%

replicate-wild-ignore-table = information_schema.%

replicate-wild-ignore-table = performance_schema.%

replicate-wild-ignore-table = temp.%

and restart mysql service , when mrm swichover, logs report:

2018/05/17 22:55:39 [pub] ERROR - Could not get pseudoGTID on slave 10.1.1.173:3306, Error 1146: Table 'replication_manager_schema.pseudo_gtid_v' doesn't exist 2018/05/17 22:55:39 [pub] INFO - Found pseudoGTID 2018/05/17 22:55:39 [pub] INFO - Found Coordinates on slave mysql-bin.000007, 4 2018/05/17 22:55:39 [pub] ERROR - Could not find number of events after pseudoGTID in slave 10.1.1.173:3306, Error 1220: Error when executing command SHOW BINLOG EVENTS: Could not find target log 2018/05/17 23:10:43 [pub] ERROR - Could not get pseudoGTID on slave 10.1.1.172:3306, Error 1146: Table 'replication_manager_schema.pseudo_gtid_v' doesn't exist 2018/05/17 23:10:43 [pub] INFO - Found pseudoGTID 2018/05/17 23:10:43 [pub] INFO - Found Coordinates on slave mysql-bin.000001, 4 2018/05/17 23:10:43 [pub] ERROR - Could not find number of events after pseudoGTID in slave 10.1.1.172:3306, Error 1220: Error when executing command SHOW BINLOG EVENTS: Could not find target log 2018/05/17 23:10:43 [pub] INFO - Found 0 events to skip after coordinates on slave mysql-bin.000001,4 2018/05/17 23:10:43 [pub] INFO - Found coordinate on master mysql-bin.000001 ,4 2018/05/17 23:10:43 [pub] INFO - Found skip coordinate on master mysql-bin.000001, 4

swichover and failover not work.

svaroqui commented 6 years ago

Re,

Sorry was outside for a while ! Think you should have bin logs enable and log_slave_updates on all cluster nodes !

Le 17 mai 2018 à 17:01, nigel889 notifications@github.com a écrit :

my.cnf remove replicate-wild-ignore-table:

replicate-wild-ignore-table = mysql.%

replicate-wild-ignore-table = information_schema.%

replicate-wild-ignore-table = performance_schema.%

replicate-wild-ignore-table = temp.%

and restart mysql service , when mrm swichover, logs report:

2018/05/17 22:55:39 [pub] ERROR - Could not get pseudoGTID on slave 10.1.1.173:3306, Error 1146: Table 'replication_manager_schema.pseudo_gtid_v' doesn't exist 2018/05/17 22:55:39 [pub] INFO - Found pseudoGTID 2018/05/17 22:55:39 [pub] INFO - Found Coordinates on slave mysql-bin.000007, 4 2018/05/17 22:55:39 [pub] ERROR - Could not find number of events after pseudoGTID in slave 10.1.1.173:3306, Error 1220: Error when executing command SHOW BINLOG EVENTS: Could not find target log

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/signal18/replication-manager/issues/235#issuecomment-389898136, or mute the thread https://github.com/notifications/unsubscribe-auth/AC1RIGYcR7LzsDYNSuoF-wndB1O4QF9lks5tzZDEgaJpZM4UC5nl.

Stéphane Varoqui, VP of Products Phone: +33 695-926-401, skype: svaroqui https://signal18.io/ https://signal18.io/

nigel889 commented 6 years ago

Think you should have bin logs enable and log_slave_updates on all cluster nodes ! yes, all cluster nodes : log_slave_updates = 1 and log_bin enable

nigel889 commented 6 years ago

I enable general_log at master , but don't find create pseudoGTID sql in general log, how the pseudoGTID have been created?

i test this case, if disable pseudoGTID , switchover ok, but when enable pseudoGTID, Could not find number of events after pseudoGTID, change master to not correct, failed.

failover-falsepositive-heartbeat = true , no Inject PseudoGTID , don't take effect ?

svaroqui commented 6 years ago

You are making good progress, it goes via a proxy , as you don't have proxy but vip please use extproxy-address

nigel889 commented 6 years ago

thanks svaroqui: i want to continue this case. What should I do? can you help me?

svaroqui commented 6 years ago

Are you using a VIP or a Supported Proxy ? if VIP you should configure

extproxy = true extproxy-address="VIP_ADDR:3306"

nigel889 commented 6 years ago

if enable pseudoGTID , must use proxy or vip ?

svaroqui commented 6 years ago

You can in theory use both i tested with proxy at that time!

svaroqui commented 6 years ago
db, err := cluster.GetClusterThisProxyConn(pr)
        if err != nil {
            cluster.sme.AddState("ERR00050", state.State{ErrType: "ERROR", ErrDesc: fmt.Sprintf(clusterError["ERR00050"], err), ErrFrom: "TOPO"})
        } else {
            if pr.Type == proxyMyProxy {
                definer = "DEFINER = root@localhost"
            } else {
                definer = ""
            }
            _, err := db.Exec("CREATE OR REPLACE " + definer + " VIEW replication_manager_schema.pseudo_gtid_v as select '" + misc.GetUUID() + "' from dual")

            if err != nil {
                cluster.sme.AddState("ERR00050", state.State{ErrType: "ERROR", ErrDesc: fmt.Sprintf(clusterError["ERR00050"], err), ErrFrom: "TOPO"})
                db.Exec("CREATE DATABASE IF NOT EXISTS replication_manager_schema")

            }
            db.Close()
        }
svaroqui commented 6 years ago

there is may be create or replace i hope your DB support such syntax ?

nigel889 commented 6 years ago

whether use master's ip:port of cluster instead of the vip:port or proxy 's ip:port?

svaroqui commented 6 years ago

GetClusterThisProxyConn is taken on each proxy for _, pr := range cluster.Proxies {

And VIP is one of them extproxy = true extproxy-address="VIP_ADDR:3306"

Proxy can be maxscale ,shardproxy (mariadb+spider), proxysql , haproxy or myproxy and internal vitess proxy (limited in syntax)

svaroqui commented 6 years ago

I have tested in our lab failover using PSEUDO GTID and it works for me with percona 5.6 and proxysql proxy

svaroqui commented 6 years ago

Sorry wrong test indeed adding a third slave , it can not attach via Pseudo GTID because wrong SQL Syntax i'll investigate this !

svaroqui commented 6 years ago

Ok the issue i experimented was only in 2.1 that was a typo and so 2.0 should work as expected ! After fixing the typo in 2.1 i was able to reattach last slave with pseudo GTID on 5.6

svaroqui commented 6 years ago

for the record i used db-servers-hosts = "mysql1,mysql2,mysql3" db-servers-prefered-master = "mysql1" db-servers-credential = "root:mariadb" db-servers-connect-timeout = 1 replication-credential = "root:mariadb" force-slave-no-gtid-mode = true autorejoin-slave-positional-hearbeat = true failover-mode = "automatic"

nigel889 commented 6 years ago

use replication-manager-osc-2.1.0_dev_481_g43723-1.x86_64.rpm installed : use replication-manager-cli console
report: INFO[2018-05-21T9315INFO[2018-05-21T13:09:15+08:00] ERROR invalid character 'p' after top-level value and web service required user and password i use user admin or root and password use repman report "Invalid username or password. "

svaroqui commented 6 years ago

Do you mind sending me your config for me to reproduce Default user:password is admin:repman

svaroqui commented 6 years ago

Thanks for reporting the client bug that i can reproduce !

svaroqui commented 6 years ago

I fixed the console issue in last build tx

nigel889 commented 6 years ago

thx quickly fix the bug.

1, console 's alwas show "Mode: Manual" ,use crl+I dont switch the mode now; 2, The certificate not passed, my web related to config is below : #########

HTTP

########## http-server = true http-bind-address = "0.0.0.0"

http-port = "10001"

http-auth = false

http-session-lifetime = 3600

http-bootstrap-button = false

#########

API

######### api-credential = "admin:repccman" 3, web use incompatible chrome, show blank,below is chrome's debug info : Uncaught TypeError: Cannot read property 'msie' of undefined at jquery.ba-bbq.min.js:18 at jquery.ba-bbq.min.js:18 angular-route.min.js:8 Uncaught TypeError: d.module(...).info is not a function at angular-route.min.js:8 at angular-route.min.js:16 angular.min.js:38 Uncaught Error: [$injector:modulerr] http://errors.angularjs.org/1.4.10/$injector/modulerr?p0=dashboard&p1=Error%3A%20%5B%24injector%3Aunpr%5D%20http%3A%2F%2Ferrors.angularjs.org%2F1.4.10%2F%24injector%2Funpr%3Fp0%3D%2524routeProvider%0A%20%20%20%20at%20http%3A%2F%2F10.1.1.174%3A10001%2Fstatic%2Fvendor%2Fangular.min.js%3A6%3A417%0A%20%20%20%20at%20http%3A%2F%2F10.1.1.174%3A10001%2Fstatic%2Fvendor%2Fangular.min.js%3A41%3A240%0A%20%20%20%20at%20d%20(http%3A%2F%2F10.1.1.174%3A10001%2Fstatic%2Fvendor%2Fangular.min.js%3A39%3A220)%0A%20%20%20%20at%20Object.e%20%5Bas%20invoke%5D%20(http%3A%2F%2F10.1.1.174%3A10001%2Fstatic%2Fvendor%2Fangular.min.js%3A39%3A490)%0A%20%20%20%20at%20d%20(http%3A%2F%2F10.1.1.174%3A10001%2Fstatic%2Fvendor%2Fangular.min.js%3A38%3A184)%0A%20%20%20%20at%20http%3A%2F%2F10.1.1.174%3A10001%2Fstatic%2Fvendor%2Fangular.min.js%3A38%3A308%0A%20%20%20%20at%20p%20(http%3A%2F%2F10.1.1.174%3A10001%2Fstatic%2Fvendor%2Fangular.min.js%3A7%3A355)%0A%20%20%20%20at%20g%20(http%3A%2F%2F10.1.1.174%3A10001%2Fstatic%2Fvendor%2Fangular.min.js%3A38%3A85)%0A%20%20%20%20at%20db%20(http%3A%2F%2F10.1.1.174%3A10001%2Fstatic%2Fvendor%2Fangular.min.js%3A41%3A368)%0A%20%20%20%20at%20c%20(http%3A%2F%2F10.1.1.174%3A10001%2Fstatic%2Fvendor%2Fangular.min.js%3A19%3A463) at angular.min.js:6 at angular.min.js:39 at p (angular.min.js:7) at g (angular.min.js:38) at db (angular.min.js:41) at c (angular.min.js:19) at yc (angular.min.js:20) at de (angular.min.js:19) at HTMLDocument. (angular.min.js:299) at j (jquery-2.1.1.min.js:2)

svaroqui commented 6 years ago

Re ,

1

i push a new patch sorry 2.1 as different json API and all was not yet reflected , now should be fine

2

That's not expected did you clear you browser cache as this error looks like wrong angularJS version

svaroqui commented 6 years ago

To use the web please make a exception to the certificate it's not signed indeed , the HTTP is now located at : https://127.0.0.1:10005/

nigel889 commented 6 years ago

http: //ip:10001 or https://ip:10005 web login Hint: "Invalid username or password." use user: admin password: repccman

and pseudoGTID not works on percona5.6 traditional replication.

svaroqui commented 6 years ago

Hi nigel

pseudoGTID works in percona in my lab I can show you any time ?

For the credential do you have a cluster and a default section in your config
[mycluster] [default]

nigel889 commented 6 years ago

@svaroqui I'm back. For the credential do you have a cluster and a default section in your config [mycluster] [default]

yes ,i have two sections in my config,but when i login remain report "Invalid username or password." config in [mycluster] api-credential = "admin:repccman" http-auth = true