-
Notifications
You must be signed in to change notification settings - Fork 525
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
apm-server only listens on ipv4 when using 'localhost:8200' as host #1405
Comments
apm-server currently listens on only one of the resolved addresses when the listener is specified by host name, preferring ipv4, per the underlying library implementation. We can turn this into a feature request supporting multiple listeners, perhaps Some options for working around this:
|
Thanks for the clarification. In that case might I suggest to use
Users of APM Server should be made aware that they should not use the hostname |
I've tried both Only by explicitly putting an assigned IPv4 address will it listen correctly. |
@OrangeDog Are you verifying through netstat or sending ipv4 traffic? I don't expect an issue with the latter, since https://codereview.appspot.com/2204048 originally addressed the issue. If you are unable to complete an v4 request to a dual stack listening on |
Checking with netstat. Sorry, you're right it's dual stack and does work fine. |
when I check APM README.md , I found the reason is ES version is 7.0.1 but apm-server is 7.4, so I changed right version(7.0.1 apm),bind 0.0.0.0:80 ,it worked. |
Closing this as users can bind to all interfaces to listen on ipv4 and ipv6 |
…7.0.0.1' rather than 'localhost' Starting in node v17 the defaults for DNS resolution order was changed (nodejs/node#39987) such that `dns.lookup()` no longer sorted IPv4 addresses first. This impacts usage of the *default* APM Server URL (the `serverUrl` config var), 'http://localhost:8200', when using node >=17 because the APM server only binds to the IPv4 address by default (elastic/apm-server#1405). Fixes: #3045
…6 ambiguity The current default APM server URL -- 'http://localhost:8200' -- is ambiguous. "localhost" can resolve to a '127.0.0.1' (IPv4) or '[::1]' (IPv6). At least in Node v17 the default `dns.lookup()` ordering of results was changed to no longer explicitly sort IPv4 addresses first. That means that on systems where the default resolver returns '[::1]' first for "localhost" will result in a broken attempt to talk to a default-configured local APM server: elastic/apm-agent-nodejs#3045 This is because APM server only binds to the IPv4 port: elastic/apm-server#1405
…7.0.0.1' rather than 'localhost' (#3049) Starting in node v17 the defaults for DNS resolution order was changed (nodejs/node#39987) such that `dns.lookup()` no longer sorted IPv4 addresses first. This impacts usage of the *default* APM Server URL (the `serverUrl` config var), 'http://localhost:8200', when using node >=17 because the APM server only binds to the IPv4 address by default (elastic/apm-server#1405). Fixes: #3045 Refs: elastic/apm#727
…6 ambiguity (#727) The current default APM server URL -- 'http://localhost:8200' -- is ambiguous. "localhost" can resolve to a '127.0.0.1' (IPv4) or '[::1]' (IPv6). At least in Node v17 the default `dns.lookup()` ordering of results was changed to no longer explicitly sort IPv4 addresses first. That means that on systems where the default resolver returns '[::1]' first for "localhost" will result in a broken attempt to talk to a default-configured local APM server: elastic/apm-agent-nodejs#3045 This is because APM server only binds to the IPv4 port: elastic/apm-server#1405
…7.0.0.1' rather than 'localhost' (elastic#3049) Starting in node v17 the defaults for DNS resolution order was changed (nodejs/node#39987) such that `dns.lookup()` no longer sorted IPv4 addresses first. This impacts usage of the *default* APM Server URL (the `serverUrl` config var), 'http://localhost:8200', when using node >=17 because the APM server only binds to the IPv4 address by default (elastic/apm-server#1405). Fixes: elastic#3045 Refs: elastic/apm#727
I am using the apm-server-6.4.1-1.x86_64 package for CentOS 7 and noticed that the
apm-server
process only binds to the IPv4 address when usinglocalhost
, even though 'localhost' resolves to both IPv4 and IPv6, and IPv6 is fully enabled and working.config:
For other Elastic services, i.e. Elasticsearch, the process does bind to IPv6 as well:
The text was updated successfully, but these errors were encountered: