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

Special values for network.host: bogus documentation, confusing error messages #65978

Closed
jelmd opened this issue Dec 7, 2020 · 4 comments · Fixed by #66013
Closed

Special values for network.host: bogus documentation, confusing error messages #65978

jelmd opened this issue Dec 7, 2020 · 4 comments · Fixed by #66013
Labels
>bug :Distributed Coordination/Network Http and internode communication implementations >docs General docs changes Team:Distributed (Obsolete) Meta label for distributed team (obsolete). Replaced by Distributed Indexing/Coordination. Team:Docs Meta label for docs team

Comments

@jelmd
Copy link

jelmd commented Dec 7, 2020

The (documentation)[https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-network.html#network-interface-values] is really confusing wrt. _[networkInterface]_. If e.g.
one uses network.publish_host: _[ hellas1 ]_ one gets strange error messages like

org.elasticsearch.transport.BindTransportException: Failed to resolve publish address
...
Caused by: java.lang.IllegalArgumentException: No interface named '[name:hellas1 (hellas1)]' found, got [name:lo (lo), name:hellas0 (hellas0), name:hellas1 (hellas1)]
...
org.elasticsearch.bootstrap.StartupException: BindTransportException[Failed to resolve publish address]; nested: IllegalArgumentException[No interface named '[name:hellas1 (hellas1)]' found, got [name:lo (lo), name:hellas0 (hellas0), name:hellas1 (hellas1)]];

And now the casual user wonders: What the heck do they expect wrt. NIC name[s] for the network.publish_host argument? _[ name:hellas1 (hellas1) ]_?

@jelmd jelmd added >bug needs:triage Requires assignment of a team area label labels Dec 7, 2020
@DaveCTurner
Copy link
Contributor

It's tricky to think how else to represent this option in the docs; if we just said _networkInterface_ then it seems just as likely that someone would write literally that and encounter the same error. IMO the best we can do is show an example, as we do today:

_[networkInterface]_
. Addresses of a network interface, for example _en0_.

In your case your interface is called hellas1 so, extrapolating from this example, you should write network.host: _hellas1_.

@DaveCTurner DaveCTurner added :Distributed Coordination/Network Http and internode communication implementations >docs General docs changes labels Dec 7, 2020
@elasticmachine elasticmachine added Team:Distributed (Obsolete) Meta label for distributed team (obsolete). Replaced by Distributed Indexing/Coordination. Team:Docs Meta label for docs team labels Dec 7, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-distributed (Team:Distributed)

@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-docs (Team:Docs)

@DaveCTurner DaveCTurner added Team:Distributed (Obsolete) Meta label for distributed team (obsolete). Replaced by Distributed Indexing/Coordination. Team:Docs Meta label for docs team and removed Team:Distributed (Obsolete) Meta label for distributed team (obsolete). Replaced by Distributed Indexing/Coordination. Team:Docs Meta label for docs team needs:triage Requires assignment of a team area label labels Dec 7, 2020
@jelmd
Copy link
Author

jelmd commented Dec 7, 2020

Hmmm, but I do not see any _[ ]_ in your suggestion. You suggest to just prefix + suffix the NIC name with an underline and use that one - that's not, what the documentation says. Also the documented example does not align with _[networkInterface]_ at all! [_networkInterface_] would and in the Unix world [ _networkInterface_ ... ] would describe it even better, if one adds a note, that `[]_' are literals ...

DaveCTurner added a commit to DaveCTurner/elasticsearch that referenced this issue Dec 8, 2020
Today we document the use of `_[networkInterface]_` to specify the
addresses of a network interface but do not spell out which parts of
this syntax should be taken literally and which are part of the
placeholder for the interface name. If you get it wrong then the
exception message is confusing too since it uses the results of
`NetworkInterface#toString()` which contains much more than just the
name of the interface.

This commit clarifies the docs and the exception message.

Closes elastic#65978.
DaveCTurner added a commit that referenced this issue Dec 9, 2020
Today we document the use of `_[networkInterface]_` to specify the
addresses of a network interface but do not spell out which parts of
this syntax should be taken literally and which are part of the
placeholder for the interface name. If you get it wrong then the
exception message is confusing too since it uses the results of
`NetworkInterface#toString()` which contains much more than just the
name of the interface.

This commit clarifies the docs and the exception message.

Closes #65978.
DaveCTurner added a commit that referenced this issue Dec 9, 2020
Today we document the use of `_[networkInterface]_` to specify the
addresses of a network interface but do not spell out which parts of
this syntax should be taken literally and which are part of the
placeholder for the interface name. If you get it wrong then the
exception message is confusing too since it uses the results of
`NetworkInterface#toString()` which contains much more than just the
name of the interface.

This commit clarifies the docs and the exception message.

Closes #65978.
DaveCTurner added a commit that referenced this issue Dec 9, 2020
Today we document the use of `_[networkInterface]_` to specify the
addresses of a network interface but do not spell out which parts of
this syntax should be taken literally and which are part of the
placeholder for the interface name.

This commit clarifies the docs.

NB this is a backport of just the docs changes from #66013.

Closes #65978.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug :Distributed Coordination/Network Http and internode communication implementations >docs General docs changes Team:Distributed (Obsolete) Meta label for distributed team (obsolete). Replaced by Distributed Indexing/Coordination. Team:Docs Meta label for docs team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants