Skip to content

http panic serving #15

@torblerone

Description

@torblerone

Hello, I've tried your AdminIO setup in Kubernetes and getting some problems. Here is my setup:

MinIO:

Version
2020-10-03T02:19:42Z
Platform
Host: minio-0 | OS: linux | Arch: amd64
Runtime
Version: go1.14.9 | CPUs: 4

AdminIO-API: latest
Config:

- name: ADMINIO_HOST_PORT
  value: 0.0.0.0:8080
- name: MINIO_HOST
  valueFrom:
    secretKeyRef:
      name: s3-secret
      key: host
- name: MINIO_HOST_PORT
  value: $(MINIO_HOST)
- name: MINIO_ACCESS
  valueFrom:
    secretKeyRef:
       name: s3-secret
       key: testu
- name: MINIO_SECRET
  valueFrom:
     secretKeyRef:
        name: s3-secret
        key: testp
- name: ADMINIO_PROBES_ENABLE
  value: "true"
- name: ADMINIO_METRIC_ENABLE
  value: "false"
- name: MINIO_SSL
  value: "false"

Whenever I call the UI (or curl the API on my MINIO_HOST) I'm getting errors in the API logs which always look like this:

[HTTP Server] http: panic serving xxx.xxx.xxx.xxx:xxxxx: runtime error: invalid memory address or nil pointer dereference
goroutine 58 [running]:
net/http.(*conn).serve.func1(0xc00021e640)
	/usr/local/go/src/net/http/server.go:1801 +0x147
panic(0xe40f40, 0x16b71e0)
	/usr/local/go/src/runtime/panic.go:975 +0x3e9
github.com/minio/minio/pkg/madmin.(*AdminClient).DataUsageInfo(0x0, 0x10aa6c0, 0xc0000b8020, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
	/go/pkg/mod/github.com/minio/[email protected]/pkg/madmin/info-commands.go:137 +0x78
github.com/rzrbld/adminio-api/handlers.glob..func32(0xc00011cea0)
	/go/adminio-api/src/handlers/server.go:16 +0x7a
github.com/kataras/iris/v12/context.(*Context).Next(0xc00011cea0)
	/go/pkg/mod/github.com/kataras/iris/[email protected]/context/context.go:510 +0x5c
github.com/iris-contrib/middleware/cors.(*Cors).Serve(0xc000510000, 0xc00011cea0)
	/go/pkg/mod/github.com/iris-contrib/middleware/[email protected]/cors.go:189 +0x165
github.com/kataras/iris/v12/context.(*Context).Do(...)
	/go/pkg/mod/github.com/kataras/iris/[email protected]/context/context.go:392
github.com/kataras/iris/v12/core/router.(*routerHandler).HandleRequest(0xc000505950, 0xc00011cea0)
	/go/pkg/mod/github.com/kataras/iris/[email protected]/core/router/handler.go:406 +0x21a
github.com/kataras/iris/v12/core/router.(*Router).BuildRouter.func3(0x10a7080, 0xc000574380, 0xc000136800)
	/go/pkg/mod/github.com/kataras/iris/[email protected]/core/router/router.go:171 +0x82
github.com/kataras/iris/v12/core/router.(*Router).ServeHTTP(0xc0000bc660, 0x10a7080, 0xc000574380, 0xc000136800)
	/go/pkg/mod/github.com/kataras/iris/[email protected]/core/router/router.go:237 +0x48
net/http.serverHandler.ServeHTTP(0xc00014a000, 0x10a7080, 0xc000574380, 0xc000136800)
	/usr/local/go/src/net/http/server.go:2843 +0xa3
net/http.(*conn).serve(0xc00021e640, 0x10aa680, 0xc000166880)
	/usr/local/go/src/net/http/server.go:1925 +0x8ad
created by net/http.(*Server).Serve
	/usr/local/go/src/net/http/server.go:2969 +0x36c

Do you know any fixes for this problem? Thank you in advance!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions