hadoop運維問題記錄


hadoop綜合問題記錄

1、hdfs無法啟動

錯誤:

2018-04-25 14:36:09,293 - Retrying after 10 seconds. Reason: Execution of '/usr/hdp/current/hadoop-hdfs-namenode/bin/hdfs dfsadmin -fs hdfs://master:8020 -safemode get | grep 'Safe mode is OFF'' returned 1. safemode: Call From master/192.168.12.101 to master:8020 failed on connection exception: java.net.ConnectException: Connection refused; For more details see:  http://wiki.apache.org/hadoop/ConnectionRefused
safemode: Call From master/192.168.12.101 to master:8020 failed on connection exception: java.net.ConnectException: Connection refused; For more details see:  http://wiki.apache.org/hadoop/ConnectionRefused

解決:

# su hdfs   //切換到hdfs用戶,若關閉了hdfs的權限則可略過這一步
# hadoop dfsadmin -safemode leave   //讓namenode離開安全模式

2、oozie啟動失敗

錯誤:

"Column name pattern can not be NULL or empty"

解決: 網上有兩種處理方式,一種是將mysql-connector-java版本更換成5.1.38版本或者更低的版本,這種方式我處理還是失敗了,我采用的是第二種方式,配置oozie的Database URL為

jdbc:mysql://master/oozie?nullNamePatternMatchesAll=true

 3、hive點擊Hive View 2.0 Go to View出現USER HOME CHECK 的錯誤

錯誤:

Service 'userhome' check failed:
java.io.FileNotFoundException: File does not exist: /user/admin
    at sun.reflect.GeneratedConstructorAccessor226.newInstance(Unknown Source)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)

 解決:

[root@master ~]# sudo su - hdfs
[root@master ~]# hdfs dfs -mkdir /user/admin
[root@master ~]# hdfs dfs -chown admin:hdfs /user/admin

4、hive的MetaStore啟動了以后又自動停止了

錯誤:

Exception in thread "main" java.lang.RuntimeException: java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient
    at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:552)
    at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:681)
    at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:625)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.apache.hadoop.util.RunJar.run(RunJar.java:233)
    at org.apache.hadoop.util.RunJar.main(RunJar.java:148)
Caused by: java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient
    at org.apache.hadoop.hive.metastore.MetaStoreUtils.newInstance(MetaStoreUtils.java:1566)
    at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.<init>(RetryingMetaStoreClient.java:92)
    at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.getProxy(RetryingMetaStoreClient.java:138)
    at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.getProxy(RetryingMetaStoreClient.java:110)
    at org.apache.hadoop.hive.ql.metadata.Hive.createMetaStoreClient(Hive.java:3526)
    at org.apache.hadoop.hive.ql.metadata.Hive.getMSC(Hive.java:3558)
    at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:533)
    ... 8 more
Caused by: java.lang.reflect.InvocationTargetException
    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.hive.metastore.MetaStoreUtils.newInstance(MetaStoreUtils.java:1564)
    ... 14 more
Caused by: MetaException(message:Could not connect to meta store using any of the URIs provided. Most recent failure: org.apache.thrift.transport.TTransportException: java.net.ConnectException: Connection refused (Connection refused)
    at org.apache.thrift.transport.TSocket.open(TSocket.java:226)
    at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.open(HiveMetaStoreClient.java:487)
    at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.<init>(HiveMetaStoreClient.java:282)
    at org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient.<init>(SessionHiveMetaStoreClient.java:76)
    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.hive.metastore.MetaStoreUtils.newInstance(MetaStoreUtils.java:1564)
    at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.<init>(RetryingMetaStoreClient.java:92)
    at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.getProxy(RetryingMetaStoreClient.java:138)
    at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.getProxy(RetryingMetaStoreClient.java:110)
    at org.apache.hadoop.hive.ql.metadata.Hive.createMetaStoreClient(Hive.java:3526)
    at org.apache.hadoop.hive.ql.metadata.Hive.getMSC(Hive.java:3558)
    at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:533)
    at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:681)
    at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:625)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.apache.hadoop.util.RunJar.run(RunJar.java:233)
    at org.apache.hadoop.util.RunJar.main(RunJar.java:148)

解決:hive.metastore.uris嘗試連接9083端口,netstat查看該端口確實沒有被監聽,第一反應是hiveserver沒有正常啟動。查看hiveserver進程卻存在,只是監聽10000端口。 查看hive-site.xml配置,hive客戶端連接9083端口,而hiveserver默認監聽10000,找到問題根源了 ,但是我修改成10000還是不行,查看配置,還有一個參數是hive.server2.thrift.http.port,值是10001,我配置成了10001端口,然后就成功了。后面不能成功的查詢,問題出現在了hive的源配置mysql,后面重新安裝了新的mysql,就成功了。

5、centos7安裝PyGreSQL

錯誤:

sh: pg_config: command not found
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-MZLWmC/PyGreSQL/setup.py", line 88, in <module>
        pg_version = pg_version()
      File "/tmp/pip-build-MZLWmC/PyGreSQL/setup.py", line 82, in pg_version
        match = re.search(r'(\d+)\.(\d+)', pg_config('version'))
      File "/tmp/pip-build-MZLWmC/PyGreSQL/setup.py", line 74, in pg_config
        raise Exception("pg_config tool is not available.")
    Exception: pg_config tool is not available.

   解決:安裝 postgresql-devel 命令:yum -y install postgresql-devel

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM