pingcap / tidb-docker-compose

Apache License 2.0
356 stars 155 forks source link

TiSpark's new docker image is not working #30

Closed liufuyang closed 6 years ago

liufuyang commented 6 years ago

Current issue:

TiSpark's new docker image is not working.

Error:

Caused by: com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "Tp" (class com.pingcap.tikv.meta.TiIndexColumn), not marked as ignorable (3 known properties: "name", "length", "offset"])

when doing:

docker-compose exec tispark-master /opt/spark/bin/spark-shell

scala> import org.apache.spark.sql.TiContext
scala> val ti = new TiContext(spark)
scala> ti.tidbMapDatabase("test")

Old comments below, please ignore them for now

It used to work. But I tried to do docker-compose pull earlier then start again, the tidb container failed.

I haven't clean up the old data yet. If you want I can try clean up that and try again.

Current output of docker ps:

94f844024dd9        pingcap/tidb:latest          "/tidb-server --stor…"   13 minutes ago      Restarting (2) 58 seconds ago                                                       tidb-docker-compose_tidb_1

Current docker logs:

2018/07/20 07:44:00.517 printer.go:39: [info] Welcome to TiDB.
2018/07/20 07:44:00.517 printer.go:40: [info] Release Version: v2.1.0-beta-83-g48a42fe
2018/07/20 07:44:00.517 printer.go:41: [info] Git Commit Hash: 48a42fe4242b9fb1e1d274bfe3c3b9df99eba43f
2018/07/20 07:44:00.517 printer.go:42: [info] Git Branch: master
2018/07/20 07:44:00.517 printer.go:43: [info] UTC Build Time:  2018-07-19 03:46:18
2018/07/20 07:44:00.517 printer.go:44: [info] GoVersion:  go version go1.10.2 linux/amd64
2018/07/20 07:44:00.517 printer.go:45: [info] Race Enabled: false
2018/07/20 07:44:00.517 printer.go:46: [info] TiKV Min Version: 2.1.0-alpha.1-ff3dd160846b7d1aed9079c389fc188f7f5ea13e
2018/07/20 07:44:00.518 printer.go:51: [info] Config: {"host":"0.0.0.0","advertise-address":"","port":4000,"store":"tikv","path":"pd0:2379,pd1:2379,pd2:2379","socket":"","lease":"10s","run-ddl":true,"split-table":true,"token-limit":1000,"oom-action":"log","mem-quota-query":34359738368,"enable-streaming":false,"txn-local-latches":{"enabled":false,"capacity":10240000},"lower-case-table-names":2,"log":{"level":"error","format":"text","disable-timestamp":false,"file":{"filename":"","log-rotate":true,"max-size":300,"max-days":0,"max-backups":0},"slow-query-file":"","slow-threshold":300,"expensive-threshold":10000,"query-log-max-len":2048},"security":{"skip-grant-table":false,"ssl-ca":"","ssl-cert":"","ssl-key":"","cluster-ssl-ca":"","cluster-ssl-cert":"","cluster-ssl-key":""},"status":{"report-status":true,"status-port":10080,"metrics-addr":"pushgateway:9091","metrics-interval":15},"performance":{"max-procs":0,"tcp-keep-alive":true,"cross-join":true,"stats-lease":"3s","run-auto-analyze":true,"stmt-count-limit":5000,"feedback-probability":0,"query-feedback-limit":1024,"pseudo-estimate-ratio":0.8},"xprotocol":{"xserver":false,"xhost":"","xport":0,"xsocket":""},"prepared-plan-cache":{"enabled":false,"capacity":100},"opentracing":{"enbale":false,"sampler":{"type":"const","param":1,"sampling-server-url":"","max-operations":0,"sampling-refresh-interval":0},"reporter":{"queue-size":0,"buffer-flush-interval":0,"log-spans":false,"local-agent-host-port":""},"rpc-metrics":false},"proxy-protocol":{"networks":"","header-timeout":5},"tikv-client":{"grpc-connection-count":16,"grpc-keepalive-time":10,"grpc-keepalive-timeout":3,"commit-timeout":"41s"},"binlog":{"binlog-socket":"","write-timeout":"15s","ignore-error":false}}
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x28 pc=0xc55e89]

goroutine 481 [running]:
github.com/pingcap/tidb/table/tables.(*index).truncateIndexValuesIfNeeded(0xc4203db2c0, 0xc420d6e100, 0x1, 0x1, 0x0, 0xc420b2acc8, 0x410139)
    /home/jenkins/workspace/build_tidb_master/go/src/github.com/pingcap/tidb/table/tables/index.go:135 +0x79
github.com/pingcap/tidb/table/tables.(*index).GenIndexKey(0xc4203db2c0, 0xc420541ea0, 0xc420d6e100, 0x1, 0x1, 0x0, 0x0, 0x0, 0x0, 0x1, ...)
    /home/jenkins/workspace/build_tidb_master/go/src/github.com/pingcap/tidb/table/tables/index.go:174 +0x12f
github.com/pingcap/tidb/executor.(*batchChecker).getKeysNeedCheck(0xc420ba05e0, 0x1442020, 0xc420b381c0, 0x14426e0, 0xc4201f9ee0, 0xc420530900, 0x1, 0x1, 0x1, 0xc420b03ee0, ...)
    /home/jenkins/workspace/build_tidb_master/go/src/github.com/pingcap/tidb/executor/batch_checker.go:136 +0x3ea
github.com/pingcap/tidb/executor.(*batchChecker).batchGetInsertKeys(0xc420ba05e0, 0x1442020, 0xc420b381c0, 0x14426e0, 0xc4201f9ee0, 0xc420530900, 0x1, 0x1, 0x2, 0xc)
    /home/jenkins/workspace/build_tidb_master/go/src/github.com/pingcap/tidb/executor/batch_checker.go:170 +0x9e
github.com/pingcap/tidb/executor.(*InsertExec).batchUpdateDupRows(0xc420d6e080, 0xc420530900, 0x1, 0x1, 0xc420b381d0, 0x0)
    /home/jenkins/workspace/build_tidb_master/go/src/github.com/pingcap/tidb/executor/insert.go:119 +0x9a
github.com/pingcap/tidb/executor.(*InsertExec).exec(0xc420d6e080, 0xc420530900, 0x1, 0x1, 0x0, 0x0)
    /home/jenkins/workspace/build_tidb_master/go/src/github.com/pingcap/tidb/executor/insert.go:75 +0x28e
github.com/pingcap/tidb/executor.(*InsertExec).(github.com/pingcap/tidb/executor.exec)-fm(0xc420530900, 0x1, 0x1, 0x3, 0xc420d16510)
    /home/jenkins/workspace/build_tidb_master/go/src/github.com/pingcap/tidb/executor/insert.go:185 +0x48
github.com/pingcap/tidb/executor.(*InsertValues).insertRows(0xc420ba0580, 0xc4203dad20, 0x3, 0x3, 0xc420b2b570, 0x3, 0x3)
    /home/jenkins/workspace/build_tidb_master/go/src/github.com/pingcap/tidb/executor/insert_common.go:198 +0x30d
github.com/pingcap/tidb/executor.(*InsertExec).Next(0xc420d6e080, 0x7f3ddad7d7a0, 0xc4200a8020, 0xc4205308c0, 0x14243c0, 0xc420d6e080)
    /home/jenkins/workspace/build_tidb_master/go/src/github.com/pingcap/tidb/executor/insert.go:187 +0xe4
github.com/pingcap/tidb/executor.(*ExecStmt).handleNoDelayExecutor(0xc4203a5580, 0x7f3ddad7d7a0, 0xc4200a8020, 0x1442020, 0xc420b381c0, 0x14243c0, 0xc420d6e080, 0x7f3ddadbd3b0, 0xc420b381c0, 0x0, ...)
    /home/jenkins/workspace/build_tidb_master/go/src/github.com/pingcap/tidb/executor/adapter.go:267 +0x17a
github.com/pingcap/tidb/executor.(*ExecStmt).Exec(0xc4203a5580, 0x7f3ddad7d7a0, 0xc4200a8020, 0x0, 0x0, 0x0, 0x0)
    /home/jenkins/workspace/build_tidb_master/go/src/github.com/pingcap/tidb/executor/adapter.go:227 +0x4e2
github.com/pingcap/tidb/session.runStmt(0x7f3ddad7d7a0, 0xc4200a8020, 0x1442020, 0xc420b381c0, 0x1421100, 0xc4203a5580, 0x0, 0x0, 0x0, 0x0)
    /home/jenkins/workspace/build_tidb_master/go/src/github.com/pingcap/tidb/session/tidb.go:154 +0x211
github.com/pingcap/tidb/session.(*session).executeStatement(0xc420b381c0, 0x7f3ddad7d7a0, 0xc4200a8020, 0x0, 0x141efc0, 0xc420541e00, 0x1421100, 0xc4203a5580, 0x0, 0x0, ...)
    /home/jenkins/workspace/build_tidb_master/go/src/github.com/pingcap/tidb/session/session.go:739 +0x1e7
github.com/pingcap/tidb/session.(*session).execute(0xc420b381c0, 0x7f3ddad7d7a0, 0xc4200a8020, 0xc420176480, 0x101, 0x0, 0x0, 0x0, 0x0, 0x0)
    /home/jenkins/workspace/build_tidb_master/go/src/github.com/pingcap/tidb/session/session.go:807 +0x7c6
github.com/pingcap/tidb/session.(*session).Execute(0xc420b381c0, 0x7f3ddad7d7a0, 0xc4200a8020, 0xc420176480, 0x101, 0xc420176480, 0x101, 0x40d17d, 0xc42002e000, 0x11c4ee0)
    /home/jenkins/workspace/build_tidb_master/go/src/github.com/pingcap/tidb/session/session.go:756 +0x69
github.com/pingcap/tidb/store/tikv/gcworker.(*GCWorker).saveValueToSysTable(0xc42033f0a0, 0x131868b, 0x13, 0xc4204e2890, 0xf, 0xc42041ff00, 0x1)
    /home/jenkins/workspace/build_tidb_master/go/src/github.com/pingcap/tidb/store/tikv/gcworker/gc_worker.go:877 +0x239
github.com/pingcap/tidb/store/tikv/gcworker.(*GCWorker).checkLeader(0xc42033f0a0, 0x13ff700, 0x0, 0x0)
    /home/jenkins/workspace/build_tidb_master/go/src/github.com/pingcap/tidb/store/tikv/gcworker/gc_worker.go:751 +0x4df
github.com/pingcap/tidb/store/tikv/gcworker.(*GCWorker).tick(0xc42033f0a0, 0x7f3ddad7d7d8, 0xc4204a15c0)
    /home/jenkins/workspace/build_tidb_master/go/src/github.com/pingcap/tidb/store/tikv/gcworker/gc_worker.go:181 +0x40
github.com/pingcap/tidb/store/tikv/gcworker.(*GCWorker).start(0xc42033f0a0, 0x7f3ddad7d7d8, 0xc4204a15c0, 0xc4204e2a00)
    /home/jenkins/workspace/build_tidb_master/go/src/github.com/pingcap/tidb/store/tikv/gcworker/gc_worker.go:135 +0x133
created by github.com/pingcap/tidb/store/tikv/gcworker.(*GCWorker).Start
    /home/jenkins/workspace/build_tidb_master/go/src/github.com/pingcap/tidb/store/tikv/gcworker/gc_worker.go:83 +0x103
liufuyang commented 6 years ago

I removed the old data, start again, now TiDB can starts. Tried to add data by using the data file inside ti-spark-master container, success. Then trying to connect with spark, error happens:

docker-compose exec tispark-master /opt/spark/bin/spark-shell

scala> import org.apache.spark.sql.TiContext
scala> val ti = new TiContext(spark)
scala> ti.tidbMapDatabase("TPCH_001")

com.pingcap.tikv.exception.TiClientInternalException: Invalid JSON value for Type TiTableInfo: {"id":11,"name":{"O":"columns_priv","L":"columns_priv"},"charset":"","collate":"","cols":[{"id":1,"name":{"O":"Host","L":"host"},"offset":0,"origin_default":null,"default":null,"generated_expr_string":"","generated_stored":false,"dependences":null,"type":{"Tp":254,"Flag":3,"Flen":60,"Decimal":0,"Charset":"utf8","Collate":"utf8_bin","Elems":null},"state":5,"comment":""},{"id":2,"name":{"O":"DB","L":"db"},"offset":1,"origin_default":null,"default":null,"generated_expr_string":"","generated_stored":false,"dependences":null,"type":{"Tp":254,"Flag":3,"Flen":64,"Decimal":0,"Charset":"utf8","Collate":"utf8_bin","Elems":null},"state":5,"comment":""},{"id":3,"name":{"O":"User","L":"user"},"offset":2,"origin_default":null,"default":null,"generated_expr_string":"","generated_stored":false,"dependences":null,"type":{"Tp":254,"Flag":3,"Flen":32,"Decimal":0,"Charset":"utf8","Collate":"utf8_bin","Elems":null},"state":5,"comment":""},{"id":4,"name":{"O":"Table_name","L":"table_name"},"offset":3,"origin_default":null,"default":null,"generated_expr_string":"","generated_stored":false,"dependences":null,"type":{"Tp":254,"Flag":3,"Flen":64,"Decimal":0,"Charset":"utf8","Collate":"utf8_bin","Elems":null},"state":5,"comment":""},{"id":5,"name":{"O":"Column_name","L":"column_name"},"offset":4,"origin_default":null,"default":null,"generated_expr_string":"","generated_stored":false,"dependences":null,"type":{"Tp":254,"Flag":3,"Flen":64,"Decimal":0,"Charset":"utf8","Collate":"utf8_bin","Elems":null},"state":5,"comment":""},{"id":6,"name":{"O":"Timestamp","L":"timestamp"},"offset":5,"origin_default":null,"default":"CURRENT_TIMESTAMP","generated_expr_string":"","generated_stored":false,"dependences":null,"type":{"Tp":7,"Flag":128,"Flen":19,"Decimal":0,"Charset":"binary","Collate":"binary","Elems":null},"state":5,"comment":""},{"id":7,"name":{"O":"Column_priv","L":"column_priv"},"offset":6,"origin_default":null,"default":null,"generated_expr_string":"","generated_stored":false,"dependences":null,"type":{"Tp":248,"Flag":0,"Flen":-1,"Decimal":0,"Charset":"utf8","Collate":"utf8_bin","Elems":["Select","Insert","Update"]},"state":5,"comment":""}],"index_info":[{"id":1,"idx_name":{"O":"PRIMARY","L":"primary"},"tbl_name":{"O":"","L":""},"idx_cols":[{"name":{"O":"Host","L":"host"},"offset":0,"length":-1,"Tp":{"Tp":254,"Flag":3,"Flen":60,"Decimal":0,"Charset":"utf8","Collate":"utf8_bin","Elems":null}},{"name":{"O":"DB","L":"db"},"offset":1,"length":-1,"Tp":{"Tp":254,"Flag":3,"Flen":64,"Decimal":0,"Charset":"utf8","Collate":"utf8_bin","Elems":null}},{"name":{"O":"User","L":"user"},"offset":2,"length":-1,"Tp":{"Tp":254,"Flag":3,"Flen":32,"Decimal":0,"Charset":"utf8","Collate":"utf8_bin","Elems":null}},{"name":{"O":"Table_name","L":"table_name"},"offset":3,"length":-1,"Tp":{"Tp":254,"Flag":3,"Flen":64,"Decimal":0,"Charset":"utf8","Collate":"utf8_bin","Elems":null}},{"name":{"O":"Column_name","L":"column_name"},"offset":4,"length":-1,"Tp":{"Tp":254,"Flag":3,"Flen":64,"Decimal":0,"Charset":"utf8","Collate":"utf8_bin","Elems":null}}],"is_unique":true,"is_primary":true,"state":5,"comment":"","index_type":1}],"fk_info":null,"state":5,"pk_is_handle":false,"comment":"","auto_inc_id":0,"max_col_id":7,"max_idx_id":1,"update_timestamp":401624161340358664,"ShardRowIDBits":0,"partition":null}

  at com.pingcap.tikv.catalog.CatalogTransaction.parseFromJson(CatalogTransaction.java:178)
  at com.pingcap.tikv.catalog.CatalogTransaction.getTables(CatalogTransaction.java:160)
  at com.pingcap.tikv.catalog.Catalog$CatalogCache.loadTables(Catalog.java:94)
  at com.pingcap.tikv.catalog.Catalog$CatalogCache.getTable(Catalog.java:88)
  at com.pingcap.tikv.catalog.Catalog.getTable(Catalog.java:168)
  at com.pingcap.tikv.catalog.Catalog.getTable(Catalog.java:162)
  at com.pingcap.tispark.statistics.StatisticsManager.metaTable$lzycompute(StatisticsManager.scala:90)
  at com.pingcap.tispark.statistics.StatisticsManager.metaTable(StatisticsManager.scala:90)
  at com.pingcap.tispark.statistics.StatisticsHelper$.isManagerReady(StatisticsHelper.scala:62)
  at com.pingcap.tispark.statistics.StatisticsManager.loadStatisticsInfo(StatisticsManager.scala:107)
  at org.apache.spark.sql.TiContext$$anonfun$tidbMapDatabase$1$$anonfun$apply$3.apply(TiContext.scala:152)
  at org.apache.spark.sql.TiContext$$anonfun$tidbMapDatabase$1$$anonfun$apply$3.apply(TiContext.scala:148)
  at scala.collection.immutable.List.foreach(List.scala:381)
  at org.apache.spark.sql.TiContext$$anonfun$tidbMapDatabase$1.apply(TiContext.scala:148)
  at org.apache.spark.sql.TiContext$$anonfun$tidbMapDatabase$1.apply(TiContext.scala:147)
  at scala.Option.foreach(Option.scala:257)
  at org.apache.spark.sql.TiContext.tidbMapDatabase(TiContext.scala:147)
  ... 48 elided
Caused by: com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "Tp" (class com.pingcap.tikv.meta.TiIndexColumn), not marked as ignorable (3 known properties: "name", "length", "offset"])
 at [Source: {"id":11,"name":{"O":"columns_priv","L":"columns_priv"},"charset":"","collate":"","cols":[{"id":1,"name":{"O":"Host","L":"host"},"offset":0,"origin_default":null,"default":null,"generated_expr_string":"","generated_stored":false,"dependences":null,"type":{"Tp":254,"Flag":3,"Flen":60,"Decimal":0,"Charset":"utf8","Collate":"utf8_bin","Elems":null},"state":5,"comment":""},{"id":2,"name":{"O":"DB","L":"db"},"offset":1,"origin_default":null,"default":null,"generated_expr_string":"","generated_stored":false,"dependences":null,"type":{"Tp":254,"Flag":3,"Flen":64,"Decimal":0,"Charset":"utf8","Collate":"utf8_bin","Elems":null},"state":5,"comment":""},{"id":3,"name":{"O":"User","L":"user"},"offset":2,"origin_default":null,"default":null,"generated_expr_string":"","generated_stored":false,"dependences":null,"type":{"Tp":254,"Flag":3,"Flen":32,"Decimal":0,"Charset":"utf8","Collate":"utf8_bin","Elems":null},"state":5,"comment":""},{"id":4,"name":{"O":"Table_name","L":"table_name"},"offset":3,"origin_default":null,"default":null,"generated_expr_string":"","generated_stored":false,"dependences":null,"type":{"Tp":254,"Flag":3,"Flen":64,"Decimal":0,"Charset":"utf8","Collate":"utf8_bin","Elems":null},"state":5,"comment":""},{"id":5,"name":{"O":"Column_name","L":"column_name"},"offset":4,"origin_default":null,"default":null,"generated_expr_string":"","generated_stored":false,"dependences":null,"type":{"Tp":254,"Flag":3,"Flen":64,"Decimal":0,"Charset":"utf8","Collate":"utf8_bin","Elems":null},"state":5,"comment":""},{"id":6,"name":{"O":"Timestamp","L":"timestamp"},"offset":5,"origin_default":null,"default":"CURRENT_TIMESTAMP","generated_expr_string":"","generated_stored":false,"dependences":null,"type":{"Tp":7,"Flag":128,"Flen":19,"Decimal":0,"Charset":"binary","Collate":"binary","Elems":null},"state":5,"comment":""},{"id":7,"name":{"O":"Column_priv","L":"column_priv"},"offset":6,"origin_default":null,"default":null,"generated_expr_string":"","generated_stored":false,"dependences":null,"type":{"Tp":248,"Flag":0,"Flen":-1,"Decimal":0,"Charset":"utf8","Collate":"utf8_bin","Elems":["Select","Insert","Update"]},"state":5,"comment":""}],"index_info":[{"id":1,"idx_name":{"O":"PRIMARY","L":"primary"},"tbl_name":{"O":"","L":""},"idx_cols":[{"name":{"O":"Host","L":"host"},"offset":0,"length":-1,"Tp":{"Tp":254,"Flag":3,"Flen":60,"Decimal":0,"Charset":"utf8","Collate":"utf8_bin","Elems":null}},{"name":{"O":"DB","L":"db"},"offset":1,"length":-1,"Tp":{"Tp":254,"Flag":3,"Flen":64,"Decimal":0,"Charset":"utf8","Collate":"utf8_bin","Elems":null}},{"name":{"O":"User","L":"user"},"offset":2,"length":-1,"Tp":{"Tp":254,"Flag":3,"Flen":32,"Decimal":0,"Charset":"utf8","Collate":"utf8_bin","Elems":null}},{"name":{"O":"Table_name","L":"table_name"},"offset":3,"length":-1,"Tp":{"Tp":254,"Flag":3,"Flen":64,"Decimal":0,"Charset":"utf8","Collate":"utf8_bin","Elems":null}},{"name":{"O":"Column_name","L":"column_name"},"offset":4,"length":-1,"Tp":{"Tp":254,"Flag":3,"Flen":64,"Decimal":0,"Charset":"utf8","Collate":"utf8_bin","Elems":null}}],"is_unique":true,"is_primary":true,"state":5,"comment":"","index_type":1}],"fk_info":null,"state":5,"pk_is_handle":false,"comment":"","auto_inc_id":0,"max_col_id":7,"max_idx_id":1,"update_timestamp":401624161340358664,"ShardRowIDBits":0,"partition":null}; line: 1, column: 2314] (through reference chain: com.pingcap.tikv.meta.TiTableInfo["index_info"]->java.util.ArrayList[0]->com.pingcap.tikv.meta.TiIndexInfo["idx_cols"]->java.util.ArrayList[0]->com.pingcap.tikv.meta.TiIndexColumn["Tp"])
  at com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException.from(UnrecognizedPropertyException.java:51)
  at com.fasterxml.jackson.databind.DeserializationContext.reportUnknownProperty(DeserializationContext.java:839)
  at com.fasterxml.jackson.databind.deser.std.StdDeserializer.handleUnknownProperty(StdDeserializer.java:1045)
  at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.handleUnknownProperty(BeanDeserializerBase.java:1352)
  at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.handleUnknownVanilla(BeanDeserializerBase.java:1330)
  at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:228)
  at com.fasterxml.jackson.databind.deser.BeanDeserializer._deserializeUsingPropertyBased(BeanDeserializer.java:402)
  at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.deserializeFromObjectUsingNonDefault(BeanDeserializerBase.java:1099)
  at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserializeFromObject(BeanDeserializer.java:296)
  at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:133)
  at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:245)
  at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:217)
  at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:25)
  at com.fasterxml.jackson.databind.deser.SettableBeanProperty.deserialize(SettableBeanProperty.java:520)
  at com.fasterxml.jackson.databind.deser.BeanDeserializer._deserializeWithErrorWrapping(BeanDeserializer.java:463)
  at com.fasterxml.jackson.databind.deser.BeanDeserializer._deserializeUsingPropertyBased(BeanDeserializer.java:378)
  at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.deserializeFromObjectUsingNonDefault(BeanDeserializerBase.java:1099)
  at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserializeFromObject(BeanDeserializer.java:296)
  at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:133)
  at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:245)
  at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:217)
  at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:25)
  at com.fasterxml.jackson.databind.deser.SettableBeanProperty.deserialize(SettableBeanProperty.java:520)
  at com.fasterxml.jackson.databind.deser.BeanDeserializer._deserializeWithErrorWrapping(BeanDeserializer.java:463)
  at com.fasterxml.jackson.databind.deser.BeanDeserializer._deserializeUsingPropertyBased(BeanDeserializer.java:378)
  at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.deserializeFromObjectUsingNonDefault(BeanDeserializerBase.java:1099)
  at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserializeFromObject(BeanDeserializer.java:296)
  at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:133)
  at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:3736)
  at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:2726)
  at com.pingcap.tikv.catalog.CatalogTransaction.parseFromJson(CatalogTransaction.java:173)
  ... 64 more

scala>

Seems to be the same error mentioned at the end of https://github.com/pingcap/tidb-docker-compose/issues/28

I've got two comments here:

  1. by deleting the old data works now, but this may implicate that other users might encounter issues when they upgrade TiDB version later on.
  2. I wonder if we have some type of high level component tests after image build, which basically runs a script let what I manually did above, to check everything works after we build a certain image. I guess if we do it will prevent a faulty/non-compliant image to be pushed into the docker registry.
liufuyang commented 6 years ago

补充一下image version

(master)$ docker images
REPOSITORY                         TAG                                        IMAGE ID            CREATED             SIZE
pingcap/pd                         latest                                     a644f441ec12        18 hours ago        75.3MB
pingcap/tikv                       latest                                     a493e2d9065d        18 hours ago        159MB
pingcap/tidb                       latest                                     fc9db86d663d        18 hours ago        57.7MB
mirantis/kubeadm-dind-cluster      v1.10                                      37dfc594e239        3 days ago          962MB
pingcap/tispark                    latest                                     fe97acdc8c73        4 days ago          793MB
docker.tradeshift.net/suggest      7f9faa5c506714116eb07ae18118caa1c29295da   7fcbd7802cbb        3 weeks ago         586MB
pingcap/tidb-vision                latest                                     e9b25d9f7bdb        2 months ago        47.6MB
grafana/grafana                    4.6.3                                      5d1d85717268        7 months ago        284MB
prom/prometheus                    v2.0.0                                     67141fa03496        8 months ago        80.2MB
pingcap/tidb-dashboard-installer   v1.0.0                                     c4dbc1379ec7        10 months ago       73.9MB
busybox                            1.26.2                                     c30178c5239f        13 months ago       1.11MB
prom/pushgateway                   v0.3.1                                     434efa6ed9db        20 months ago       13.3MB

If the latest got updated later, I can pull and run again.... (would be nice to have a test doing this in this repo.)

tennix commented 6 years ago

@liufuyang I've added a simple travis ci script in #31

liufuyang commented 6 years ago

@tennix looks great. And yes the tidb can connect now. Is it possible you also add some extra step to do test like these:

docker-compose exec tispark-master /opt/spark/bin/spark-shell

scala> import org.apache.spark.sql.TiContext
scala> val ti = new TiContext(spark)
scala> ti.tidbMapDatabase("test")

I think that's where the error happens now. (see above)

tennix commented 6 years ago

@liufuyang Yeah, I've confirmed that bug with TiSpark developers. Newer tispark docker images will be updated to DockerHub this two days. More tests for tidb-docker-compose will be added later. If you're interested, you can send PRs for more thorough tests.

liufuyang commented 6 years ago

Well I can give a try, I am pretty new to Travis test though :P

tennix commented 6 years ago

TiSpark just released 1.0.1 which fixes TiDB compatibility. And DockerHub TiSpark image is also updated. You can close this issue if the new image works for you.

liufuyang commented 6 years ago

Good. Closing this now as I can now get green build on this PR already. https://github.com/pingcap/tidb-docker-compose/pull/33