Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Non-JSON log line "remote error: tls: unknown certificate" #254

Open
NorseGaud opened this issue Sep 18, 2024 · 1 comment
Open

Non-JSON log line "remote error: tls: unknown certificate" #254

NorseGaud opened this issue Sep 18, 2024 · 1 comment

Comments

@NorseGaud
Copy link

The following are the logs I'm seeing from the prometheus exporter I've built. The last line happens when I launch the landing page/url in my browser. The cert is self-signed so I expect it to maybe warn, but I certainly don't expect it to be non-JSON as I'm passing my logger in and it uses JSON.

	if err := web.ListenAndServe(&http.Server{}, &web.FlagConfig{
		WebListenAddresses: &[]string{server.webListenAddress},
		WebConfigFile:      &server.configFile,
	}, log.Logger); err != nil {
		log.Error(fmt.Sprintf("Error starting web server: %s", err.Error()))
		os.Exit(1)
	}
❯ go run -ldflags="-X main.version=$(cat VERSION) -X main.commit=$(git rev-parse HEAD)" main.go --controller-address http://anka.controller:8090 -web.config.file web.config.yml
{"time":"2024-09-17T20:42:55.378809-05:00","level":"INFO","msg":"Starting Prometheus Exporter for Anka (3.0.1)"}
{"time":"2024-09-17T20:42:55.443433-05:00","level":"INFO","msg":"Serving metrics at :2112/metrics"}
{"time":"2024-09-17T20:42:55.443825-05:00","level":"INFO","msg":"Listening on","address":"[::]:2112"}
{"time":"2024-09-17T20:42:55.444787-05:00","level":"INFO","msg":"TLS is enabled.","http2":true,"address":"[::]:2112"}
2024/09/17 20:43:53 http: TLS handshake error from 127.0.0.1:54574: remote error: tls: unknown certificate

I'm having trouble finding where this comes from though. It seems to be generated from something not using the logger I passed in.

Any recommendations?

@NorseGaud
Copy link
Author

@SuperQ do you know who I need to reach out to in order to get help with this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant