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

Added IP check compared to host name #36

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

jahhulbert-ccri
Copy link
Contributor

This checks to see if the configured hostname and IP resolve to the same address. If not the datanodes don't like it and it won't init...Most common problem is that the people are setting a short name in /etc/hosts or something like that.

@jahhulbert-ccri
Copy link
Contributor Author

some things like the NUC machines have crazy weird networking that may not work with this...need to verify. @tkunicki can you check on a mac?

@jahhulbert-ccri
Copy link
Contributor Author

@nhambletCCRI or @ellisbjohns take a look...seems useful to others...

@@ -35,6 +35,14 @@ if [[ -z "${CL_BIND_ADDRESS}" ]]; then
CL_BIND_ADDRESS="127.0.0.1"
fi

# compare the two
resolved_ip=$(getent hosts $CL_HOSTNAME | awk '{print $1}')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

getent isn't available on BSD, quick search has me stumped for replacement

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmmm what about another way on a bsd box to get the hostname,ip mappings?

@cne1x
Copy link
Contributor

cne1x commented Nov 18, 2016

Have we done enough testing on the NUCs to confirm that this works?

@jahhulbert-ccri
Copy link
Contributor Author

Should see something like this:
SHUTDOWN_MSG: Shutting down NameNode at /192.168.X.X

instead of localhost.localdomain/127.0.0.1 and it should match as the namenode names...

@jahhulbert-ccri
Copy link
Contributor Author

this is important when running hbase that binds not on 127.x but on the external ip of the box

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

Successfully merging this pull request may close these issues.

3 participants