Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nacos使用docker部署,配置mysql主从数据库使用一段时间后主从失效 #2362

Closed
zhuyouzhufu opened this issue Feb 13, 2020 · 5 comments
Assignees

Comments

@zhuyouzhufu
Copy link

查看从节点发现his_config_info表数据有问题
Last_SQL_Error: Could not execute Delete_rows event on table nacos-config.his_config_info; Can't find record in 'his_config_info', Error_code: 1032; handler error HA_ERR_KEY_NOT_FOUND; the event's master log master_log.000002, end_log_pos 133198660
然后使用数据库查看数据
image
image
烦请各路大佬指点一二,不胜感激。

@zhuyouzhufu
Copy link
Author

杭州主服务器127条数据,深圳从服务器275条数据。同一张表。

@zhuyouzhufu
Copy link
Author

说明一下,我没有在从数据库操作过nacos-config的数据库(写操作),全部是在页面上进行配置的修改

@zhuyouzhufu
Copy link
Author

我的nacos-server容器已经使用了7周,从服务器最后一次记录是2019年1月20日
image
image

@zhuyouzhufu
Copy link
Author

docker的nacos版本为1.1.4

@paderlol
Copy link
Collaborator

这个问题是由于程序里面检测到master不可用 然后就切换到slave了,所以造成了这个问题,我在nacos-docker镜像里面做了主从镜像,当时是为了演示这个能力,这个其实生产会出现你这个问题,就是切到从后导致主的数据比从少,出现数据不一致的问题,所以建议改成配一台就好,后续版本会去掉这个配置两个数据库的功能的。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants