j6s / mailcow-exporter

MIT License
56 stars 13 forks source link

server returned HTTP status 400 Bad Request #6

Open NewtTheWolf opened 2 years ago

NewtTheWolf commented 2 years ago

Hello, unfortunately I have the problem that the app does not take the params

I have made a custom location from app:9099/metrics to mail.domain.com/metrics with the Nginx Proxy Manger

when I run it normally under my own domain it works (locally) but when I do it with the custom location it does not work

is it possible that the host is the same as the endpoint?

Screenshots: image

j6s commented 1 year ago

Hi, I am very sorry for the late answer - are you still having this issue? If so, can you provide logs of mailcow-exporter?

NewtTheWolf commented 1 year ago

uhm, my serverstrucktur has changed a lot lately ^^ but if you want I can look that I find time and test it again ^^

j6s commented 1 year ago

If you findthe time, I'd be happy to take a look at the logs to see what's happening.

bit-bat commented 1 year ago

Hi @j6s I experienced the same error message. Here is the log from docker container.

2023/04/01 09:56:06 https://mailcow/api/v1/get/mailq/all
2023/04/01 09:56:06 http: panic serving 192.168.96.11:55506: runtime error: invalid memory address or nil pointer dereference
goroutine 10 [running]:
net/http.(*conn).serve.func1(0xc000194640)
        /usr/local/go/src/net/http/server.go:1801 +0x147
panic(0x8adee0, 0xc5e2e0)
        /usr/local/go/src/runtime/panic.go:975 +0x47a
github.com/j6s/mailcow-exporter/mailcowApi.MailcowApiClient.Get(0x92c264, 0x5, 0xc00002830c, 0x7, 0xc0000282e4, 0x22, 0xc0001ac3f0, 0xc0001ac510, 0xc0001ac600, 0x93185e, ...)
        /build/mailcowApi/client.go:72 +0x503
github.com/j6s/mailcow-exporter/provider.Mailq.Provide(0x92c264, 0x5, 0xc00002830c, 0x7, 0xc0000282e4, 0x22, 0xc0001ac3f0, 0xc0001ac510, 0xc0001ac600, 0x0, ...)
        /build/provider/mailq.go:26 +0x299
main.collectMetrics(0x92c264, 0x5, 0xc00002830c, 0x7, 0xc0000282e4, 0x22, 0x4cdded)
        /build/main.go:53 +0x51b
main.main.func1(0x9bdd00, 0xc0001a81c0, 0xc000196400)
        /build/main.go:105 +0x1ef
net/http.HandlerFunc.ServeHTTP(0x94c688, 0x9bdd00, 0xc0001a81c0, 0xc000196400)
        /usr/local/go/src/net/http/server.go:2042 +0x44
net/http.(*ServeMux).ServeHTTP(0xc6efc0, 0x9bdd00, 0xc0001a81c0, 0xc000196400)
        /usr/local/go/src/net/http/server.go:2417 +0x1ad
net/http.serverHandler.ServeHTTP(0xc0001a8000, 0x9bdd00, 0xc0001a81c0, 0xc000196400)
        /usr/local/go/src/net/http/server.go:2843 +0xa3
net/http.(*conn).serve(0xc000194640, 0x9bec40, 0xc000060fc0)
        /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