更新更新我已经修复了下面的问题,感谢mike指出,但是,现在,当我按照建议的快速入门指南运行命令“jps”检查hmaster进程时,发现错误命令“找不到”:
我搜索这个命令,这个命令与java相关。因此,我的机器上的java配置如下:
在.bashrc和.bash\u配置文件中:
export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.222.b10-1.fc31.x86_64/jre
export JRE_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.222.b10-1.fc31.x86_64/jre
export PATH=$PATH:$HOME/bin:$JAVA_HOME/bin
在hbase-env.sh中:
export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.222.b10-1.fc31.x86_64/jre
my java的位置:
[hadoop@new-hbase-shuti logs]$ whereis java
java: /usr/bin/java /usr/lib/java /etc/java /usr/share/java /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.222.b10-1.fc31.x86_64/jre/bin/java /usr/share/man/man1/java.1.gz
我的java版本:
[hadoop@new-hbase-shuti logs]$ java -version
openjdk version "1.8.0_222"
OpenJDK Runtime Environment (build 1.8.0_222-b10)
OpenJDK 64-Bit Server VM (build 25.222-b10, mixed mode)
下面是hbase的新日志文件(hbase hadoop master new hbase shuti.log):
我按照快速入门指南只安装hbase单机版。以下是我的配置:
我不太确定要使用哪个hbase pkg,但它说要选择稳定的,所以我下载了这个:http://mirrors.standaloneinstaller.com/apache/hbase/stable/hbase-2.2.3-bin.tar.gz
conf/hbase-env.sh,其中只有java\u home env路径:
conf/hbase-site.xml
<configuration>
<property>
<name>hbase.rootdir</name>
<value>file:///home/testuser/hbase</value>
</property>
<property>
<name>hbase.zookeeper.property.dataDir</name>
<value>/home/testuser/zookeeper</value>
</property>
<property>
<name>hbase.unsafe.stream.capability.enforce</name>
<value>false</value>
<description>
Controls whether HBase will check for stream capabilities (hflush/hsync).
Disable this if you intend to run on LocalFileSystem, denoted by a rootdir
with the 'file://' scheme, but be mindful of the NOTE below.
WARNING: Setting this to false blinds you to potential data loss and
inconsistent system state in the event of process and/or node failures. If
HBase is complaining of an inability to use hsync or hflush it's most
likely not a false positive.
</description>
</property>
</configuration>
然后从bin运行脚本start-hbase.sh
但我有个错误:
/home/hadoop/hadoop/bin/../libexec/hadoop-functions.sh: line 2360: HADOOP_ORG.APACHE.HADOOP.HBASE.UTIL.GETJAVAPROPERTY_USER: invalid variable name
/home/hadoop/hadoop/bin/../libexec/hadoop-functions.sh: line 2455: HADOOP_ORG.APACHE.HADOOP.HBASE.UTIL.GETJAVAPROPERTY_OPTS: invalid variable name
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/home/hadoop/hadoop/share/hadoop/common/lib/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/home/hadoop/hbase-2-2-3/hbase-2.2.3/lib/client-facing-thirdparty/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
running master, logging to /home/hadoop/hbase-2-2-3/hbase-2.2.3/bin/../logs/hbase-hadoop-master-new-hbase-shuti.out
/home/hadoop/hadoop/bin/../libexec/hadoop-functions.sh: line 2360: HADOOP_ORG.APACHE.HADOOP.HBASE.UTIL.GETJAVAPROPERTY_USER: invalid variable name
/home/hadoop/hadoop/bin/../libexec/hadoop-functions.sh: line 2455: HADOOP_ORG.APACHE.HADOOP.HBASE.UTIL.GETJAVAPROPERTY_OPTS: invalid variable name
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/home/hadoop/hadoop/share/hadoop/common/lib/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/home/hadoop/hbase-2-2-3/hbase-2.2.3/lib/client-facing-thirdparty/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
我还附上了下面hbase的错误日志文件。熟悉hbase的人能帮我吗?事先非常感谢。
“hbase hadoop master new hbase shuti.log”出错
Thu 26 Mar 2020 08:59:07 PM CET Starting master on new-hbase-shuti
core file size (blocks, -c) unlimited
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 0
file size (blocks, -f) unlimited
pending signals (-i) 7523
max locked memory (kbytes, -l) 64
max memory size (kbytes, -m) unlimited
open files (-n) 1024
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 0
stack size (kbytes, -s) 8192
cpu time (seconds, -t) unlimited
max user processes (-u) 7523
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited
2020-03-26 20:59:07,933 INFO [main] master.HMaster: STARTING service HMaster
2020-03-26 20:59:07,934 INFO [main] util.VersionInfo: HBase 2.2.3
2020-03-26 20:59:07,934 INFO [main] util.VersionInfo: Source code repository git://hao-OptiPlex-7050/home/hao/open_source/hbase revision=6a830d87542b766bd3dc4cfdee28655f62de3974
2020-03-26 20:59:07,934 INFO [main] util.VersionInfo: Compiled by hao on 2020年 01月 10日 星期五 18:27:51 CST
2020-03-26 20:59:07,934 INFO [main] util.VersionInfo: From source with checksum 097925184b85f6995e20da5462b10f3f
2020-03-26 20:59:08,190 INFO [main] master.HMasterCommandLine: Starting a zookeeper cluster
2020-03-26 20:59:08,204 INFO [main] server.ZooKeeperServer: Server environment:zookeeper.version=3.4.10-39d3a4f269333c922ed3db283be479f9deacaa0f, built on 03/23/2017 10:13 GMT
2020-03-26 20:59:08,205 INFO [main] server.ZooKeeperServer: Server environment:host.name=new-hbase-shuti.mshome.net
2020-03-26 20:59:08,205 INFO [main] server.ZooKeeperServer: Server environment:java.version=1.8.0_222
2020-03-26 20:59:08,205 INFO [main] server.ZooKeeperServer: Server environment:java.vendor=Oracle Corporation
2020-03-26 20:59:08,205 INFO [main] server.ZooKeeperServer: Server environment:java.home=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.222.b10-1.fc31.x86_64/jre
2020-03-26 20:59:08,205 INFO [main] server.ZooKeeperServer: vices-core-3.1.3.jar:/home/hadoop/hadoop/share/hadoop/yarn/hadoop-yarn-applications-unmanaged-am-launcher-3.1.3.jar:/home/hadoop/hadoop/share/hadoop/yarn/hadoop-yarn-server-tests-3.1.3.jar:/home/hadoop/hadoop/share/hadoop/yarn/hadoop-yarn-applications-distributedshell-3.1.3.jar:/home/hadoop/hadoop/share/hadoop/yarn/hadoop-yarn-api-3.1.3.jar:/home/hadoop/hadoop/share/hadoop/yarn/hadoop-yarn-client-3.1.3.jar:/home/hadoop/hadoop/share/hadoop/yarn/hadoop-yarn-server-timeline-pluginstorage-3.1.3.jar:/home/hadoop/hadoop/share/hadoop/yarn/hadoop-yarn-server-resourcemanager-3.1.3.jar:/home/hadoop/hadoop/share/hadoop/yarn/hadoop-yarn-server-applicationhistoryservice-3.1.3.jar:/home/hadoop/hadoop/share/hadoop/yarn/hadoop-yarn-server-sharedcachemanager-3.1.3.jar:/home/hadoop/hadoop/share/hadoop/yarn/hadoop-yarn-server-common-3.1.3.jar:/home/hadoop/hadoop/share/hadoop/yarn/hadoop-yarn-common-3.1.3.jar:/home/hadoop/hbase-2-2-3/hbase-2.2.3/bin/../lib/client-facing-thirdparty/slf4j-log4j12-1.7.25.jar
2020-03-26 20:59:08,205 INFO [main] server.ZooKeeperServer: Server environment:java.library.path=/home/hadoop/hadoop//lib/native
2020-03-26 20:59:08,205 INFO [main] server.ZooKeeperServer: Server environment:java.io.tmpdir=/tmp
2020-03-26 20:59:08,205 INFO [main] server.ZooKeeperServer: Server environment:java.compiler=<NA>
2020-03-26 20:59:08,205 INFO [main] server.ZooKeeperServer: Server environment:os.name=Linux
2020-03-26 20:59:08,205 INFO [main] server.ZooKeeperServer: Server environment:os.arch=amd64
2020-03-26 20:59:08,205 INFO [main] server.ZooKeeperServer: Server environment:os.version=5.3.7-301.fc31.x86_64
2020-03-26 20:59:08,205 INFO [main] server.ZooKeeperServer: Server environment:user.name=hadoop
2020-03-26 20:59:08,205 INFO [main] server.ZooKeeperServer: Server environment:user.home=/home/hadoop
2020-03-26 20:59:08,205 INFO [main] server.ZooKeeperServer: Server environment:user.dir=/home/hadoop/hbase-2-2-3/hbase-2.2.3/bin
2020-03-26 20:59:08,207 ERROR [main] master.HMasterCommandLine: Master exiting
java.io.IOException: Unable to create data directory /home/testuser/zookeeper/zookeeper_0/version-2
at org.apache.zookeeper.server.persistence.FileTxnSnapLog.<init>(FileTxnSnapLog.java:85)
at org.apache.zookeeper.server.ZooKeeperServer.<init>(ZooKeeperServer.java:224)
at org.apache.hadoop.hbase.zookeeper.MiniZooKeeperCluster.startup(MiniZooKeeperCluster.java:229)
at org.apache.hadoop.hbase.zookeeper.MiniZooKeeperCluster.startup(MiniZooKeeperCluster.java:187)
at org.apache.hadoop.hbase.master.HMasterCommandLine.startMaster(HMasterCommandLine.java:210)
at org.apache.hadoop.hbase.master.HMasterCommandLine.run(HMasterCommandLine.java:140)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:76)
at org.apache.hadoop.hbase.util.ServerCommandLine.doMain(ServerCommandLine.java:149)
at org.apache.hadoop.hbase.master.HMaster.main(HMaster.java:2940)
“hbase hadoop master new hbase shuti.out”中的错误:
/home/hadoop/hadoop/bin/../libexec/hadoop-functions.sh: line 2360: HADOOP_ORG.APACHE.HADOOP.HBASE.UTIL.GETJAVAPROPERTY_USER: invalid variable name
/home/hadoop/hadoop/bin/../libexec/hadoop-functions.sh: line 2455: HADOOP_ORG.APACHE.HADOOP.HBASE.UTIL.GETJAVAPROPERTY_OPTS: invalid variable name
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/home/hadoop/hadoop/share/hadoop/common/lib/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/home/hadoop/hbase-2-2-3/hbase-2.2.3/lib/client-facing-thirdparty/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
1条答案
按热度按时间d4so4syb1#
我已经更正了我的javau主路径环境,以确保它指向jdk而不是jre。