Hadoop 主机不运行

Hadoop 主机不运行,hadoop,hbase,Hadoop,Hbase,大家好,我在主日志中运行HBase时遇到此异常,而HMaster未运行。 2012-05-20 11:54:38,206 INFO org.apache.zookeeper.ClientCnxn: Opening socket connection to server localhost/23.21.190.123:2181 2012-05-20 11:54:38,236 INFO org.apache.zookeeper.ClientCnxn: Socket connection establ

大家好,我在主日志中运行HBase时遇到此异常,而HMaster未运行。

2012-05-20 11:54:38,206 INFO org.apache.zookeeper.ClientCnxn: Opening socket connection to server localhost/23.21.190.123:2181
2012-05-20 11:54:38,236 INFO org.apache.zookeeper.ClientCnxn: Socket connection established to localhost/23.21.190.123:2181, initiating session
2012-05-20 11:54:38,291 INFO org.apache.zookeeper.ClientCnxn: Session establishment complete on server localhost/23.21.190.123:2181, sessionid = 0x1376a1960900000, negotiated timeout = 180000
2012-05-20 11:54:38,323 INFO org.apache.hadoop.metrics.jvm.JvmMetrics: Initializing JVM Metrics with processName=Master, sessionId=ip-10-28-213-145.ec2.internal:60000
2012-05-20 11:54:38,350 INFO org.apache.hadoop.hbase.metrics: MetricsString added: revision
2012-05-20 11:54:38,350 INFO org.apache.hadoop.hbase.metrics: MetricsString added: hdfsUser
2012-05-20 11:54:38,350 INFO org.apache.hadoop.hbase.metrics: MetricsString added: hdfsDate
2012-05-20 11:54:38,350 INFO org.apache.hadoop.hbase.metrics: MetricsString added: hdfsUrl
2012-05-20 11:54:38,350 INFO org.apache.hadoop.hbase.metrics: MetricsString added: date
2012-05-20 11:54:38,350 INFO org.apache.hadoop.hbase.metrics: MetricsString added: hdfsRevision
2012-05-20 11:54:38,350 INFO org.apache.hadoop.hbase.metrics: MetricsString added: user
2012-05-20 11:54:38,350 INFO org.apache.hadoop.hbase.metrics: MetricsString added: hdfsVersion
2012-05-20 11:54:38,350 INFO org.apache.hadoop.hbase.metrics: MetricsString added: url
2012-05-20 11:54:38,350 INFO org.apache.hadoop.hbase.metrics: MetricsString added: version
2012-05-20 11:54:38,350 INFO org.apache.hadoop.hbase.metrics: new MBeanInfo
2012-05-20 11:54:38,351 INFO org.apache.hadoop.hbase.metrics: new MBeanInfo
2012-05-20 11:54:38,351 INFO org.apache.hadoop.hbase.master.metrics.MasterMetrics: Initialized
2012-05-20 11:54:38,452 INFO org.apache.hadoop.hbase.master.ActiveMasterManager: Master=ip-10-28-213-145.ec2.internal:60000
2012-05-20 11:54:40,150 INFO org.apache.hadoop.ipc.Client: Retrying connect to server: localhost/23.21.190.123:54310. Already tried 0 time(s).
2012-05-20 11:54:41,151 INFO org.apache.hadoop.ipc.Client: Retrying connect to server: localhost/23.21.190.123:54310. Already tried 1 time(s).
2012-05-20 11:54:42,153 INFO org.apache.hadoop.ipc.Client: Retrying connect to server: localhost/23.21.190.123:54310. Already tried 2 time(s).
2012-05-20 11:54:43,155 INFO org.apache.hadoop.ipc.Client: Retrying connect to server: localhost/23.21.190.123:54310. Already tried 3 time(s).
2012-05-20 11:54:44,156 INFO org.apache.hadoop.ipc.Client: Retrying connect to server: localhost/23.21.190.123:54310. Already tried 4 time(s).
2012-05-20 11:54:45,157 INFO org.apache.hadoop.ipc.Client: Retrying connect to server: localhost/23.21.190.123:54310. Already tried 5 time(s).
2012-05-20 11:54:46,159 INFO org.apache.hadoop.ipc.Client: Retrying connect to server: localhost/23.21.190.123:54310. Already tried 6 time(s).
2012-05-20 11:54:47,160 INFO org.apache.hadoop.ipc.Client: Retrying connect to server: localhost/23.21.190.123:54310. Already tried 7 time(s).
2012-05-20 11:54:48,161 INFO org.apache.hadoop.ipc.Client: Retrying connect to server: localhost/23.21.190.123:54310. Already tried 8 time(s).
2012-05-20 11:54:49,162 INFO org.apache.hadoop.ipc.Client: Retrying connect to server: localhost/23.21.190.123:54310. Already tried 9 time(s).
2012-05-20 11:54:49,165 FATAL org.apache.hadoop.hbase.master.HMaster: Unhandled exception. Starting shutdown.
java.net.ConnectException: Call to localhost/23.21.190.123:54310 failed on connection exception: java.net.ConnectException: Connection refused
    at org.apache.hadoop.ipc.Client.wrapException(Client.java:767)
    at org.apache.hadoop.ipc.Client.call(Client.java:743)
    at org.apache.hadoop.ipc.RPC$Invoker.invoke(RPC.java:220)
    at $Proxy5.getProtocolVersion(Unknown Source)
    at org.apache.hadoop.ipc.RPC.getProxy(RPC.java:359)
    at org.apache.hadoop.hdfs.DFSClient.createRPCNamenode(DFSClient.java:113)
    at org.apache.hadoop.hdfs.DFSClient.<init>(DFSClient.java:215)
    at org.apache.hadoop.hdfs.DFSClient.<init>(DFSClient.java:177)
    at org.apache.hadoop.hdfs.DistributedFileSystem.initialize(DistributedFileSystem.java:82)
    at org.apache.hadoop.fs.FileSystem.createFileSystem(FileSystem.java:1378)
    at org.apache.hadoop.fs.FileSystem.access$200(FileSystem.java:66)
    at org.apache.hadoop.fs.FileSystem$Cache.get(FileSystem.java:1390)
    at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:196)
    at org.apache.hadoop.fs.Path.getFileSystem(Path.java:175)
    at org.apache.hadoop.hbase.util.FSUtils.getRootDir(FSUtils.java:364)
    at org.apache.hadoop.hbase.master.MasterFileSystem.<init>(MasterFileSystem.java:81)
    at org.apache.hadoop.hbase.master.HMaster.finishInitialization(HMaster.java:346)
    at org.apache.hadoop.hbase.master.HMaster.run(HMaster.java:282)
Caused by: java.net.ConnectException: Connection refused
    at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
    at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:567)
    at org.apache.hadoop.net.SocketIOWithTimeout.connect(SocketIOWithTimeout.java:206)
    at org.apache.hadoop.net.NetUtils.connect(NetUtils.java:404)
    at org.apache.hadoop.ipc.Client$Connection.setupIOstreams(Client.java:304)
    at org.apache.hadoop.ipc.Client$Connection.access$1700(Client.java:176)
    at org.apache.hadoop.ipc.Client.getConnection(Client.java:860)
    at org.apache.hadoop.ipc.Client.call(Client.java:720)
    ... 16 more
2012-05-20 11:54:49,168 INFO org.apache.hadoop.hbase.master.HMaster: Aborting
2012-05-20 11:54:49,168 DEBUG org.apache.hadoop.hbase.master.HMaster: Stopping service threads
2012-05-20 11:54:49,168 INFO org.apache.hadoop.ipc.HBaseServer: Stopping server on 60000
2012-05-20 11:54:49,169 INFO org.apache.hadoop.ipc.HBaseServer: IPC Server handler 0 on 60000: exiting
2012-05-20 11:54:49,169 INFO org.apache.hadoop.ipc.HBaseServer: IPC Server handler 1 on 60000: exiting
2012-05-20 11:54:49,169 INFO org.apache.hadoop.ipc.HBaseServer: IPC Server handler 2 on 60000: exiting
2012-05-20 11:54:49,169 INFO org.apache.hadoop.ipc.HBaseServer: IPC Server handler 3 on 60000: exiting
2012-05-20 11:54:49,169 INFO org.apache.hadoop.ipc.HBaseServer: IPC Server handler 4 on 60000: exiting
2012-05-20 11:54:49,170 INFO org.apache.hadoop.ipc.HBaseServer: IPC Server handler 5 on 60000: exiting
2012-05-20 11:54:49,170 INFO org.apache.hadoop.ipc.HBaseServer: IPC Server handler 6 on 60000: exiting
2012-05-20 11:54:49,170 INFO org.apache.hadoop.ipc.HBaseServer: IPC Server handler 7 on 60000: exiting
2012-05-20 11:54:49,170 INFO org.apache.hadoop.ipc.HBaseServer: IPC Server handler 8 on 60000: exiting
2012-05-20 11:54:49,170 INFO org.apache.hadoop.ipc.HBaseServer: IPC Server handler 9 on 60000: exiting
2012-05-20 11:54:49,171 INFO org.apache.hadoop.ipc.HBaseServer: Stopping IPC Server listener on 60000
2012-05-20 11:54:49,194 INFO org.apache.hadoop.ipc.HBaseServer: Stopping IPC Server Responder
2012-05-20 11:54:49,217 INFO org.apache.zookeeper.ClientCnxn: EventThread shut down
2012-05-20 11:54:49,217 INFO org.apache.zookeeper.ZooKeeper: Session: 0x1376a1960900000 closed
2012-05-20 11:54:49,217 INFO org.apache.hadoop.hbase.master.HMaster: HMaster main thread exiting

我甚至通过注释localhost条目I-e#127.0.0.1 localhost尝试过,但无法运行HMaster。
这是我的hbase-site.xml

<configuration>
<property>
<name>hbase.cluster.distributed</name>
<value>true</value>
</property>
<property>
<name>hbase.rootdir</name>
<value>hdfs://localhost:54310/hbase</value>
</property>
<configuration>
<property>
<name>hadoop.tmp.dir</name>
<value>/app/hadoop/tmp</value>
</property><property>
<name>fs.default.name</name>
<value>hdfs://localhost:54310</value>
</property>
</configuration>

hbase.cluster.distributed
真的
hbase.rootdir
hdfs://localhost:54310/hbase
这是我的hadoop core-site.xml

<configuration>
<property>
<name>hbase.cluster.distributed</name>
<value>true</value>
</property>
<property>
<name>hbase.rootdir</name>
<value>hdfs://localhost:54310/hbase</value>
</property>
<configuration>
<property>
<name>hadoop.tmp.dir</name>
<value>/app/hadoop/tmp</value>
</property><property>
<name>fs.default.name</name>
<value>hdfs://localhost:54310</value>
</property>
</configuration>

hadoop.tmp.dir
/app/hadoop/tmp
fs.default.name
hdfs://localhost:54310

如果有人遇到问题,请帮助我
谢谢

如果您在伪模式下运行Hbase,则不需要IP。环回工作正常。因此,只需将两行都设置为“127.0.0.1”…还在hbse-site.xml文件中添加以下两个属性-

<property>
  <name>hbase.zookeeper.quorum</name>
  <value>localhost</value>
</property>    
<property>
      <name>hbase.zookeeper.property.clientPort</name>
      <value>2181</value>         
</property>

hbase.zookeeper.quorum
本地服务器
hbase.zookeeper.property.clientPort
2181
除此之外,在“HBASE_HOME/lib”目录中添加以下jar—“hadoop核心-*-.jar”,从hadoop_HOME/lib目录添加“commons-collections-3.2.1.jar”

  • 将hadoop核心文件从hadoop home添加到hbase lib文件夹
  • 检查集群中hbase的版本。如果有差异,则可能是giv错误
  • 使用Ip地址而不是本地主机
  • 检查ssh连接

  • 不确定这是否是罪魁祸首,但我确实看到您的/etc/hosts存在问题:
    您将localhost定义为两个不同的地址

    也许你想要

    127.0.0.1   hbase localhost hbase-system
    23.21.190.123   hbase.com.com
    
    HTH,

    GL

    您是在群集环境中运行还是在伪群集(都在一个节点上,并在配置文件中使用
    localhost
    )中运行?这个问题与此类似()-他们也错误地将localhost分配给了real IP,而不是环回127.0.0.1是的,我检查了这个问题,但这对我不起作用-无论如何,在mysetup中,所有都在一个节点上,而localhost上如果所有都在一个节点上运行,您能否发布运行
    jps
    netstat-atn | grep LISTEN
    命令的输出(在原始问题中发布,而不是在本评论部分发布)您是否在/hbase/conf目录下的regionserver文件中设置了主机名?