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

startup fails because agent looks up default listen hostname (localhost) to the local DNS #424

Closed
Dieterbe opened this issue Apr 1, 2023 · 1 comment

Comments

@Dieterbe
Copy link

Dieterbe commented Apr 1, 2023

latest version in git currently, when trying to start it, this happens:

./dist/synthetic-monitoring-agent -api-server-address synthetic-monitoring-grpc-eu-west.grafana.net:443 -api-token <redacted>
E: listen tcp: lookup localhost on 217.27.32.196:53: no such host

note that:

./dist/synthetic-monitoring-agent --help
Usage of synthetic-monitoring-agent:
(...)
  -listen-address string
    	listen address (default "localhost:4050")
(...)

as a workaround, passing this flag makes it work: -listen-address 127.0.0.1:4050

i don't think 'localhost' should be resolved via dns, though i don't remember the exact mechanics behind this. should we DNS lookup any hostname that is not in /etc/hosts ?
i notice that my /etc/hosts contains this:

# Static table lookup for hostnames.
#
# See hosts(5) for details.
#
# 127.0.0.1       localhost.localdomain   localhost

i expected my system to not have the localhost entry commented out, so perhaps this is a system issue on my end.

@Dieterbe
Copy link
Author

Dieterbe commented Apr 1, 2023

uncommenting the line in /etc/hosts makes it work. it looks like this was a misconfiguration on my system (that an earlier version of the agent handled gracefully somehow)

@Dieterbe Dieterbe closed this as completed Apr 1, 2023
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