openzipkin / zipkin

Zipkin is a distributed tracing system
https://zipkin.io/
Apache License 2.0
17.02k stars 3.09k forks source link

insert ignore into `zipkin_annotations` data too long for column 'name' #2440

Closed anboo closed 5 years ago

anboo commented 5 years ago

I have error:

2019-03-12 21:32:38.727 DEBUG 1 --- [         task-5] z.s.i.ZipkinHttpCollector                : Cannot store spans [1a2e2be0635a4ac7/1a2e2be0635a4ac7] due to DataAccessException(SQL [insert ignore into `zipkin_annotations` (`trace_id`, `span_id`, `a_key`, `a_type`, `a_timestamp`, `endpoint_service_name`) values (1886493536654346951, 1886493536654346951, 'ss', -1, 1552426358574625, 'complaints.lmprod.media5.com')]; (conn=22) Data too long for column 'name' at row 1)
zipkin                      | 
zipkin                      | org.jooq.exception.DataAccessException: SQL [insert ignore into `zipkin_annotations` (`trace_id`, `span_id`, `a_key`, `a_type`, `a_timestamp`, `endpoint_service_name`) values (1886493536654346951, 1886493536654346951, 'ss', -1, 1552426358574625, 'complaints.lmprod.media5.com')]; (conn=22) Data too long for column 'name' at row 1
zipkin                      |   at org.jooq_3.11.9.MYSQL.debug(Unknown Source) ~[?:?]
zipkin                      |   at org.jooq.impl.Tools.translate(Tools.java:2384) ~[jooq-3.11.9.jar!/:?]
zipkin                      |   at org.jooq.impl.DefaultExecuteContext.sqlException(DefaultExecuteContext.java:832) ~[jooq-3.11.9.jar!/:?]
zipkin                      |   at org.jooq.impl.BatchMultiple.execute(BatchMultiple.java:123) ~[jooq-3.11.9.jar!/:?]
zipkin                      |   at org.jooq.impl.BatchMultiple.execute(BatchMultiple.java:75) ~[jooq-3.11.9.jar!/:?]
zipkin                      |   at zipkin2.storage.mysql.v1.MySQLSpanConsumer$BatchInsertSpans.apply(MySQLSpanConsumer.java:167) ~[zipkin-storage-mysql-v1-2.12.5.jar!/:?]
zipkin                      |   at zipkin2.storage.mysql.v1.MySQLSpanConsumer$BatchInsertSpans.apply(MySQLSpanConsumer.java:58) ~[zipkin-storage-mysql-v1-2.12.5.jar!/:?]
zipkin                      |   at zipkin2.storage.mysql.v1.DataSourceCall.doExecute(DataSourceCall.java:57) ~[zipkin-storage-mysql-v1-2.12.5.jar!/:?]
zipkin                      |   at zipkin2.storage.mysql.v1.DataSourceCall$1CallbackRunnable.run(DataSourceCall.java:69) [zipkin-storage-mysql-v1-2.12.5.jar!/:?]
zipkin                      |   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
zipkin                      |   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
zipkin                      |   at java.lang.Thread.run(Thread.java:834) [?:?]
zipkin                      | Caused by: java.sql.BatchUpdateException: (conn=22) Data too long for column 'name' at row 1
zipkin                      |   at org.mariadb.jdbc.MariaDbStatement.executeBatchExceptionEpilogue(MariaDbStatement.java:288) ~[mariadb-java-client-2.4.0.jar!/:?]
zipkin                      |   at org.mariadb.jdbc.MariaDbStatement.executeBatch(MariaDbStatement.java:1296) ~[mariadb-java-client-2.4.0.jar!/:?]
zipkin                      |   at com.zaxxer.hikari.pool.ProxyStatement.executeBatch(ProxyStatement.java:128) ~[HikariCP-3.3.1.jar!/:?]
zipkin                      |   at com.zaxxer.hikari.pool.HikariProxyStatement.executeBatch(HikariProxyStatement.java) ~[HikariCP-3.3.1.jar!/:?]
zipkin                      |   at org.jooq.tools.jdbc.DefaultStatement.executeBatch(DefaultStatement.java:100) ~[jooq-3.11.9.jar!/:?]
zipkin                      |   at org.jooq.tools.jdbc.DefaultStatement.executeBatch(DefaultStatement.java:100) ~[jooq-3.11.9.jar!/:?]
zipkin                      |   at org.jooq.impl.BatchMultiple.execute(BatchMultiple.java:104) ~[jooq-3.11.9.jar!/:?]
zipkin                      |   ... 8 more

But zipkin_annotations there is no field name. Why i see this error? How fix it?

After that Zipkin UI becomes empty: image

codefromthecrypt commented 5 years ago

my guess is that the driver is not putting the line in batch that had validation problem up top. the span name is 255 char I believe. you can change your ddl but anyway span names that big hint of a cardinality problem

On Tue, Mar 12, 2019, 2:43 PM Daniel Andreyev notifications@github.com wrote:

I have error:

2019-03-12 21:32:38.727 DEBUG 1 --- [ task-5] z.s.i.ZipkinHttpCollector : Cannot store spans [1a2e2be0635a4ac7/1a2e2be0635a4ac7] due to DataAccessException(SQL [insert ignore into zipkin_annotations (trace_id, span_id, a_key, a_type, a_timestamp, endpoint_service_name) values (1886493536654346951, 1886493536654346951, 'ss', -1, 1552426358574625, 'complaints.lmprod.media5.com')]; (conn=22) Data too long for column 'name' at row 1) zipkin | zipkin | org.jooq.exception.DataAccessException: SQL [insert ignore into zipkin_annotations (trace_id, span_id, a_key, a_type, a_timestamp, endpoint_service_name) values (1886493536654346951, 1886493536654346951, 'ss', -1, 1552426358574625, 'complaints.lmprod.media5.com')]; (conn=22) Data too long for column 'name' at row 1 zipkin | at org.jooq_3.11.9.MYSQL.debug(Unknown Source) ~[?:?] zipkin | at org.jooq.impl.Tools.translate(Tools.java:2384) ~[jooq-3.11.9.jar!/:?] zipkin | at org.jooq.impl.DefaultExecuteContext.sqlException(DefaultExecuteContext.java:832) ~[jooq-3.11.9.jar!/:?] zipkin | at org.jooq.impl.BatchMultiple.execute(BatchMultiple.java:123) ~[jooq-3.11.9.jar!/:?] zipkin | at org.jooq.impl.BatchMultiple.execute(BatchMultiple.java:75) ~[jooq-3.11.9.jar!/:?] zipkin | at zipkin2.storage.mysql.v1.MySQLSpanConsumer$BatchInsertSpans.apply(MySQLSpanConsumer.java:167) ~[zipkin-storage-mysql-v1-2.12.5.jar!/:?] zipkin | at zipkin2.storage.mysql.v1.MySQLSpanConsumer$BatchInsertSpans.apply(MySQLSpanConsumer.java:58) ~[zipkin-storage-mysql-v1-2.12.5.jar!/:?] zipkin | at zipkin2.storage.mysql.v1.DataSourceCall.doExecute(DataSourceCall.java:57) ~[zipkin-storage-mysql-v1-2.12.5.jar!/:?] zipkin | at zipkin2.storage.mysql.v1.DataSourceCall$1CallbackRunnable.run(DataSourceCall.java:69) [zipkin-storage-mysql-v1-2.12.5.jar!/:?] zipkin | at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?] zipkin | at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?] zipkin | at java.lang.Thread.run(Thread.java:834) [?:?] zipkin | Caused by: java.sql.BatchUpdateException: (conn=22) Data too long for column 'name' at row 1 zipkin | at org.mariadb.jdbc.MariaDbStatement.executeBatchExceptionEpilogue(MariaDbStatement.java:288) ~[mariadb-java-client-2.4.0.jar!/:?] zipkin | at org.mariadb.jdbc.MariaDbStatement.executeBatch(MariaDbStatement.java:1296) ~[mariadb-java-client-2.4.0.jar!/:?] zipkin | at com.zaxxer.hikari.pool.ProxyStatement.executeBatch(ProxyStatement.java:128) ~[HikariCP-3.3.1.jar!/:?] zipkin | at com.zaxxer.hikari.pool.HikariProxyStatement.executeBatch(HikariProxyStatement.java) ~[HikariCP-3.3.1.jar!/:?] zipkin | at org.jooq.tools.jdbc.DefaultStatement.executeBatch(DefaultStatement.java:100) ~[jooq-3.11.9.jar!/:?] zipkin | at org.jooq.tools.jdbc.DefaultStatement.executeBatch(DefaultStatement.java:100) ~[jooq-3.11.9.jar!/:?] zipkin | at org.jooq.impl.BatchMultiple.execute(BatchMultiple.java:104) ~[jooq-3.11.9.jar!/:?] zipkin | ... 8 more

But zipkin_annotations there is no field name. Why i see this error? How fix it?

After that Zipkin UI becomes empty: [image: image] https://user-images.githubusercontent.com/7625387/54238215-eab13080-4528-11e9-881b-193ae5653036.png

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/openzipkin/zipkin/issues/2440, or mute the thread https://github.com/notifications/unsubscribe-auth/AAD61whLD9TaokStm9gA5JicMR1fG51kks5vWB-bgaJpZM4br8de .