stopping hbasecat:/tmp/hbase-root-master.pid:No such file or directory

今天在新電腦上安裝虛擬機的時候,嘗試打開hadoop和hbase,hadoop打開沒有問題,就是hbase關閉的時候報了stopping hbasecat:/tmp/hbase-root-master.pid:No such file or directory的錯誤,java

jps以後發現hmaster和hregionserver沒有了,而後我試着再次重啓hbase,重啓後馬上jps是有的,可是過了幾秒以後hmaster和hregionserver有沒有了,apache

如圖:vim

 

因而我只好到hbase-hadoop-master-主機名.log中查看,而後就發現了以下錯誤oop

java.lang.RuntimeException: Failed construction of Master: class org.apache.hadoop.hbase.master.HMaster at org.apache.hadoop.hbase.master.HMaster.constructMaster(HMaster.java:2290) at org.apache.hadoop.hbase.master.HMasterCommandLine.startMaster(HMasterCommandLine.java:233) at org.apache.hadoop.hbase.master.HMasterCommandLine.run(HMasterCommandLine.java:139) at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70) at org.apache.hadoop.hbase.util.ServerCommandLine.doMain(ServerCommandLine.java:126) at org.apache.hadoop.hbase.master.HMaster.main(HMaster.java:2304) Caused by: java.net.BindException: 沒法指定被請求的地址 at sun.nio.ch.Net.bind0(Native Method) at sun.nio.ch.Net.bind(Net.java:433) at sun.nio.ch.Net.bind(Net.java:425) at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223) at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74) at org.apache.hadoop.hbase.ipc.RpcServer.bind(RpcServer.java:2495) at org.apache.hadoop.hbase.ipc.RpcServer$Listener.<init>(RpcServer.java:580) at org.apache.hadoop.hbase.ipc.RpcServer.<init>(RpcServer.java:1982) at org.apache.hadoop.hbase.regionserver.RSRpcServices.<init>(RSRpcServices.java:863) at org.apache.hadoop.hbase.master.MasterRpcServices.<init>(MasterRpcServices.java:210) at org.apache.hadoop.hbase.master.HMaster.createRpcServices(HMaster.java:532) at org.apache.hadoop.hbase.regionserver.HRegionServer.<init>(HRegionServer.java:532) at org.apache.hadoop.hbase.master.HMaster.<init>(HMaster.java:364) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at org.apache.hadoop.hbase.master.HMaster.constructMaster(HMaster.java:2285) ... 5 more

 其中沒法指定被請求的地址讓我想起來多是個人ip地址已經更改了緣由,因而我就進入到/etc/host,更改了ip地址後,就能正常運行了spa

進入命令以下:.net

vim /etc/hosts

而後保存,若是報錯E121的話,能夠輸入以下命令:code

 

:w !sudo tee %  //注意要有冒號

若是很差使的話,多輸入幾回這個語句就能夠了server

小結一下吧,我以爲報錯的時候,主要去看.log文件報的錯,我一開始就走了彎路,一直在查找hmaster不能正常開啓的緣由,後來纔想起來還能夠在.log文件中查看,根據裏面報的錯去百度對應的解決辦法就好了。blog

相關文章
相關標籤/搜索