【Alluxio+HDFS集群系列-1】CentOS 7非root用户下部署Alluxio+HDFS(Hadoop-2.7.7)集群

一、目的:

搭建Alluxio+HDFS集群。

二、环境:

2台虚拟机,CentOS Linux release 7.5.1804 (Core),内存3G,硬盘45G。

192.168.10.156 hmaster156

192.168.10.162 hslave162

三、前期准备:

(源自官网https://docs.alluxio.io/os/user/stable/cn/Getting-Started.html

3.1 安装jdk8或以上版本

参见https://blog.csdn.net/lynne_cat/article/details/102594531

3.2 ssh免密登录

参见https://blog.csdn.net/lynne_cat/article/details/102594531

四、安装过程 

 4.1 通用版本安装

4.1.1 下载 Alluxio

从Windows端下载Alluxio安装包alluxio-2.1.0-bin.tar.gz,下载地址:https://www.alluxio.io/download/

4.1.2 利用xshell传输至集群各节点

 参见https://blog.csdn.net/lynne_cat/article/details/102568792

传输后的安装包其权限为root。

注意,由于hmaster156和hslave162在非root用户(用户名hadoop)下部署了Hadoop集群,因此本文档也在hadoop用户下部署Alluxio集群。

4.1.3 在hadoop用户下使用sudo命令解压安装包

sudo tar -xzf alluxio-2.1.0-bin.tar.gz

解压后生成文件夹alluxio-2.1.0。使用如下命令,将文件夹alluxio-2.1.0授权给hadoop用户hadoop用户组:

sudo chown -R hadoop:hadoop /usr/local/alluxio-2.1.0

4.2  针对Hadoop-2.7.7集群的Alluxio安装

4.2.1 Alluxio预编译参考资料

来源文档名称内容
https://docs.alluxio.io/os/user/stable/cn/contributor/Building-Alluxio-From-Source.html编译Alluxio源代码详细介绍了如何针对不同版本的Hadoop进行Alluxio源码编译
https://docs.alluxio.io/os/user/stable/cn/ufs/HDFS.html在HDFS上配置Alluxio明确介绍了在HDFS上配置Alluxio时需要编译源码
https://docs.alluxio.io/os/user/stable/cn/Getting-Started.html快速上手指南一句话点明需要编译源码

注意1,《在HDFS上配置Alluxio》指明在编译源码包的时候,默认的Alluxio二进制包适用于HDFS 2.7.3,,若使用其他版本的Hadoop,需要指定正确的Hadoop版本,并且在Alluxio源码目录下运行相关命令。

注意2,《编译Alluxio源代码》指明所有Apache发行的Hadoop版本都可以直接使用相关命令直接编译。Apache发行版本查询:https://archive.apache.org/dist/hadoop/common/

注意3,本集群版本号2.7.7,属于Apache发行版本,进入如下步骤进行源码编译。

4.2.2 保证安装了Java JDK 8或以上版本

任意节点都可以进行编译,本人选择hslave162节点。

4.2.3 保证安装了Maven 3.3.9或以上版本

与4.2.2在同一节点,即hslave162节点。 

(1)在Windows端下载Maven安装包

选择版本:Maven 3.5.4

安装包名:apache-maven-3.5.4-bin.tar.gz

下载路径:http://mirror.bit.edu.cn/apache/maven/maven-3/3.5.4/binaries/

(2)利用xshell传输到hslave162

传输时如果在/usr/local目录下输入rz,选择安装包,则hslave应使用root用户,否则会传输失败。传输成功后,安装包是root(用户) root(用户组)权限。

传输时如果在/home/hadoop目录(~)下输入rz,选择安装包,则hslave可使用hadoop用户。但稍后使用sudo命令将安装包复制到/usr/local目录下后,安装包仍然是root root权限。

(3)解压apache-maven-3.5.4-bin.tar.gz

在hadoop用户下, 执行如下命令解压安装包:

sudo tar -xzf apache-maven-3.5.4-bin.tar.gz

解压后生成文件夹apache-maven-3.5.4。

(4)更改解压后文件夹apache-maven-3.5.4的权限

原权限:

在hadoop用户下,执行如下命令:

sudo chown -R hadoop:hadoop /usr/local/apache-maven-3.5.4

更改后权限:

(5)修改/etc/profile文件

在hadoop用户下,执行如下命令:

sudo vim /etc/profile

在文末添加如下命令:

export MAVEN_HOME=/usr/local/apache-maven-3.5.4
export PATH=$MAVEN_HOME/bin:$PATH

(6)使环境配置生效

在hadoop用户下,执行如下命令:

source /etc/profile

(7)检测是否配置成功

在hadoop用户下,执行如下命令:

mvn -v

出现:

4.2.4 针对Hadoop-2.7.7编译Alluxio

(1)以hadoop用户在/usr/local路径下建立文件夹alluxio-prepare,更改alluxio-prepare权限为hadoop:hadoop

sudo mkdir alluxio-prepare
sudo chown hadoop:hadoop alluxio-prepare

(2)进入alluxio-prepare,从Github上获取Alluxio主分支源码,并切换到指定版本的Alluxio,如2.1.0

cd alluxio-prepare
git clone git://github.com/alluxio/alluxio.git
cd alluxio
# 使用git checkout v2.1.0时提示应加上参数-b
git checkout -b v2.1.0

(3)在/usr/local/alluxio-prepare/路径下执行以下命令,压缩alluxio文件夹为文件alluxio-source-code-from-git.tar.gz,进行备份

tar -czf alluxio-source-code-from-git.tar.gz alluxio

(4)利用maven针对Hadoop-2.7.7进行alluxio源码编译

mvn install -Phadoop-2 -Dhadoop.version=2.7.7 -DskipTests

出现问题与解决方案:

序号问题解决方案
1[ERROR] Failed to execute goal org.apache.maven.plugins:maven-enforcer-plugin:1.4:enforce (enforce-maven) on project alluxio-parent: Execution enforce-maven of goal org.apache.maven.plugins:maven-enforcer-plugin:1.4:enforce failed: Plugin org.apache.maven.plugins:maven-enforcer-plugin:1.4 or one of its dependencies could not be resolved: The following artifacts could not be resolved: org.apache.maven:maven-profile:jar:2.2.1, org.apache.maven.doxia:doxia-logging-api:jar:1.1, org.apache.maven:maven-repository-metadata:jar:2.2.1, org.apache.maven:maven-error-diagnostics:jar:2.2.1, commons-cli:commons-cli:jar:1.2, org.apache.maven:maven-plugin-descriptor:jar:2.2.1, org.codehaus.plexus:plexus-interactivity-api:jar:1.0-alpha-4, org.apache.maven:maven-monitor:jar:2.2.1, classworlds:classworlds:jar:1.1, org.sonatype.plexus:plexus-sec-dispatcher:jar:1.3, org.sonatype.plexus:plexus-cipher:jar:1.4, org.codehaus.plexus:plexus-utils:jar:3.0.20, commons-lang:commons-lang:jar:2.3, org.apache.maven.enforcer:enforcer-api:jar:1.4, org.apache.maven.enforcer:enforcer-rules:jar:1.4, org.apache.maven.shared:maven-common-artifact-filters:jar:1.4, org.beanshell:bsh:jar:2.0b4, org.apache.maven.shared:maven-dependency-tree:jar:2.2, org.eclipse.aether:aether-util:jar:0.9.0.M2, org.codehaus.plexus:plexus-i18n:jar:1.0-beta-6, org.apache.maven.plugin-testing:maven-plugin-testing-harness:jar:1.3, org.codehaus.plexus:plexus-archiver:jar:2.2, org.codehaus.plexus:plexus-io:jar:2.0.4, junit:junit:jar:4.11: Could not transfer artifact org.apache.maven:maven-profile:jar:2.2.1 from/to central (https://repo.maven.apache.org/maven2): repo.maven.apache.org: Name or service not known: Unknown host repo.maven.apache.org: Name or service not known -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException

方案:修改/usr/local/alluxio-prepare/alluxio路径下pom.xml文件,改后如下:

结果:出现问题2。 

2[ERROR] Failed to execute goal org.apache.maven.plugins:maven-checkstyle-plugin:2.17:check (checkstyle) on project alluxio-parent: Execution checkstyle of goal org.apache.maven.plugins:maven-checkstyle-plugin:2.17:check failed: Plugin org.apache.maven.plugins:maven-checkstyle-plugin:2.17 or one of its dependencies could not be resolved: The following artifacts could not be resolved: xerces:xercesImpl:jar:2.9.1, dom4j:dom4j:jar:1.1, org.apache.commons:commons-lang3:jar:3.4: Could not transfer artifact xerces:xercesImpl:jar:2.9.1 from/to central (https://repo.maven.apache.org/maven2): GET request of: xerces/xercesImpl/2.9.1/xercesImpl-2.9.1.jar from central failed: Connection reset -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException

方案:更改maven版本为3.3.9

结果:出现问题3

3[ERROR] Failed to execute goal com.github.spotbugs:spotbugs-maven-plugin:3.1.12.2:spotbugs (spotbugs) on project alluxio-parent: Execution spotbugs of goal com.github.spotbugs:spotbugs-maven-plugin:3.1.12.2:spotbugs failed: Plugin com.github.spotbugs:spotbugs-maven-plugin:3.1.12.2 or one of its dependencies could not be resolved: Could not transfer artifact org.apache.maven.doxia:doxia-core:jar:1.9 from/to central (https://repo.maven.apache.org/maven2): GET request of: org/apache/maven/doxia/doxia-core/1.9/doxia-core-1.9.jar from central failed: Connection reset -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException

方案:执行命令中添加clean

mvn clean install -Phadoop-2 -Dhadoop.version=2.7.7 -DskipTests

结果:编译成功!

 

(5)在/usr/local/alluxio-prepare/路径下执行以下命令,压缩编译后的alluxio文件夹为文件alluxio-compiling-for-hadoop-2.7.7.tar.gz,进行备份

tar -czf alluxio-compiling-for-hadoop-2.7.7.tar.gz alluxio

4.2.5 安装编译后的Alluxio

将编译后的alluxio文件夹移动到/usr/local/路径下,重命名为alluxio-for-hadoop-2.7.7。

hadoop用户在/usr/local/alluxio-prepare路径下执行以下命令:

sudo mv alluxio /usr/local/alluxio-for-hadoop-2.7.7

出现问题与解决方案:

序号问题解决方案
1.使用cp命令复制文件夹到/usr/local/路径下时,不成功。改用mv命令移动文件夹。

 

五、部署Alluxio+HDFS

5.1 安装zookeeper

部署高可用性Alluxio集群需要安装zookeeper。 

5.1.1 zookeeper版本选择

官方文档建议选择最新的stable版本。当前最新stable版为zookeeper-3.5.6。

https://archive.apache.org/dist/zookeeper/

跳转后:

 出现问题与解决方案:

序号问题解决方案
1.上图中apache-zookeeper-3.5.6.tar.gz和apache-zookeeper-3.5.6-bin.tar.gz的区别

官网说明:

https://zookeeper.apache.org/releases.html

5.1.2 准备工作

http://zookeeper.apache.org/doc/r3.5.6/zookeeperAdmin.html#sc_supportedPlatforms

Required Software
ZooKeeper runs in Java, release 1.7 or greater (JDK 7 or greater, FreeBSD support requires openjdk7). It runs as an ensemble of ZooKeeper servers. Three ZooKeeper servers is the minimum recommended size for an ensemble, and we also recommend that they run on separate machines. At Yahoo!, ZooKeeper is usually deployed on dedicated RHEL boxes, with dual-core processors, 2GB of RAM, and 80GB IDE hard drives.

官网建议:至少需要3个节点。本集群仅包含2个节点。

因此本次配置Alluxio+HDFS时,选择《使用单个Master运行Alluxio》方案。

https://docs.alluxio.io/os/user/stable/cn/deploy/Running-Alluxio-on-a-Cluster.html

5.2 基于单个Master部署Alluxio for Hadoop-2.7.7

5.2.1 将编译好的alluxio文件夹复制到hmaster156节点的相同路径上

在hmaster156节点/usr/local/路径下复制alluxio-for-hadoop-2.7.7文件夹及其下文件。并将alluxio-for-hadoop-2.7.7文件夹权限更改为hadoop hadoop。

出现问题与解决方案:

序号问题解决方案
1.

本文将备份压缩包alluxio-compiling-for-hadoop-2.7.7.tar.gz复制到hmaster156节点/usr/local/路径下,并在该路径下以hadoop用户使用如下命令进行解压缩,尝试将压缩包直接解压为文件夹alluxio-for-hadoop-2.7.7。

sudo tar -xzf alluxio-compiling-for-hadoop-2.7.7.tar.gz alluxio-for-hadoop-2.7.7

出现错误信息:  

tar: alluxio-for-hadoop-2.7.7: Not found in archive
tar: Exiting with failure status due to previous errors

方案:修改命令为

sudo tar -xzf alluxio-compiling-for-hadoop-2.7.7.tar.gz

结果:成功将alluxio-compiling-for-hadoop-2.7.7.tar.gz在hmaster156节点/usr/local/路径下解压为文件夹alluxio。

 

原因分析: 压缩时文件夹的名称为alluxio,因此提示无法在压缩文件中找到alluxio-for-hadoop-2.7.7。

 

5.2.2 配置Alluxio

参见官网《1.2.配置Alluxio》,https://docs.alluxio.io/os/user/stable/cn/deploy/Running-Alluxio-on-a-Cluster.html

(1)在hmaster156、hslave162节点上,以hadoop用户在/usr/local/alluxio-for-hadoop-2.7.7/conf下,从模板创建alluxio-site.properties配置文件。

cp alluxio-site.properties.template alluxio-site.properties

(2)更新alluxio-site.properties文件中alluxio.master.hostname为运行Alluxio Master的机器的主机名。

(3)添加所有worker节点的IP地址到workers文件。 

 

5.2.3 配置HDFS

(1)修改alluxio-site.properties文件,将alluxio.master.mount.table.root.ufs设置为hdfs://NAMENODE-HOSTNAME:PORT/以及想挂载到Alluxio根目录下的HDFS目录。

(2) 确保用户/权限映射

1)使用启动HDFS namenode进程的同一用户启动Alluxio master和worker进程。本文中都使用用户hadoop。

2)编辑HDFS配置文件hdfs-site.xml并检查配置属性dfs.permissions.superusergroup的值。如果使用组(例如,“hdfs”)设置此属性,则将用户添加到此组(“hdfs”)以启动Alluxio进程(例如,“alluxio”);如果未设置此属性,请将一个组添加到此属性,其中Alluxio运行用户是此新添加组的成员。

5.3 基于HDFS运行Alluxio 

5.3.1 启动HDFS集群

在hmaster156节点上以hadoop用户执行如下命令:

start-dfs.sh

在hslave162节点上以hadoop用户执行以下命令:

start-yarn.sh

5.3.2 在HDFS上创建要挂在到Alluxio下的目录

在hslave162上以hadoop用户执行以下命令:

hdfs dfs -mkdir /alluxio
hdfs dfs -mkdir /alluxio/data

5.3.3 本地启动Alluxio 

(1)在hmaster156节点/usr/loca/alluxio-for-hadoop/路径以hadoop用户执行以下命令:

bin/alluxio format

出现问题及解决方案:

问题1执行以下命令:
bin/alluxio format

/usr/local/alluxio-for-hadoop-2.7.7/logs/task.log日志报错如下:

[2019-11-29 12:48:15][hmaster156] 2019-11-29 12:48:15,896 INFO  Format - Formatting worker data folder: /alluxioworker/^M
[2019-11-29 12:48:15][hmaster156] 2019-11-29 12:48:15,898 INFO  Format - Formatting Data path for tier 0:/mnt/ramdisk/alluxioworker^M
[2019-11-29 12:48:15][hmaster156] 2019-11-29 12:48:15,914 ERROR Format - Failed to format^M
[2019-11-29 12:48:15][hmaster156] java.nio.file.NoSuchFileException: /mnt/ramdisk/alluxioworker^M
[2019-11-29 12:48:15][hmaster156] at sun.nio.fs.UnixException.translateToIOException(UnixException.java:86)^M
[2019-11-29 12:48:15][hmaster156] at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)^M
[2019-11-29 12:48:15][hmaster156] at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)^M
[2019-11-29 12:48:15][hmaster156] at sun.nio.fs.UnixFileSystemProvider.createDirectory(UnixFileSystemProvider.java:384)^M
[2019-11-29 12:48:15][hmaster156] at java.nio.file.Files.createDirectory(Files.java:674)^M
[2019-11-29 12:48:15][hmaster156] at alluxio.cli.Format.formatWorkerDataFolder(Format.java:66)^M
[2019-11-29 12:48:15][hmaster156] at alluxio.cli.Format.format(Format.java:136)^M
[2019-11-29 12:48:15][hmaster156] at alluxio.cli.Format.main(Format.java:97)^M
[2019-11-29 12:48:15][hmaster156] Connection to hmaster156 closed.^M

方案

hadoop用户在/mnt路径下执行以下命令,创建文件夹:

sudo mkdir alluxio
sudo mkdir alluxio/alluxioworker

注意:此时文件夹权限为root root。

结果

重新执行format命令,/usr/local/alluxio-for-hadoop-2.7.7/logs/task.log报错如下:

[2019-11-29 12:56:15][hmaster156] 2019-11-29 12:56:15,590 INFO  Format - Formatting worker data folder: /alluxioworker/^M
[2019-11-29 12:56:15][hmaster156] 2019-11-29 12:56:15,592 INFO  Format - Formatting Data path for tier 0:/mnt/ramdisk/alluxioworker^M
[2019-11-29 12:56:15][hmaster156] 2019-11-29 12:56:15,681 ERROR Format - Failed to format^M
[2019-11-29 12:56:15][hmaster156] java.nio.file.AccessDeniedException: /mnt/ramdisk/alluxioworker^M
[2019-11-29 12:56:15][hmaster156] at sun.nio.fs.UnixException.translateToIOException(UnixException.java:84)^M
[2019-11-29 12:56:15][hmaster156] at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)^M
[2019-11-29 12:56:15][hmaster156] at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)^M
[2019-11-29 12:56:15][hmaster156] at sun.nio.fs.UnixFileSystemProvider.implDelete(UnixFileSystemProvider.java:244)^M
[2019-11-29 12:56:15][hmaster156] at sun.nio.fs.AbstractFileSystemProvider.delete(AbstractFileSystemProvider.java:103)^M
[2019-11-29 12:56:15][hmaster156] at java.nio.file.Files.delete(Files.java:1126)^M
[2019-11-29 12:56:15][hmaster156] at alluxio.util.io.FileUtils$1.postVisitDirectory(FileUtils.java:243)^M
[2019-11-29 12:56:15][hmaster156] at alluxio.util.io.FileUtils$1.postVisitDirectory(FileUtils.java:233)^M
[2019-11-29 12:56:15][hmaster156] at java.nio.file.Files.walkFileTree(Files.java:2688)^M
[2019-11-29 12:56:15][hmaster156] at java.nio.file.Files.walkFileTree(Files.java:2742)^M
[2019-11-29 12:56:15][hmaster156] at alluxio.util.io.FileUtils.deletePathRecursively(FileUtils.java:233)^M
[2019-11-29 12:56:15][hmaster156] at alluxio.cli.Format.formatWorkerDataFolder(Format.java:65)^M
[2019-11-29 12:56:15][hmaster156] at alluxio.cli.Format.format(Format.java:136)^M
[2019-11-29 12:56:15][hmaster156] at alluxio.cli.Format.main(Format.java:97)^M
[2019-11-29 12:56:15][hmaster156] Connection to hmaster156 closed.^M

分析

观察错误日志([2019-11-29 12:56:15][hmaster156] 2019-11-29 12:56:15,590 INFO  Format - Formatting worker data folder: /alluxioworker/^M),发现/mnt/ramdisk/alluxioworker可能是存储数据的文件夹。因此尝试更改该路径,希望能解决问题。

方案

在hmaster156和hslave162节点/usr/local/alluxio-for-hadoop-2.7.7/conf路径下,以hadoop用户复制文件alluxio-env.sh.template并重命名为alluxio-env.sh,添加如下配置项:

结果

执行format命令后,命令行输入如下:

/usr/local/alluxio-for-hadoop-2.7.7/conf/alluxio-env.sh: line 53: alluxio.worker.data.folder=/usr/local/alluxioworker: No such file or directory
/usr/local/alluxio-for-hadoop-2.7.7/conf/alluxio-env.sh: line 53: alluxio.worker.data.folder=/usr/local/alluxioworker: No such file or directory
Executing the following command on all worker nodes and logging to /usr/local/alluxio-for-hadoop-2.7.7/logs/task.log: /usr/local/alluxio-for-hadoop-2.7.7/bin/alluxio formatWorker
Waiting for tasks to finish...
Task on 'hmaster156' fails, exit code: 255
There are task failures, look at /usr/local/alluxio-for-hadoop-2.7.7/logs/task.log for details.
/usr/local/alluxio-for-hadoop-2.7.7/conf/alluxio-env.sh: line 53: alluxio.worker.data.folder=/usr/local/alluxioworker: No such file or directory
/usr/local/alluxio-for-hadoop-2.7.7/conf/alluxio-env.sh: line 53: alluxio.worker.data.folder=/usr/local/alluxioworker: No such file or directory
Executing the following command on all master nodes and logging to /usr/local/alluxio-for-hadoop-2.7.7/logs/task.log: /usr/local/alluxio-for-hadoop-2.7.7/bin/alluxio formatJournal
/usr/local/alluxio-for-hadoop-2.7.7/conf/alluxio-env.sh: line 53: alluxio.worker.data.folder=/usr/local/alluxioworker: No such file or directory
/usr/local/alluxio-for-hadoop-2.7.7/conf/alluxio-env.sh: line 53: alluxio.worker.data.folder=/usr/local/alluxioworker: No such file or directory
Waiting for tasks to finish...
All tasks finished

分析

alluxio-env.sh不是配置alluxio.worker.data.folder的文件。

 

注:后期操作时发现配置文件及配置项如下:

# 配置文件:/usr/local/alluxio-for-hadoop-2.7.7/conf/alluxio-site.properties
alluxio.worker.tieredstore.level0.dirs.path=/mnt/ramdisk

 

方案尝试更改默认目录/mnt/ramdisk/alluxioworker的权限为hadoop hadoop。
结果

问题解决。

注意应将/mnt、/mnt/ramdisk、/mnt/ramdisk/alluxioworker的权限都设为hadoop hadoop。

(2)在hmaster156节点/usr/loca/alluxio-for-hadoop/路径以hadoop用户执行以下命令:

bin/alluxio-start.sh local

出现问题及解决方案:

问题1执行以下命令:
bin/alluxio-start.sh local

命令行输出如下:

分析

https://www.alluxio.io/download/releases/alluxio-180-release/

官网指出:

方案

参考:http://blog.sina.com.cn/s/blog_c059d97c0102ym7a.html

在hmaster156节点/usr/loca/alluxio-for-hadoop/bin路径以hadoop用户执行以下命令:

sudo ./alluxio-mount.sh Mount local

 

结果

1)mount成功

2)在hmaster156节点/usr/loca/alluxio-for-hadoop/bin路径以hadoop用户执行./alluxio-start.sh local,启动成功

 

5.3.4 启动Alluxio集群

(1)在hmaster156、hslave162节点上,以hadoop用户在/usr/local/alluxio-for-hadoop-2.7.7/conf下,修改masters文件。

(2)启动Alluxio集群。

 在hmaster162节点/usr/loca/alluxio-for-hadoop/bin路径以hadoop用户执行以下命令:

./alluxio-start.sh all NoMount

出现问题及解决方案:

问题1执行以下命令:
./alluxio-start.sh all

命令行输出如下:

 

查看hmaster156节点的日志文件/usr/local/alluxio-for-hadoop-2.7.7/logs/worker.log,报错如下: 

 

分析配置项存在问题。通过错误信息Failed to handshake with master localhost:19998 to load cluster default configuration values,猜测配置有问题。master的hostname不是localhost,应该是hslave162。
方案

搜索在什么文件配置alluxio:19998,无果。

发现hmaster156节点/usr/local/alluxio-for-hadoop-2.7.7/conf/路径下alluxio-site.properties文件为:

发现因为之前运行本地模式而追加了alluxio.master.hostname=localhost,导致报错。将最后一行删除。

结果

运行成功:

 在alluxio master(hslave162)和alluxio worker(hmaster156)分别执行jps,输出如下内容:

 

1)alluxio master(hslave162):

2)alluxio worker(hmaster156):

(3)验证Alluxio集群是否启动成功

1)在alluxio master(hslave162)节点/usr/local/alluxio-for-hadoop-2.7.7/bin/路径下以hadoop用户执行如下命令:

./alluxio runTests

输出如下内容:

 2)访问http://<alluxio_master_hostname>:19999(http://192.168.10.162:19999/overview

注意:如果访问http://hslave162:19999,则会呈现空白页面。 

(4)后续问题及解决方案

序号问题解决方案
1.

启动Alluxio+HDFS集群两天后,访问http://192.168.10.162:19999/overview显示空白页

 

方案:关闭Alluxio集群,重新启动。

sudo tar -xzf alluxio-compiling-for-hadoop-2.7.7.tar.gz

结果:问题解决。

 

备注:

Alluxio集群启动命令:在hmaster162节点/usr/loca/alluxio-for-hadoop/bin路径以hadoop用户执行以下命令: 

./alluxio-start.sh all NoMount

 

注意:以上命令中NoMount应该为SudoMount。否则后续会出现很多问题。 问题详见【Alluxio集群系列】测试Alluxio+HDFS(Hadoop-2.7.7)集群性能(1)

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 3
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值