0

I'm trying to install IBM Cloud Private on a VM. I've created master, proxy, and worker nodes and I'm at the last stage installing the ICP. However, I'm having a problem with the hostnames. The errors are shown below:

The error is below:

TASK [check : Validating Hostname is resolvable]
*******************************************************************
skipping: [172.16.22.190]
fatal: [172.16.22.82] => Hostname should be resolved to a valid IP address
fatal: [172.16.22.81] => Hostname should be resolved to a valid IP address

NO MORE HOSTS LEFT    
********************************************************************************

NO MORE HOSTS LEFT 
********************************************************************************

PLAY RECAP 
********************************************************************************    
172.16.22.190              : ok=4    changed=3    unreachable=0    failed=0
172.16.22.81               : ok=4    changed=3    unreachable=0    failed=1
172.16.22.82               : ok=4    changed=3    unreachable=0    failed=1

Playbook run took 0 days, 0 hours, 0 minutes, 4 seconds

My /etc/hosts file:

172.16.22.190   icp
172.16.22.81    proxy
172.16.22.82    worker

# The following lines are desirable for IPv6 capable hosts
::1     localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

My cluster hosts file:

[master]
172.16.22.190

[worker]
172.16.22.82

[proxy]
172.16.22.81

#[management]
#4.4.4.4

All nodes see and ping each other and I'm using Ubuntu.

ps34
  • 183
  • 1
  • 4
  • 13

5 Answers5

2

It turned out that hostnames of each node had to be same everywhere, not just on the /etc/hosts files of different nodes but also in /etc/hostname file of the node itself. It's a minor but an important mistake you can do if you are installing the server OS from a pre-loaded image :)

ps34
  • 183
  • 1
  • 4
  • 13
1

what about the /etc/hosts file on host 82 and 81?

Di Wang
  • 21
  • 2
  • hosts files are the same. I've recently removed localhost line from each since some people were suggesting it. – ps34 Nov 17 '17 at 13:18
1
  1. You haven't defined a master in the icp hosts file.
  2. The host file needs to be updated on each node, not just master.

My working icp hosts and /etc/hosts and look like this, respectively:

icp hosts file:

[master]
10.121.9.226

[worker]
10.143.76.132
10.143.76.134

[proxy]
10.121.9.226

#[management]
#4.4.4.4

and

10.121.9.226    icpdemo1.xxx.com    icpdemo1
10.143.76.132   icpdemo2.xxx.com    icpdemo2
10.143.76.134   icpdemo3.xxx.com    icpdemo3
Anthony L
  • 11
  • 1
  • Thank you for the comment Anthony. Master node was on the list but wasn't parsed correctly on this website. I'm correcting the formatting now :) – ps34 Nov 19 '17 at 20:15
1

I found out that with Ubuntu it maps the hostname to the localhost address. You need to modify the /etc/hosts file and remove the line that points 127.0.1.1 IP to your hostname and make sure it points to your public IP.

Issen
  • 75
  • 6
0

All nodes of your cluster should be resolved to each other. Make entry of hostnames of cluster nodes in each node /etc/hosts file. IBM OFFICIAL/configuring_your_cluster

GANESH CHOKHARE
  • 316
  • 3
  • 8