Anmol Gupta
09/17/2024, 1:50 PM24.1.2.5
schema migrator image <http://docker.io/signoz/signoz-schema-migrator:0.102.8|docker.io/signoz/signoz-schema-migrator:0.102.8>
gives me the error as
clickhouse migrate failed to run, error: Dirty database version 16. Fix and force version.
is it necessary for me to have Database version 16
?Anmol Gupta
09/17/2024, 2:11 PMPrashant Shahi
09/17/2024, 3:02 PMnitya-signoz
09/17/2024, 3:19 PMAnmol Gupta
09/17/2024, 3:33 PMnitya-signoz
09/17/2024, 3:35 PMclickhouse client
• run drop database signoz_traces
Once done re-run the migrator. Also do monitor the logs of the first run of the migrator it will contain more details of what happened if it fails again.Anmol Gupta
09/17/2024, 3:40 PM{"level":"error","timestamp":"2024-09-17T15:38:56.657Z","caller":"migrationmanager/manager.go:81","msg":"Failed to run migrations for migrator","component":"migrationmanager","migrator":"traces","error":"clickhouse migrate failed to run, error: migration failed in line 0: \n\n\n\nCREATE MATERIALIZED VIEW IF NOT EXISTS signoz_traces.dependency_graph_minutes_service_calls_mv ON CLUSTER cluster\nTO signoz_traces.dependency_graph_minutes AS\nSELECT\n A.serviceName as src,\n B.serviceName as dest,\n quantilesState(0.5, 0.75, 0.9, 0.95, 0.99)(toFloat64(B.durationNano)) as duration_quantiles_state,\n countIf(B.statusCode=2) as error_count,\n count(*) as total_count,\n toStartOfMinute(B.timestamp) as timestamp\nFROM signoz_traces.signoz_index_v2 AS A, signoz_traces.signoz_index_v2 AS B\nWHERE (A.serviceName != B.serviceName) AND (A.spanID = B.parentSpanID)\nGROUP BY timestamp, src, dest; (details: code: 47, message: Unknown identifier: B.timestamp; there are columns: timestamp, serviceName, B.serviceName, quantilesState(0.5, 0.75, 0.9, 0.95, 0.99)(toFloat64(B.durationNano)), countIf(equals(B.statusCode, 2)), count(): While processing serviceName AS src, B.serviceName AS dest, quantilesState(0.5, 0.75, 0.9, 0.95, 0.99)(toFloat64(B.durationNano)) AS duration_quantiles_state, countIf(B.statusCode = 2) AS error_count, count() AS total_count, toStartOfMinute(B.timestamp) AS timestamp)","stacktrace":"<http://github.com/SigNoz/signoz-otel-collector/migrationmanager.(*MigrationManager).Migrate|github.com/SigNoz/signoz-otel-collector/migrationmanager.(*MigrationManager).Migrate>\n\t/home/runner/work/signoz-otel-collector/signoz-otel-collector/migrationmanager/manager.go:81\nmain.main\n\t/home/runner/work/signoz-otel-collector/signoz-otel-collector/cmd/signozschemamigrator/migrate.go:126\nruntime.main\n\t/opt/hostedtoolcache/go/1.21.13/x64/src/runtime/proc.go:267"}
{"level":"fatal","timestamp":"2024-09-17T15:38:56.657Z","caller":"signozschemamigrator/migrate.go:128","msg":"Failed to run migrations","component":"migrate cli","error":"clickhouse migrate failed to run, error: migration failed in line 0: \n\n\n\nCREATE MATERIALIZED VIEW IF NOT EXISTS signoz_traces.dependency_graph_minutes_service_calls_mv ON CLUSTER cluster\nTO signoz_traces.dependency_graph_minutes AS\nSELECT\n A.serviceName as src,\n B.serviceName as dest,\n quantilesState(0.5, 0.75, 0.9, 0.95, 0.99)(toFloat64(B.durationNano)) as duration_quantiles_state,\n countIf(B.statusCode=2) as error_count,\n count(*) as total_count,\n toStartOfMinute(B.timestamp) as timestamp\nFROM signoz_traces.signoz_index_v2 AS A, signoz_traces.signoz_index_v2 AS B\nWHERE (A.serviceName != B.serviceName) AND (A.spanID = B.parentSpanID)\nGROUP BY timestamp, src, dest; (details: code: 47, message: Unknown identifier: B.timestamp; there are columns: timestamp, serviceName, B.serviceName, quantilesState(0.5, 0.75, 0.9, 0.95, 0.99)(toFloat64(B.durationNano)), countIf(equals(B.statusCode, 2)), count(): While processing serviceName AS src, B.serviceName AS dest, quantilesState(0.5, 0.75, 0.9, 0.95, 0.99)(toFloat64(B.durationNano)) AS duration_quantiles_state, countIf(B.statusCode = 2) AS error_count, count() AS total_count, toStartOfMinute(B.timestamp) AS timestamp)","stacktrace":"main.main\n\t/home/runner/work/signoz-otel-collector/signoz-otel-collector/cmd/signozschemamigrator/migrate.go:128\nruntime.main\n\t/opt/hostedtoolcache/go/1.21.13/x64/src/runtime/proc.go:267"}
nitya-signoz
09/17/2024, 3:44 PMSrikanth Chekuri
09/17/2024, 5:18 PMcode: 47, message: Unknown identifier: B.timestamp; there are columns: timestamp, serviceName, B.serviceName, quantilesState(0.5, 0.75, 0.9, 0.95, 0.99)(toFloat64(B.durationNano)), countIf(equals(B.statusCode, 2)), count()This is strange. It works. Can you share more details about the how you are using ClickHouse?
Anmol Gupta
09/17/2024, 5:36 PMaltinity-clickhouse-operator
on my eksAnmol Gupta
09/17/2024, 7:12 PMexternalClickhouse
Anmol Gupta
09/17/2024, 10:55 PMclickhouse/clickhouse-server:24.1.2-alpine
this image for clickhouseAnmol Gupta
09/18/2024, 9:58 PM