本页面描述如何配置 Trafodion Scanner。

介绍

Trafodion Scanner 检查群集这些属性,如会导致安装出现问题,运行时的性能出现问题等。此外,各种收集系统信息供将来参考,如帮助进行故障排除。

在Trafodion安装开始时Trafodion Scanner由 trafodion_install 脚本自动调用。如果Scanner发现任何错误的配置,“Trafodion _install”脚本将会中止。您需要修复这些错误配置然后新运行 trafodion_install 脚本。

""注意:""如果需要可以通过给trafodion_install脚本指定 --no_scanner参数来禁止自动检查:./trafodion_install --no_scanner。比如在一个非标准的集群环境中安装,在这种情况下Scanner发现的错误会阻止安装过程的进行。

Trafodion Scanner可能需要几分钟才能完成,取决于大小和速度的您的群集。它分两个阶段执行:

  1. 检查集群基本先决条件。这一阶段验证以下一组基本的先决条件。如果检测到问题,则会报告错误。你将需要 Trafodion 安装在继续之前更正任何这样的错误。
    • 所有指定的节点可以通过访问无密码 ssh。
    • 运行此脚本的用户有权访问充分使用 sudo,和它正确配置在所有指定的节点上
  2. 收集系统信息,并检查群集配置。 这一阶段执行的配置记录命令,以及在 配置文件中指定的配置和一致性检查。当它完成时,您将看到一条类似于此的消息:
    ******* SUMMARY *******
    Completed Execution on 4 nodes: node1 node2 node3 node4
    Results:
      node2 - All checks PASSED
      node1, node3 - YumAndInternetConnection check FAILED [warning]
      node4 - HardwarePlatform check FAILED [error], MinNumCores check FAILED [warning]
    
    Additional details in log file: /var/log/trafodion/trafodion_scanner_2015-05-01-18-40-21.log
    
    • If any checks FAILED with [error], it is required that you correct the relevant cluster attributes before continuing with the Trafodion installation. For example, the sample output above shows that the HardwarePlatform check failed with [error] on node4.
    • If any checks FAILED with [warning], it is recommended that you correct the relevant cluster attributes before continuing with the Trafodion installation. For example, the sample output above shows that the YumAndInternetConnection check failed with [warning] on node1 and node3 and that the MinNumCores check failed with [warning] on node4.

    You can find the specific details about each check failure in the Scanner log file trafodion_scanner_<timestamp>.log (the name and fully qualified path of the log file is displayed at the end of Scanner execution, as shown in the example above). You can search the log file using the name of the check that failed, for example, "HardwarePlatform". Also, you may find it helpful to read the check descriptions and notes for Cluster Configuration Checking andCluster Consistency Checking.

Manual Invocation

The Trafodion Scanner can be invoked manually, at any time. For example, you can run it after making adjustments to your cluster, to verify that no configuration issues are present. Here are the steps:

IMPORTANT: These steps should be done on the same node where you ran the trafodion_install script. Login with the same User ID that was used to run the trafodion_install script (enabled with sudo and passwordless ssh access to all nodes of the cluster).

  1. Change to the installer tools directory:
    cd $HOME/trafodion_downloads/installer/tools
    
  2. Run the trafodion_scanner script. You don't need to specify any parameters. The trafodion_scanner script automatically uses the cluster information collected by the trafodion_install script. If the needed information is not available, you will be prompted to enter it.
    ./trafodion_scanner

Trafodion Scanner 配置文件

默认的 Trafodion Scanner配置文件是 $HOME/trafodion_downloads/installer/tools/trafodion_scanner.cfg ' '。文件开头注释部分解释了配置文件的规范格式。规范共有三个部分 配置记录配置检查、 和 一致性检查。(这里的配置指系统配置而不是)。如下是各部分详细介绍。

配置记录

Trafodion Scanner 收集各种系统信息以便将来参考,比如帮助进行故障排除。Scanner 在“—node”参数指定的每个节点上执行一条或多条命令,并把输出保存在日志文件(trafodion_scanner.log)中。默认的配置文件(trafodion_scanner.cfg)会收集以下信息:

信息命令说明
CPU核心数grep -c '^processor' /proc/cpuinfo 
内存(GB)grep MemTotal /proc/meminfo | awk '{printf ("%.0f",$2/(1024*1024))}'取值会使用最接近的整数。比如15.8GB显示为16GB,4.3GB显示为4GB。
Linux发行版版本lsb_release -a 
用户限制设置ulimit -a 
系统信息uname -a 
网络配置/sbin/ip addr show 
可用文件系统df -h 
已安装RPM包rpm -qa | sort 
Hadoop发行版版本echo <<<hadoop_distribution>>><<<hadoop发行版>>>是有trafodion scanner设置为检测到的Haddop发行版版本: "ambari" [Hortonworks Data Platform (HDP)] or "cloudera" [Cloudera 发行版包含Apache Hadoop (CDH)].
Hadoop版本hadoop version 
HBase版本hbase version 
HBase使用的Java版本hbase -version 
Java默认版本java -version 

配置检查

Trafodion Scanner检查那些通常会导致 Trafodion 的安装出错,运行时的性能问题等相关集群属性。这些属性分为两类: 要求和建议。对于必需的属性检查显示的严重级别为【错误】,对于建议的属性检查显示的严重级别为【警告】。Scanner 会在“—node”参数指定的每一个节点上运行一条或多条命令并把输出结果和期望的结构比较。默认配置文件(trafodion_scanner.cfg)进行以下检查

参数描述紧急度Notes
HardwarePlatform支持的硬件平台[error]执行命令 uname -i 并检查输出是否等于“x86_64”。唯一支持的平台是x86_64。
MinNumCores最少的CPU核心数目[warning]执行命令 grep -c '^processor' /proc/cpuinfo 并检查输出是否小于2。这是推荐的最小值.
MinGBTotalPhysicalMemory内存的最小值[warning]执行命令 grep MemTotal /proc/meminfo | awk '{printf ("%.0f",$2/(1024*1024))}'检查输出,并去最接近的整数,比较是否小于16。 16GB是推荐的最小值。
LinuxDistro支持的Linux发行版本[error]执行命令 lsb_release -a 检查输出是否是 “Red” 或者 “CentOS”. 仅支持Red Hat 和 CentOS系统。
ValidHostnameFQDNConfig合法的FDQN配置[warning]检查域名是否被配置为合法的完整域名(FQDN)。首先, 验证命令 hostname -f 和hostname -s 的输出是否一样。 That is, we expect hostname -f to return a fully qualified domain name and we expect hostname -s to return a short name. Second, verify that the output of the hostname -f command contains at least one "." character, which is expected to be present in a fully qualified domain name.
ntpdServiceRunningntpd服务是否运行[error]执行命令 /sbin/service ntpd status 并检查输出结果是否包含 “is running”。
iptablesFirewallNotEnablediptables firewall是否启用[error]执行命令 sudo -n /sbin/service iptables status 并检查输出结果是否包含“is not running ”或者 “unrecognized service” (意味着 iptables 服务没有运行或者没有安装) 或者不报行任何一行以数字开始的内容(说明 iptables 服务正在运行但是没有配置任何规则)。
HyperthreadingEnabled如果支持超线程技术,是否启用[warning]检测 /proc/cpuinfo 去检测是否支持超线程技术。如果支持检查/proc/cpuinfo判读是否启用。为了取得最大的性能推荐使用超线程技术。
YumAndInternetConnectionYum和网络连接[warning]如果 yumdownloader 工具已经被安装, 使用它下载“pdsh” 安装包(然后直接删除)。通过这种方式判断yum是否安装并且是否能连接互联网。 否则使用 wget 工具去检查“http://downloads.trafodion.org”是否可用。通过这种方式检查网络连接。

一致性检查

Trafodion Scanner检查各个节点上那些通常会导致 Trafodion 的安装出错,运行时的性能问题等相关属性的一致性。这些属性分为两类: 要求和建议。对于必需的属性检查显示的严重级别为【错误】,对于建议的属性检查显示的严重级别为【警告】。Scanner 会在“—node”参数指定的每一个节点上运行一条或多条命令并把各个节点上的输出进行比较。默认配置文件(trafodion_scanner.cfg)进行以下检查。

NameDescriptionSeverityNotes
SameHadoopVersionHadoop 版本是否一致[error]检查各个节点上命令 hadoop version 输出的版本号是否一致。
SameHBaseVersionHbase版本是否一致[error]Check that the HBase version is the same among cluster nodes, based on output from the hbase version command.


  • No labels