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

Failed to start the server: no web listen address or systemd socket flag specified #294

Closed
AiDaiP opened this issue Apr 17, 2024 · 1 comment · Fixed by #295
Closed

Failed to start the server: no web listen address or systemd socket flag specified #294

AiDaiP opened this issue Apr 17, 2024 · 1 comment · Fixed by #295

Comments

@AiDaiP
Copy link
Contributor

AiDaiP commented Apr 17, 2024

Hello, I got an error when using the latest version of process-exporter:

./process-exporter
Failed to start the server: no web listen address or systemd socket flag specified

The default value of -web.listen-address is :9256, however, this parameter does not seem to be passed in correctly, and even if I explicitly specify it on the command line, this error still occurs.
The location where I observed the error return is

// go/pkg/mod/github.com/prometheus/exporter-toolkit@v0.11.0/web/tls_config.go
func ListenAndServe(server *http.Server, flags *FlagConfig, logger log.Logger) error {
if flags.WebSystemdSocket == nil && (flags.WebListenAddresses == nil || len(*flags.WebListenAddresses) == 0) {
return ErrNoListeners
}

flags are specified in process-exporter/cmd/process-exporter/main.go

if err := web.ListenAndServe(server, &web.FlagConfig{
WebConfigFile: tlsConfigFile,
}, logger); err != nil {
log.Fatalf("Failed to start the server: %v", err)
os.Exit(1)
}

Only WebConfigFile is set here, but WebListenAddresses is not set. WebListenAddresses is empty by default, so this error is triggered.

@fuster92
Copy link

Same error observed after using 0.7.11, reverting to 0.7.10 fixes the issue.

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

Successfully merging a pull request may close this issue.

2 participants