go-mysql-org / go-mysql-elasticsearch

Sync MySQL data into elasticsearch

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

binlog error on restart (invalid character 'R' after top-level value)

IsaacMontero opened this issue · comments

Hi there,
Been using your script for a long time now (thanks for the work done here)
Lastly I am getting the following dump errors several times when the script is restarted:

data: sync.sh:18916 - 2021/05/03 01:15:28 INFO run status http server 127.0.0.1:12800 data: sync.sh:18916 - 2021/05/03 01:15:28 ERROR listen stat addr 127.0.0.1:12800 err listen tcp 127.0.0.1:12800: bind: address already in use data: sync.sh:18916 - 2021/05/03 01:15:28 INFO skip master data, get current binlog position (mysql-bin-changelog.474692, 13216) data: sync.sh:18916 - 2021/05/03 01:15:28 INFO try dump MySQL and parse data: sync.sh:18916 - mysqldump: [Warning] Using a password on the command line interface can be insecure. data: sync.sh:18916 - 2021/05/03 01:18:41 ERROR sync docs err invalid character 'R' after top-level value after binlog (, 0) data: sync.sh:18916 - 2021/05/03 01:18:41 ERROR do ES bulk err invalid character 'R' after top-level value, close sync data: sync.sh:18916 - 2021/05/03 01:18:41 INFO context is done with context canceled, closing data: sync.sh:18916 - 2021/05/03 01:18:41 INFO closing river data: sync.sh:18916 - 2021/05/03 01:18:41 INFO closing canal data: sync.sh:18916 - 2021/05/03 01:18:41 INFO syncer is closing... data: sync.sh:18916 - 2021/05/03 01:18:41 INFO syncer is closed data: sync.sh:18916 - 2021/05/03 01:18:41 INFO save position (, 0)

Error message is always the same: "sync docs err invalid character 'R' after top-level value"

Finally after some unsuccessful attempts (no less than 3), it comes back working.

I've been trying different bulk_size and flush_bulk_time configurations, otherwise none of them looks working better.
Any idea? I am almost desperate.
Thanks again.