{"action":"created","issue":{"url":"https://api.github.com/repos/siddontang/go-mysql-elasticsearch/issues/77","repository_url":"https://api.github.com/repos/siddontang/go-mysql-elasticsearch","labels_url":"https://api.github.com/repos/siddontang/go-mysql-elasticsearch/issues/77/labels{/name}","comments_url":"https://api.github.com/repos/siddontang/go-mysql-elasticsearch/issues/77/comments","events_url":"https://api.github.com/repos/siddontang/go-mysql-elasticsearch/issues/77/events","html_url":"https://github.com/siddontang/go-mysql-elasticsearch/issues/77","id":194917326,"number":77,"title":"do ES bulks err ","user":{"login":"hzruandd","id":14244046,"avatar_url":"https://avatars.githubusercontent.com/u/14244046?v=3","gravatar_id":"","url":"https://api.github.com/users/hzruandd","html_url":"https://github.com/hzruandd","followers_url":"https://api.github.com/users/hzruandd/followers","following_url":"https://api.github.com/users/hzruandd/following{/other_user}","gists_url":"https://api.github.com/users/hzruandd/gists{/gist_id}","starred_url":"https://api.github.com/users/hzruandd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hzruandd/subscriptions","organizations_url":"https://api.github.com/users/hzruandd/orgs","repos_url":"https://api.github.com/users/hzruandd/repos","events_url":"https://api.github.com/users/hzruandd/events{/privacy}","received_events_url":"https://api.github.com/users/hzruandd/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-12-12T08:40:03Z","updated_at":"2016-12-12T08:59:12Z","closed_at":null,"body":"2016/12/12 16:33:39 binlogsyncer.go:71: [info] create BinlogSyncer with config &{100 mysql 10.8.6.182 3306 root passwd  false false}\r\n2016/12/12 16:33:39 dump.go:96: [info] skip dump, use last binlog replication pos (mysql-bin.000001, 30940085)\r\n2016/12/12 16:33:39 sync.go:17: [info] start sync binlog at (mysql-bin.000001, 30940085)\r\n2016/12/12 16:33:39 binlogsyncer.go:226: [info] begin to sync binlog from position (mysql-bin.000001, 30940085)\r\n2016/12/12 16:33:39 binlogsyncer.go:130: [info] register slave for master server 10.8.6.182:3306\r\n2016/12/12 16:33:39 status.go:52: [info] run status http server 10.8.6.170:12800\r\n2016/12/12 16:33:39 binlogsyncer.go:552: [info] rotate to (mysql-bin.000001, 30940085)\r\n2016/12/12 16:33:39 sync.go:53: [info] rotate binlog to (mysql-bin.000001, 30940085)\r\n2016/12/12 16:34:52 sync.go:327: [error] sync docs err Post http://10.8.6.170:9200/_bulk: dial tcp 10.8.6.170:9200: connect: cannot assign requested address after binlog (mysql-bin.000001, 40298382)\r\n2016/12/12 16:34:52 sync.go:54: [error] do ES bulks err Post http://10.8.6.170:9200/_bulk: dial tcp 10.8.6.170:9200: connect: cannot assign requested address, stop\r\n2016/12/12 16:34:52 handler.go:35: [error] handle ESRiverRowsEventHandler err, interrupted\r\n2016/12/12 16:34:52 sync.go:57: [error] handle rows event error do handler error, interrupted\r\n2016/12/12 16:34:52 canal.go:151: [error] canal start sync binlog err: do handler error, interrupted\r\n\r\n直接通过ES的restful接口做bulk操作测试，只要保证每个item都有'\\n'即可成功。  但是目前却无法同步mysql的binlog数据了。"},"comment":{"url":"https://api.github.com/repos/siddontang/go-mysql-elasticsearch/issues/comments/266375024","html_url":"https://github.com/siddontang/go-mysql-elasticsearch/issues/77#issuecomment-266375024","issue_url":"https://api.github.com/repos/siddontang/go-mysql-elasticsearch/issues/77","id":266375024,"user":{"login":"hzruandd","id":14244046,"avatar_url":"https://avatars.githubusercontent.com/u/14244046?v=3","gravatar_id":"","url":"https://api.github.com/users/hzruandd","html_url":"https://github.com/hzruandd","followers_url":"https://api.github.com/users/hzruandd/followers","following_url":"https://api.github.com/users/hzruandd/following{/other_user}","gists_url":"https://api.github.com/users/hzruandd/gists{/gist_id}","starred_url":"https://api.github.com/users/hzruandd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hzruandd/subscriptions","organizations_url":"https://api.github.com/users/hzruandd/orgs","repos_url":"https://api.github.com/users/hzruandd/repos","events_url":"https://api.github.com/users/hzruandd/events{/privacy}","received_events_url":"https://api.github.com/users/hzruandd/received_events","type":"User","site_admin":false},"created_at":"2016-12-12T08:59:12Z","updated_at":"2016-12-12T08:59:12Z","body":"测试结果如下：\r\n[root@1170 go-mysql-elasticsearch]#  curl -XPOST '10.8.6.170:9200/demo-afe2016.12.08/kafka2logstash/_bulk?pretty' -d '\r\n>  {\"index\":{\"_id\":\"10\"}} \r\n>  {\"name\": \"John Doe\" } \r\n>  {\"index\":{\"_id\":\"20\"}}\r\n>  {\"name\": \"Jane Doe\" } '\r\n{\r\n  \"took\" : 10,\r\n  \"errors\" : false,\r\n  \"items\" : [\r\n    {\r\n      \"index\" : {\r\n        \"_index\" : \"demo-afe2016.12.08\",\r\n        \"_type\" : \"kafka2logstash\",\r\n        \"_id\" : \"10\",\r\n        \"_version\" : 1,\r\n        \"result\" : \"created\",\r\n        \"_shards\" : {\r\n          \"total\" : 2,\r\n          \"successful\" : 1,\r\n          \"failed\" : 0\r\n        },\r\n        \"created\" : true,\r\n        \"status\" : 201\r\n      }\r\n    }\r\n  ]\r\n}"}}
{"actor":{"display_login":"hzruandd"}}