[ 
https://issues.apache.org/jira/browse/HAWQ-235?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15047955#comment-15047955
 ] 

Zhanwei Wang commented on HAWQ-235:
-----------------------------------

There are two issues:

In /data/hawq-devel/bin/lib/hawqinit.sh

1) os_version failed to set 7 on centos7

{code}
if [ -f /etc/redhat-release ]; then
    os_version=`${CAT} /etc/redhat-release | ${AWK} '{print substr($7,0,1)}'`
else
    os_version='other'
fi
{code}

2) should check if standby_ip_address_all is empty after the execution.

{code}
if [ "${os_version}" = "7" ];then
    master_ip_address_all=`${SSH} ${master_host_name} "${IFCONFIG} |${GREP} -v 
'127.0.0' | ${GREP} 'inet '|${AWK} '{print \\$2}'"`
    if [ "${standby_host_name}" != "" ] && [ "${standby_host_name}" != "None" ] 
\
        && [ "${standby_host_name}" != "none" ] && [ "${standby_host_name}" != 
"NONE" ];then
        standby_ip_address_all=`${SSH} ${standby_host_name} "${IFCONFIG} 
|${GREP} -v '127.0.0' | ${GREP} 'inet '|${AWK} '{print \\$2}'"`
    fi
    segment_ip_address_all=`${IFCONFIG} | ${GREP} -v '127.0.0' | ${AWK} '/inet 
addr/{print substr($2,6)}'`
else
    master_ip_address_all=`${SSH} ${master_host_name} "${IFCONFIG} |${GREP} -v 
'127.0.0' |${AWK} '/inet addr/{print substr(\\$2,6)}'"`
    if [ "${standby_host_name}" != "" ] && [ "${standby_host_name}" != "None" ] 
\
        && [ "${standby_host_name}" != "none" ] && [ "${standby_host_name}" != 
"NONE" ];then
        standby_ip_address_all=`${SSH} ${standby_host_name} "${IFCONFIG} 
|${GREP} -v '127.0.0' |${AWK} '/inet addr/{print substr(\\$2,6)}'"`
    fi
    segment_ip_address_all=`${IFCONFIG} | ${GREP} -v '127.0.0' | ${AWK} '/inet 
addr/{print substr($2,6)}'`
fi
{code}


Anyway, HAWQ was initialized successfully.


> HAWQ init report error message on centos7
> -----------------------------------------
>
>                 Key: HAWQ-235
>                 URL: https://issues.apache.org/jira/browse/HAWQ-235
>             Project: Apache HAWQ
>          Issue Type: Bug
>          Components: Command Line Tools
>            Reporter: Zhanwei Wang
>            Assignee: Lei Chang
>
> {code}
> [gpadmin@centos7-namenode hawq-devel]$ hawq init cluster
> 20151209:03:02:07:000292 hawq_init:centos7-namenode:gpadmin-[INFO]:-Prepare 
> to do 'hawq init'
> 20151209:03:02:07:000292 hawq_init:centos7-namenode:gpadmin-[INFO]:-You can 
> check log in /home/gpadmin/hawqAdminLogs/hawq_init_20151209.log
> 20151209:03:02:07:000292 hawq_init:centos7-namenode:gpadmin-[INFO]:-Init hawq 
> with args: ['init', 'cluster']
> Continue with HAWQ init Yy|Nn (default=N):
> > y
> 20151209:03:02:08:000292 hawq_init:centos7-namenode:gpadmin-[INFO]:-Check if 
> hdfs path is available
> 20151209:03:02:08:000292 
> hawq_init:centos7-namenode:gpadmin-[WARNING]:-WARNING:'hdfs://centos7-namenode:8020/hawq_default'
>  does not exist, create it ...
> 20151209:03:02:08:000292 hawq_init:centos7-namenode:gpadmin-[INFO]:-3 segment 
> hosts defined
> 20151209:03:02:08:000292 hawq_init:centos7-namenode:gpadmin-[INFO]:-Set 
> default_segment_num as: 24
> The authenticity of host 'centos7-datanode1 (172.17.0.85)' can't be 
> established.
> ECDSA key fingerprint is 51:84:fc:86:2c:d3:30:0b:06:ac:49:f4:a8:5d:e1:bd.
> Are you sure you want to continue connecting (yes/no)? yes
> The authenticity of host 'centos7-datanode2 (172.17.0.86)' can't be 
> established.
> ECDSA key fingerprint is 51:84:fc:86:2c:d3:30:0b:06:ac:49:f4:a8:5d:e1:bd.
> Are you sure you want to continue connecting (yes/no)? yes
> The authenticity of host 'centos7-datanode3 (172.17.0.87)' can't be 
> established.
> ECDSA key fingerprint is 51:84:fc:86:2c:d3:30:0b:06:ac:49:f4:a8:5d:e1:bd.
> Are you sure you want to continue connecting (yes/no)? yes
> The authenticity of host 'centos7-namenode (172.17.0.84)' can't be 
> established.
> ECDSA key fingerprint is 51:84:fc:86:2c:d3:30:0b:06:ac:49:f4:a8:5d:e1:bd.
> Are you sure you want to continue connecting (yes/no)? yes
> 20151209:03:02:15:000292 hawq_init:centos7-namenode:gpadmin-[INFO]:-Start to 
> init master node: 'centos7-namenode'
> 20151209:03:02:23:000292 hawq_init:centos7-namenode:gpadmin-[INFO]:-Master 
> init successfully
> 20151209:03:02:23:000292 hawq_init:centos7-namenode:gpadmin-[INFO]:-Init 
> segments in list: ['centos7-datanode1', 'centos7-datanode2', 
> 'centos7-datanode3']
> .........20151209:03:02:32:000292 
> hawq_init:centos7-namenode:gpadmin-[INFO]:-/data/hawq-devel/bin/lib/hawq_bash_functions.sh:
>  line 59: return: Problem in hawq_bash_functions, command 'ifconfig' not 
> found in COMMAND path.                 You will need to edit the script named 
> hawq_bash_functions.sh to properly locate                 the needed commands 
> for your platform.: numeric argument required
> /data/hawq-devel/bin/lib/hawq_bash_functions.sh: line 59: return: Problem in 
> hawq_bash_functions, command 'netstat' not found in COMMAND path.             
>     You will need to edit the script named hawq_bash_functions.sh to properly 
> locate                 the needed commands for your platform.: numeric 
> argument required
> Host key verification failed.
> /data/hawq-devel/bin/lib/hawqinit.sh: line 72: ifconfig: command not found
> 20151209:03:02:32:000292 
> hawq_init:centos7-namenode:gpadmin-[INFO]:-/data/hawq-devel/bin/lib/hawq_bash_functions.sh:
>  line 59: return: Problem in hawq_bash_functions, command 'ifconfig' not 
> found in COMMAND path.                 You will need to edit the script named 
> hawq_bash_functions.sh to properly locate                 the needed commands 
> for your platform.: numeric argument required
> /data/hawq-devel/bin/lib/hawq_bash_functions.sh: line 59: return: Problem in 
> hawq_bash_functions, command 'netstat' not found in COMMAND path.             
>     You will need to edit the script named hawq_bash_functions.sh to properly 
> locate                 the needed commands for your platform.: numeric 
> argument required
> Host key verification failed.
> /data/hawq-devel/bin/lib/hawqinit.sh: line 72: ifconfig: command not found
> 20151209:03:02:32:000292 
> hawq_init:centos7-namenode:gpadmin-[INFO]:-/data/hawq-devel/bin/lib/hawq_bash_functions.sh:
>  line 59: return: Problem in hawq_bash_functions, command 'ifconfig' not 
> found in COMMAND path.                 You will need to edit the script named 
> hawq_bash_functions.sh to properly locate                 the needed commands 
> for your platform.: numeric argument required
> /data/hawq-devel/bin/lib/hawq_bash_functions.sh: line 59: return: Problem in 
> hawq_bash_functions, command 'netstat' not found in COMMAND path.             
>     You will need to edit the script named hawq_bash_functions.sh to properly 
> locate                 the needed commands for your platform.: numeric 
> argument required
> Host key verification failed.
> /data/hawq-devel/bin/lib/hawqinit.sh: line 72: ifconfig: command not found
> .
> 20151209:03:02:34:000292 hawq_init:centos7-namenode:gpadmin-[INFO]:-3 of 3 
> segments init successfully
> 20151209:03:02:34:000292 hawq_init:centos7-namenode:gpadmin-[INFO]:-Segments 
> init successfully on nodes '['centos7-datanode1', 'centos7-datanode2', 
> 'centos7-datanode3']'
> 20151209:03:02:34:000292 hawq_init:centos7-namenode:gpadmin-[INFO]:-Init HAWQ 
> cluster successfully
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to