tiflash无法成功建立副本

问题
docker单机部署测试时
建立TiFlash副本无法成功,同步状态一直为0


查询副本状态还是tikv

查询tiflash_cluster_manager.log发现以下报错

[2021/04/17 02:29:32.577 +08:00] [INFO] [TiFlashManager] [Set placement rule {'count': 1, 'end_key': '7480000000000000FF3900000000000000F8', 'group_id': 'tiflash', 'id': 'table-56-r', 'index': 0, 'label_constraints': [{'key': 'engine', 'op': 'in', 'values': ['tiflash']}], 'location_labels': [], 'override': True, 'role': 'learner', 'start_key': '7480000000000000FF385F720000000000FA'}]
[2021/04/17 02:29:32.581 +08:00] [ERROR] [TiFlashManager] [fail to get table replica sync status [ConnectionError(MaxRetryError("HTTPConnectionPool(host='172.100.0.4', port=20108): Max retries exceeded with url: /tiflash/sync-status/56 (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused',))",),)]]
[2021/04/17 02:29:32.581 +08:00] [INFO] [TiFlashManager] [report to tidb: id 56, region_count 1, flash_region_count 0]

tiflash.log记录

[2021/04/17 02:47:47.937 +08:00] [INFO] [] ["SchemaSyncer: start to sync schemas. current version is: 59 and try to sync schema version to: 60"] [thread_id=10]
[2021/04/17 02:47:47.937 +08:00] [DEBUG] [] ["SchemaSyncer: try load schema diffs."] [thread_id=10]
[2021/04/17 02:47:47.938 +08:00] [DEBUG] [] ["SchemaSyncer: end load schema diffs."] [thread_id=10]
[2021/04/17 02:47:47.938 +08:00] [DEBUG] [] ["SchemaGetter: Get DB Info from TiKV : {\"id\":51,\"db_name\":{\"O\":\"lchwtest\",\"L\":\"lchwtest\"},\"charset\":\"utf8mb4\",\"collate\":\"utf8mb4_bin\",\"state\":5}"] [thread_id=10]
[2021/04/17 02:47:47.939 +08:00] [DEBUG] [] ["SchemaGetter: Get Table Info from TiKV : {\"id\":56,\"name\":{\"O\":\"t_sample_template\",\"L\":\"t_sample_template\"},\"charset\":\"utf8\",\"collate\":\"utf8_general_ci\",\"cols\":[{\"id\":1,\"name\":{\"O\":\"id\",\"L\":\"id\"},\"offset\":0,\"origin_default\":null,\"origin_default_bit\":null,\"default\":null,\"default_bit\":null,\"default_is_expr\":false,\"generated_expr_string\":\"\",\"generated_stored\":false,\"dependences\":null,\"type\":{\"Tp\":8,\"Flag\":4099,\"Flen\":20,\"Decimal\":0,\"Charset\":\"binary\",\"Collate\":\"binary\",\"Elems\":null},\"state\":5,\"comment\":\"主键ID\",\"hidden\":false,\"change_state_info\":null,\"version\":2},{\"id\":2,\"name\":{\"O\":\"tempName\",\"L\":\"tempname\"},\"offset\":1,\"origin_default\":null,\"origin_default_bit\":null,\"default\":null,\"default_bit\":null,\"default_is_expr\":false,\"generated_expr_string\":\"\",\"generated_stored\":false,\"dependences\":null,\"type\":{\"Tp\":15,\"Flag\":4097,\"Flen\":50,\"Decimal\":0,\"Charset\":\"utf8\",\"Collate\":\"utf8_general_ci\",\"Elems\":null},\"state\":5,\"comment\":\"样品模板名称\",\"hidden\":false,\"change_state_info\":null,\"version\":2},{\"id\":3,\"name\":{\"O\":\"companyId\",\"L\":\"companyid\"},\"offset\":2,\"origin_default\":null,\"origin_default_bit\":null,\"default\":null,\"default_bit\":null,\"default_is_expr\":false,\"generated_expr_string\":\"\",\"generated_stored\":false,\"dependences\":null,\"type\":{\"Tp\":8,\"Flag\":4105,\"Flen\":20,\"Decimal\":0,\"Charset\":\"binary\",\"Collate\":\"binary\",\"Elems\":null},\"state\":5,\"comment\":\"企业Id,t_company.id\",\"hidden\":false,\"change_state_info\":null,\"version\":2},{\"id\":4,\"name\":{\"O\":\"serial\",\"L\":\"serial\"},\"offset\":3,\"origin_default\":null,\"origin_default_bit\":null,\"default\":\"0\",\"default_bit\":null,\"default_is_expr\":false,\"generated_expr_string\":\"\",\"generated_stored\":false,\"dependences\":null,\"type\":{\"Tp\":1,\"Flag\":0,\"Flen\":1,\"Decimal\":0,\"Charset\":\"binary\",\"Collate\":\"binary\",\"Elems\":null},\"state\":5,\"comment\":\"是否序列化 0否 1是\",\"hidden\":false,\"change_state_info\":null,\"version\":2},{\"id\":5,\"name\":{\"O\":\"sort\",\"L\":\"sort\"},\"offset\":4,\"origin_default\":null,\"origin_default_bit\":null,\"default\":\"1\",\"default_bit\":null,\"default_is_expr\":false,\"generated_expr_string\":\"\",\"generated_stored\":false,\"dependences\":null,\"type\":{\"Tp\":3,\"Flag\":40,\"Flen\":10,\"Decimal\":0,\"Charset\":\"binary\",\"Collate\":\"binary\",\"Elems\":null},\"state\":5,\"comment\":\"排列顺序\",\"hidden\":false,\"change_state_info\":null,\"version\":2},{\"id\":6,\"name\":{\"O\":\"fromTempId\",\"L\":\"fromtempid\"},\"offset\":5,\"origin_default\":null,\"origin_default_bit\":null,\"default\":\"0\",\"default_bit\":null,\"default_is_expr\":false,\"generated_expr_string\":\"\",\"generated_stored\":false,\"dependences\":null,\"type\":{\"Tp\":8,\"Flag\":0,\"Flen\":20,\"Decimal\":0,\"Charset\":\"binary\",\"Collate\":\"binary\",\"Elems\":null},\"state\":5,\"comment\":\"源模板id(从哪个模板id复制过来)\",\"hidden\":false,\"change_state_info\":null,\"version\":2},{\"id\":7,\"name\":{\"O\":\"creator\",\"L\":\"creator\"},\"offset\":6,\"origin_default\":null,\"origin_default_bit\":null,\"default\":\"0\",\"default_bit\":null,\"default_is_expr\":false,\"generated_expr_string\":\"\",\"generated_stored\":false,\"dependences\":null,\"type\":{\"Tp\":8,\"Flag\":0,\"Flen\":20,\"Decimal\":0,\"Charset\":\"binary\",\"Collate\":\"binary\",\"Elems\":null},\"state\":5,\"comment\":\"创建人\",\"hidden\":false,\"change_state_info\":null,\"version\":2},{\"id\":8,\"name\":{\"O\":\"createTime\",\"L\":\"createtime\"},\"offset\":7,\"origin_default\":null,\"origin_default_bit\":null,\"default\":\"0\",\"default_bit\":null,\"default_is_expr\":false,\"generated_expr_string\":\"\",\"generated_stored\":false,\"dependences\":null,\"type\":{\"Tp\":3,\"Flag\":32,\"Flen\":10,\"Decimal\":0,\"Charset\":\"binary\",\"Collate\":\"binary\",\"Elems\":null},\"state\":5,\"comment\":\"创建时间\",\"hidden\":false,\"change_state_info\":null,\"version\":2},{\"id\":9,\"name\":{\"O\":\"reviser\",\"L\":\"reviser\"},\"offset\":8,\"origin_default\":null,\"origin_default_bit\":null,\"default\":\"0\",\"default_bit\":null,\"default_is_expr\":false,\"generated_expr_string\":\"\",\"generated_stored\":false,\"dependences\":null,\"type\":{\"Tp\":8,\"Flag\":0,\"Flen\":20,\"Decimal\":0,\"Charset\":\"binary\",\"Collate\":\"binary\",\"Elems\":null},\"state\":5,\"comment\":\"修改人\",\"hidden\":false,\"change_state_info\":null,\"version\":2},{\"id\":10,\"name\":{\"O\":\"reviseTime\",\"L\":\"revisetime\"},\"offset\":9,\"origin_default\":null,\"origin_default_bit\":null,\"default\":\"0\",\"default_bit\":null,\"default_is_expr\":false,\"generated_expr_string\":\"\",\"generated_stored\":false,\"dependences\":null,\"type\":{\"Tp\":3,\"Flag\":32,\"Flen\":10,\"Decimal\":0,\"Charset\":\"binary\",\"Collate\":\"binary\",\"Elems\":null},\"state\":5,\"comment\":\"修改时间\",\"hidden\":false,\"change_state_info\":null,\"version\":2},{\"id\":11,\"name\":{\"O\":\"isDel\",\"L\":\"isdel\"},\"offset\":10,\"origin_default\":null,\"origin_default_bit\":null,\"default\":\"0\",\"default_bit\":null,\"default_is_expr\":false,\"generated_expr_string\":\"\",\"generated_stored\":false,\"dependences\":null,\"type\":{\"Tp\":1,\"Flag\":32,\"Flen\":3,\"Decimal\":0,\"Charset\":\"binary\",\"Collate\":\"binary\",\"Elems\":null},\"state\":5,\"comment\":\"源模板id(从哪个模板id复制过来)\",\"hidden\":false,\"change_state_info\":null,\"version\":2},{\"id\":12,\"name\":{\"O\":\"useBarCode\",\"L\":\"usebarcode\"},\"offset\":11,\"origin_default\":null,\"origin_default_bit\":null,\"default\":\"0\",\"default_bit\":null,\"default_is_expr\":false,\"generated_expr_string\":\"\",\"generated_stored\":false,\"dependences\":null,\"type\":{\"Tp\":1,\"Flag\":0,\"Flen\":1,\"Decimal\":0,\"Charset\":\"binary\",\"Collate\":\"binary\",\"Elems\":null},\"state\":5,\"comment\":\"是否使用一维码 0 否 1 是\",\"hidden\":false,\"change_state_info\":null,\"version\":2}],\"index_info\":[{\"id\":1,\"idx_name\":{\"O\":\"companyId\",\"L\":\"companyid\"},\"tbl_name\":{\"O\":\"\",\"L\":\"\"},\"idx_cols\":[{\"name\":{\"O\":\"companyId\",\"L\":\"companyid\"},\"offset\":2,\"length\":-1}],\"state\":5,\"comment\":\"\",\"index_type\":1,\"is_unique\":false,\"is_primary\":false,\"is_invisible\":false,\"is_global\":false},{\"id\":2,\"idx_name\":{\"O\":\"sort\",\"L\":\"sort\"},\"tbl_name\":{\"O\":\"\",\"L\":\"\"},\"idx_cols\":[{\"name\":{\"O\":\"sort\",\"L\":\"sort\"},\"offset\":4,\"length\":-1}],\"state\":5,\"comment\":\"\",\"index_type\":1,\"is_unique\":false,\"is_primary\":false,\"is_invisible\":false,\"is_global\":false}],\"constraint_info\":null,\"fk_info\":null,\"state\":5,\"pk_is_handle\":true,\"is_common_handle\":false,\"common_handle_version\":0,\"comment\":\"样品实例模板\",\"auto_inc_id\":0,\"auto_id_cache\":0,\"auto_rand_id\":0,\"max_col_id\":12,\"max_idx_id\":2,\"max_cst_id\":0,\"update_timestamp\":424305980881240070,\"ShardRowIDBits\":0,\"max_shard_row_id_bits\":0,\"auto_random_bits\":0,\"pre_split_regions\":0,\"partition\":null,\"compression\":\"\",\"view\":null,\"sequence\":null,\"Lock\":null,\"version\":4,\"tiflash_replica\":{\"Count\":1,\"LocationLabels\":[],\"Available\":false,\"AvailablePartitionIDs\":null},\"is_columnar\":false}"] [thread_id=10]
[2021/04/17 02:47:47.939 +08:00] [INFO] [] ["SchemaBuilder: Updating replica info for lchwtest(51).t_sample_template(56)"] [thread_id=10]
[2021/04/17 02:47:47.943 +08:00] [INFO] [] ["SchemaBuilder: Updated replica info for lchwtest(51).t_sample_template(56)"] [thread_id=10]
[2021/04/17 02:47:47.943 +08:00] [INFO] [] ["SchemaSyncer: end sync schema, version has been updated to 60"] [thread_id=10]

可以看下 tiflash_manage.log 日志文件,看起来可能是 host=‘172.100.0.4’, port=20108 这个机器或者端口不通引起的,可以重点看下哈。

请问解决了么? @ljm000