On UNIX when running startagent under hawk/bin, startagent aborts with "Fatal error: Unable to determine host's IP address". How to troubleshoot the error?

On UNIX when running startagent under hawk/bin, startagent aborts with "Fatal error: Unable to determine host's IP address". How to troubleshoot the error?

book

Article ID: KB0091375

calendar_today

Updated On:

Products Versions
TIBCO Hawk -
Not Applicable -

Description

Resolution:
The error comes from startagent script, on Linux for example:

case $OS_TYPE in

  'Linux')
           IP_ADDRESS=`cat /etc/hosts | grep $HOSTNAME | awk '{print
$1}'`
           if [ "${IP_ADDRESS}" = "" ]; then
            echo "Fatal error: Unable to determine host's IP address";
exit 1
           fi


The $HOSTNAME is evaluated as:
HOSTNAME=`hostname`
if [ "$HOSTNAME" = "" ]
then
  HOSTNAME=`uname -n`
fi

The error is a result of when one of the above fails to evaluate to correct value. The steps to troubleshoot is to ask customer to manually carry out the steps like:
> hostname
> name -n
> cat /etc/hosts | grep $HOSTNAME  (setenv HOSTNAME to proper value first)
> cat /etc/hosts | grep $HOSTNAME | awk '{print $1}

The results they get will pin point what causes the IP address evaluation failure.

The steps to troubleshoot on other UNIX platforms are similar, so not repeated here.

Issue/Introduction

On UNIX when running startagent under hawk/bin, startagent aborts with "Fatal error: Unable to determine host's IP address". How to troubleshoot the error?