You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the HTTP server cannot start (such as the listen address is already in-use by another process), the HTTP server fails silently and doesn't generate any error-level logs.
This is related to #364, but slightly more specific, as the user has no signal that anything went wrong, other than self-scraping and scraping exporter components fail.
A reasonable fix here would be to change the code for the runnable scheduler to not ignore errors, or at least explicitly log errors before returning the error in the HTTP service.
Steps to reproduce
Run two Alloy instances running listening on the same listen address.
Observe that the Alloy instance which started second does not have any log lines for now listening for http traffic nor any error indicating failed to listen.
System information
No response
Software version
v1.0.0
Configuration
N/A
Logs
N/A (it's the lack of logs which is the problem 😛)
The text was updated successfully, but these errors were encountered:
This commit modifies the goroutine that starts the HTTP server to explicitly log any errors encountered during startup, except for `http.ErrServerClosed`, which is expected during graceful shutdown. This change ensures that issues related to the server's startup, such as the address already being in use, are logged, making it easier to diagnose and fix.
Closesgrafana#694
What's wrong?
If the HTTP server cannot start (such as the listen address is already in-use by another process), the HTTP server fails silently and doesn't generate any error-level logs.
This is related to #364, but slightly more specific, as the user has no signal that anything went wrong, other than self-scraping and scraping exporter components fail.
Note that the HTTP service does return an error, but this error isn't logged anywhere.
A reasonable fix here would be to change the code for the runnable scheduler to not ignore errors, or at least explicitly log errors before returning the error in the HTTP service.
Steps to reproduce
now listening for http traffic
nor any error indicatingfailed to listen
.System information
No response
Software version
v1.0.0
Configuration
N/A
Logs
N/A (it's the lack of logs which is the problem 😛)
The text was updated successfully, but these errors were encountered: