influxdata / influxdb-observability

MIT License
48 stars 23 forks source link

demo project 405 (Method Not Allowed) #294

Closed simoneromano96 closed 8 months ago

simoneromano96 commented 8 months ago

Hello, I'm trying to setup influxdb as a db for my traces. While the traces are correctly pushed by the collector, Jaeger ui gives an error. I believe there is something wrong in the jaeger-influxdb address, but I'm not sure.

I'm using influx db cloud InfluxDB Cloud powered by TSMStorage Engine Version 2 (167c4c6)

image

The following is the docker-compose that I'm using.

services:
  jaeger-query:
    image: jaegertracing/jaeger-query:1.49
    stop_grace_period: 10s
    ports:
      - "16686:16686" # web UI
    depends_on:
      - jaeger-influxdb
    environment:
      LOG_LEVEL: debug
      SPAN_STORAGE_TYPE: grpc-plugin
      GRPC_STORAGE_SERVER: jaeger-influxdb:17271
      GRPC_STORAGE_CONNECTION_TIMEOUT: 30s
      # QUERY_HTTP_SERVER_HOST_PORT: :16686
      # ADMIN_HTTP_HOST_PORT: :16687
      QUERY_UI_CONFIG: /jaeger-ui-config.json
    volumes:
      - ./jaeger-ui-config.json:/jaeger-ui-config.json:ro

  jaeger-influxdb:
    image: jacobmarble/jaeger-influxdb:0.5.9
    stop_grace_period: 10s
    environment:
      LOG_LEVEL: debug
      LISTEN_ADDR: :17271
      INFLUXDB_TIMEOUT: 30s
      INFLUXDB_ADDR: "us-central1-1.gcp.cloud2.influxdata.com"
      INFLUXDB_BUCKET: "beta-opentelemetry"
      INFLUXDB_BUCKET_ARCHIVE: "beta-opentelemetry-archive"
      INFLUXDB_TOKEN: [REDACTED]

  hotrod:
    image: jaegertracing/example-hotrod:1.41
    stop_grace_period: 1s
    ports:
      - "8080:8080" # web UI
    depends_on:
      - otelcol-influxdb
    environment:
      JAEGER_AGENT_HOST: otelcol-influxdb
      JAEGER_AGENT_PORT: 6831

  otelcol-influxdb:
    image: otel/opentelemetry-collector-contrib:0.87.0
    command: ["--config", "/config.yml"]
    stop_grace_period: 10s
    volumes:
      - ./otelcol-config.yml:/config.yml:ro

Logs of the containers with DEBUG level.

jaeger-influxdb-1   | {"level":"debug","ts":1709289390.728273,"caller":"internal/influxdb.go:218","msg":"executing query","query":"SELECT \"service.name\" FROM 'calls__sum' GROUP BY \"service.name\""}
jaeger-influxdb-1   | {"level":"debug","ts":1709289390.7285042,"caller":"internal/influxdb.go:218","msg":"executing query","query":"SELECT \"span.name\", \"span.kind\" FROM 'calls__sum' WHERE \"service.name\" = 'sawmill-be' GROUP BY \"span.name\", \"span.kind\""}
jaeger-influxdb-1   | {"level":"error","ts":1709289391.6135364,"caller":"jaeger-influxdb/main.go:110","msg":"gRPC interceptor","error":"Unknown: SqlState: \u0000\u0000\u0000\u0000\u0000, msg: [FlightSQL] unexpected HTTP status code received from server: 405 (Method Not Allowed); transport: received unexpected content-type \"text/html\" (Unknown; ExecuteQuery)","stacktrace":"main.run.func1\n\t/project/jaeger-influxdb/cmd/jaeger-influxdb/main.go:110\ngithub.com/jaegertracing/jaeger/proto-gen/storage_v1._SpanReaderPlugin_GetServices_Handler\n\t/go/pkg/mod/github.com/jaegertracing/jaeger@v1.49.0/proto-gen/storage_v1/storage.pb.go:1487\ngoogle.golang.org/grpc.(*Server).processUnaryRPC\n\t/go/pkg/mod/google.golang.org/grpc@v1.57.0/server.go:1360\ngoogle.golang.org/grpc.(*Server).handleStream\n\t/go/pkg/mod/google.golang.org/grpc@v1.57.0/server.go:1737\ngoogle.golang.org/grpc.(*Server).serveStreams.func1.1\n\t/go/pkg/mod/google.golang.org/grpc@v1.57.0/server.go:982"}

jaeger-query-1      | {"level":"error","ts":1709289391.6137898,"caller":"app/http_handler.go:493","msg":"HTTP handler, Internal Server Error","error":"plugin error: rpc error: code = Unknown desc = Unknown: SqlState: \u0000\u0000\u0000\u0000\u0000, msg: [FlightSQL] unexpected HTTP status code received from server: 405 (Method Not Allowed); transport: received unexpected content-type \"text/html\" (Unknown; ExecuteQuery)","stacktrace":"github.com/jaegertracing/jaeger/cmd/query/app.(*APIHandler).handleError\n\tgithub.com/jaegertracing/jaeger/cmd/query/app/http_handler.go:493\ngithub.com/jaegertracing/jaeger/cmd/query/app.(*APIHandler).getServices\n\tgithub.com/jaegertracing/jaeger/cmd/query/app/http_handler.go:164\nnet/http.HandlerFunc.ServeHTTP\n\tnet/http/server.go:2136\ngithub.com/jaegertracing/jaeger/cmd/query/app.(*APIHandler).handleFunc.traceResponseHandler.func2\n\tgithub.com/jaegertracing/jaeger/cmd/query/app/http_handler.go:537\nnet/http.HandlerFunc.ServeHTTP\n\tnet/http/server.go:2136\ngithub.com/jaegertracing/jaeger/cmd/query/app.(*APIHandler).handleFunc.WithRouteTag.func3\n\tgo.opentelemetry.io/contrib/instrumentation/net/http/otelhttp@v0.43.0/handler.go:273\nnet/http.HandlerFunc.ServeHTTP\n\tnet/http/server.go:2136\ngo.opentelemetry.io/contrib/instrumentation/net/http/otelhttp.(*middleware).serveHTTP\n\tgo.opentelemetry.io/contrib/instrumentation/net/http/otelhttp@v0.43.0/handler.go:217\ngo.opentelemetry.io/contrib/instrumentation/net/http/otelhttp.NewMiddleware.func1.1\n\tgo.opentelemetry.io/contrib/instrumentation/net/http/otelhttp@v0.43.0/handler.go:81\nnet/http.HandlerFunc.ServeHTTP\n\tnet/http/server.go:2136\nnet/http.HandlerFunc.ServeHTTP\n\tnet/http/server.go:2136\ngithub.com/gorilla/mux.(*Router).ServeHTTP\n\tgithub.com/gorilla/mux@v1.8.0/mux.go:210\ngithub.com/jaegertracing/jaeger/cmd/query/app.createHTTPServer.additionalHeadersHandler.func4\n\tgithub.com/jaegertracing/jaeger/cmd/query/app/additional_headers_handler.go:28\nnet/http.HandlerFunc.ServeHTTP\n\tnet/http/server.go:2136\ngithub.com/jaegertracing/jaeger/cmd/query/app.createHTTPServer.CompressHandler.CompressHandlerLevel.func6\n\tgithub.com/gorilla/handlers@v1.5.1/compress.go:141\nnet/http.HandlerFunc.ServeHTTP\n\tnet/http/server.go:2136\ngithub.com/gorilla/handlers.recoveryHandler.ServeHTTP\n\tgithub.com/gorilla/handlers@v1.5.1/recovery.go:78\nnet/http.serverHandler.ServeHTTP\n\tnet/http/server.go:2938\nnet/http.(*conn).serve\n\tnet/http/server.go:2009"}

jaeger-influxdb-1   | {"level":"error","ts":1709289391.6210887,"caller":"jaeger-influxdb/main.go:110","msg":"gRPC interceptor","error":"Unknown: SqlState: \u0000\u0000\u0000\u0000\u0000, msg: [FlightSQL] unexpected HTTP status code received from server: 405 (Method Not Allowed); transport: received unexpected content-type \"text/html\" (Unknown; ExecuteQuery)","stacktrace":"main.run.func1\n\t/project/jaeger-influxdb/cmd/jaeger-influxdb/main.go:110\ngithub.com/jaegertracing/jaeger/proto-gen/storage_v1._SpanReaderPlugin_GetOperations_Handler\n\t/go/pkg/mod/github.com/jaegertracing/jaeger@v1.49.0/proto-gen/storage_v1/storage.pb.go:1505\ngoogle.golang.org/grpc.(*Server).processUnaryRPC\n\t/go/pkg/mod/google.golang.org/grpc@v1.57.0/server.go:1360\ngoogle.golang.org/grpc.(*Server).handleStream\n\t/go/pkg/mod/google.golang.org/grpc@v1.57.0/server.go:1737\ngoogle.golang.org/grpc.(*Server).serveStreams.func1.1\n\t/go/pkg/mod/google.golang.org/grpc@v1.57.0/server.go:982"}
simoneromano96 commented 8 months ago

It looks like Storage Engine Version 2 doesn't support FlightSQL and I believe it's the root of the issue, I cannot find a way to create a storage engine version 3, I guess it's more a billing/account/organization problem or something rather than an issue with the plugin.

simoneromano96 commented 8 months ago

I'm closing the issue since I've been confirmed that InfluDB with storage engine V3 is currently supported only in AWS.