During DB2 installation you might get error The hostname is invalid. We get this error if your hostname is not properly configured and mapped to an IP Address which is reachable.
While performing DB2 installation using db2setup command you might get below error screen.
Same solution is valid for error during installation with db2_install command.
To fix this first check your server hostname by executing hostname command
Ping your hostname to check if it responding locally, you will get ping failure.
ping <hostname>
Check /etc/hosts file for mapping for hostname with ip address.
cat /etc/hosts
Correct hostname and IP address mapping in /etc/hosts file by editing /etc/hosts file using vi or any other editor.
After correcting /etc/hosts file, ping your hostname to see if it is responding.
This should fix the issue and you can continue with installation.
If you liked this blog and interested in knowing more about DB2, please subscribe by clicking on Subscribe to ChoudharySumit.com by Email.
I was getting this error! Now it's resolved.
ReplyDeleteThanks for the info!
Thats wonderful..keep visiting :)
DeleteThanks for your support
DeleteIf like me, on Linux, you are setting up a new machine with a new DB2 instance and the machine has the same hostname as the current active machine, you will get this, as the DNS name will resolve to the old machine and not the new one you are setting up.
ReplyDeleteTo get around this problem, I put the DNS name in /etc/local with resolution to 127.0.0.1 for the duration of the install.