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

启动BinlogSyncer时报错binlog_server:args are not available #8

Open
lynch0227 opened this issue Mar 12, 2019 · 10 comments
Open

启动BinlogSyncer时报错binlog_server:args are not available #8

lynch0227 opened this issue Mar 12, 2019 · 10 comments

Comments

@lynch0227
Copy link

在启动binlog syncer时报错:
curl -H "Content-Type:application/json" -X PUT --data '{"syncer_id":173,"syncer_uuid":"f7e30637-f15a-11e8-accc-244427b6b60e","mysql_addr":"x.x.x.x:3306","mysql_user":"root","mysql_password":"root","semi_sync":false}' http://server_ip:5000/binlog/syncer/start
{"message":"binlog_server:args are not available"}
以下是日志信息:
2019-03-12T11:10:56.675+0800 info replication/binlogsyncer.go:136 create BinlogSyncer with config {173 f7e30637-f15a-11e8-accc-244427b6b60e mysql x.x.x. 3306 root utf8 false false false UTC true 0 10s 20s 3 true}
2019-03-12T11:10:56.677+0800 error server/server.go:869 NewSyncer:binlogProgress reset error,err:invalid interval format, must n[-n]
2019-03-12T11:10:56.677+0800 error server/server.go:813 startSyncerServer error,err:invalid interval format, must n[-n],args:{173 f7e30637-f15a-11e8-accc-244427b6b60e x.x.x.x:3306 root root false}
2019-03-12T11:10:56.677+0800 error api/binlog_syncer_handler.go:86 StartServer error,err:binlog_server:args are not available,args:{173 f7e30637-f15a-11e8-accc-244427b6b60e x.x.x.x:3306 root root false}
2019-03-12T11:10:56.677+0800 error api/binlog_syncer_handler.go:51 StartBinlogSyncer error,err: binlog_server:args are not available
这个问题该如何解决?
另外在查看当前运行的binlog syncer时,发现有个syncer_id=0的同步任务,这个任务的功能是什么?
能否提供删除syncer的删除接口处理?
curl -H "Content-Type:application/json" -X GET http://server_ip:5000/binlog/syncer/status {"message":"success","data":{"syncer_id":0,"syncer_uuid":"","mysql_addr":"","mysql_user":"","mysql_password":"","semi_sync":false,"current_gtid":"","last_binlog_file":"","last_file_position":0,"executed_gtid_set":"","purged_gtid_set":"","status":"stopped"}}

@flike
Copy link
Owner

flike commented Mar 15, 2019

1.启动参数错误,请按照quick start操作一遍。可以用docker compose体验一下。
2.syncer的状态是stopped,表示没有启动syncer。应该是Follower节点看到的吧?

@lynch0227
Copy link
Author

我就是按照quick start操作的,在启动syncer时候还是报错,并且没有debug日志用来调试.
另外能直接提供binary程序吗?

@WMSen
Copy link

WMSen commented Mar 26, 2019

我也遇到这个错误,有解决办法了吗?另外syncer_uuid是直接用主库的吗?还是自己随机指定?

@lynch0227
Copy link
Author

syncer_uuid我理解应该是随机指定的,只要和Master uuid不同就可以.

@WMSen
Copy link

WMSen commented Mar 26, 2019

你这问题解决了吗?

@lynch0227
Copy link
Author

没有,等有时间再翻翻源码

@WMSen
Copy link

WMSen commented Mar 28, 2019

我之前指定的源库gtid_mode没开,换了个gtid_mode=on的,没有再报错

@raggdoll-ya
Copy link

Guys, could you tell something in english? I faced the same problem and would like to ask you before making crutches on my side.

@michael-liumh
Copy link

@raggdoll-ya you have to set the master variable gtid_mode to on.

@livyfu
Copy link

livyfu commented May 12, 2021

It could be a bug in an old version of github.com/siddontang/go-mysql, which is now called github.com/go-mysql-org/go-mysql (rename details here). The MysqlGTIDSet.Update method assumed there were only one server's GTIDs in the string but there could be multiple. So if the master MySQL server you are replicating from has a comma-separated GTID set, you get this error.

It has been fixed here. So if you upgrade the dependency, it should work.

And of course, as others have pointed out, turn on gtid_mode on the master :)

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

6 participants