Skip to content
This repository has been archived by the owner on Nov 18, 2020. It is now read-only.

Introduce 'rabbitmq-diagnostics resolve_hostname' #431

Merged
merged 3 commits into from
Jun 21, 2020

Conversation

michaelklishin
Copy link
Member

@michaelklishin michaelklishin commented Jun 20, 2020

Helps with troubleshooting host name resolution behavior
on nodes and locally for CLI tools:

rabbitmq-diagnostics resolver_info

rabbitmq-diagnostics resolver_info --offline

rabbitmq-diagnostics resolver_info --formatter=json

rabbitmq-diagnostics resolve_hostname rabbitmq.com

rabbitmq-diagnostics resolve_hostname rabbitmq.com --offline

rabbitmq-diagnostics resolve_hostname rabbitmq.com --offline --formatter=json

This is obviously not meant to be a replacement for existing tools such as dig,
only a way to quickly spot obvious irregularities, e.g. those
in environments that use custom Erlang inetrc files.

Per discussion @harshac.

Helps with troubleshooting hostname resolution behavior
on nodes and locally for CLI tools. This is obviously not meant
to be a replacement for existing tools such as dig, only
a way to quickly spot obvious irregularities, e.g. those
in environments that use custom Erlang inetrc files.

Per discussion @harshac.
To inspect effective inetrc [1] settings used
by a node or CLI tools.

1. https://erlang.org/doc/apps/erts/inet_cfg.html
@michaelklishin michaelklishin force-pushed the mk-hostname-resolution-diagnostics-command branch from 4683e13 to bfda326 Compare June 21, 2020 12:10
@michaelklishin michaelklishin merged commit a874ef6 into master Jun 21, 2020
@michaelklishin michaelklishin deleted the mk-hostname-resolution-diagnostics-command branch June 21, 2020 12:42
@michaelklishin michaelklishin added this to the 3.8.6 milestone Jun 21, 2020
michaelklishin added a commit that referenced this pull request Jun 21, 2020
…ics-command

Introduce 'rabbitmq-diagnostics resolve_hostname'

(cherry picked from commit a874ef6)
@michaelklishin
Copy link
Member Author

Backported to v3.8.x.

@lukebakken
Copy link
Contributor

@michaelklishin these will be handy commands, thanks!

$ cat ~/.erl_inetrc 
{host, {192, 168, 1, 5}, ["shostakovich"]}.

$ ERL_INETRC="/home/lbakken/.erl_inetrc" ./sbin/rabbitmq-diagnostics resolver_info --offline
Displaying effective hostname resolver (inetrc) configuration used by CLI tools...
Runtime Hostname Resolver (inetrc) Settings

Lookup order: native
Hosts file: /etc/hosts
Resolver conf file: /etc/resolv.conf
Cache size: 

inetrc File Host Entries

192.168.1.5 shostakovich

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants