ambari安裝kylin成功但無法啟動報錯及處理


ambari安裝kylin成功但無法啟動報錯及處理

1、cannot stat ‘/usr/hdp/3.0.1.0-187/kylin/pid’: No such file or directory

從ambari啟動kylin時報錯大意如下:

stderr: 
Traceback (most recent call last):
  File "/var/lib/ambari-agent/cache/stacks/HDP/3.0/services/KYLIN/package/scripts/kylin_query.py", line 74, in <module>
    KylinQuery().execute()
  File "/usr/lib/ambari-agent/lib/resource_management/libraries/script/script.py", line 352, in execute
    method(env)
  File "/var/lib/ambari-agent/cache/stacks/HDP/3.0/services/KYLIN/package/scripts/kylin_query.py", line 53, in start
    Execute(cmd, user='hdfs')
  File "/usr/lib/ambari-agent/lib/resource_management/core/base.py", line 166, in __init__
    self.env.run()
  File "/usr/lib/ambari-agent/lib/resource_management/core/environment.py", line 160, in run
    self.run_action(resource, action)
  File "/usr/lib/ambari-agent/lib/resource_management/core/environment.py", line 124, in run_action
    provider_action()
  File "/usr/lib/ambari-agent/lib/resource_management/core/providers/system.py", line 263, in action_run
    returns=self.resource.returns)
  File "/usr/lib/ambari-agent/lib/resource_management/core/shell.py", line 72, in inner
    result = function(command, **kwargs)
  File "/usr/lib/ambari-agent/lib/resource_management/core/shell.py", line 102, in checked_call
    tries=tries, try_sleep=try_sleep, timeout_kill_strategy=timeout_kill_strategy, returns=returns)
  File "/usr/lib/ambari-agent/lib/resource_management/core/shell.py", line 150, in _call_wrapper
    result = _call(command, **kwargs_copy)
  File "/usr/lib/ambari-agent/lib/resource_management/core/shell.py", line 314, in _call
    raise ExecutionFailed(err_msg, code, out, err)
resource_management.core.exceptions.ExecutionFailed: Execution of '. /var/lib/ambari-agent/tmp/kylin_env.rc;/usr/hdp/3.0.1.0-187/kylin/bin/kylin.sh start;cp -rf /usr/hdp/3.0.1.0-187/kylin/pid /var/run/kylin/kylin.pid' returned 1. Retrieving hadoop conf dir...
...................................................[PASS]
KYLIN_HOME is set to /usr/hdp/3.0.1.0-187/kylin
Checking HBase
...................................................[PASS]
Checking hive
...................................................[PASS]
Checking hadoop shell
...................................................[PASS]
Checking hdfs working dir
...................................................[PASS]
Retrieving Spark dependency...
...................................................[PASS]
Retrieving Flink dependency...
Optional dependency flink not found, if you need this; set FLINK_HOME, or run bin/download-flink.sh
...................................................[PASS]
Retrieving kafka dependency...
Couldn't find kafka home. If you want to enable streaming processing, Please set KAFKA_HOME to the path which contains kafka dependencies.
...................................................[PASS]

Checking environment finished successfully. To check again, run 'bin/check-env.sh' manually.
Retrieving hive dependency...
Something wrong with Hive CLI or Beeline, please execute Hive CLI or Beeline CLI in terminal to find the root cause.
cp: cannot stat ‘/usr/hdp/3.0.1.0-187/kylin/pid’: No such file or directory

這有可能是沒有權限不能成功啟動kylin導致,試着授權hdfs用戶,讓其擁有hive的權限

[root@worker kylin]# su hdfs
[hdfs@worker kylin]$ /usr/hdp/3.0.1.0-187/kylin/bin/sample.sh

如果執行上面的命令再次報錯Cannot modify hive.security.authorization.sqlstd.confwhitelist.append at runtime. It is not in list of params that are allowed to be modified at runtime (state=08S01,code=0)
則應在ambari的services菜單中找到Hive,在右邊CONFIGS -> Filter中輸入hive.security,把
Enable Authorization后面的勾勾掉,如下圖:

Enable Authorization勾掉

,點保存后再次在hdfs用戶下重新執行
/usr/hdp/3.0.1.0-187/kylin/bin/sample.sh應該可以得到解決。

2、Cannot modify hive.security.authorization.sqlstd.confwhitelist.append at runtime

這個錯誤其實是上一個錯誤hdfs用戶執行/usr/hdp/3.0.1.0-187/kylin/bin/sample.sh語句出現的錯誤,這里單獨列出來,方便查詢。
解決方法:
在ambari的services菜單中找到Hive,在右邊CONFIGS -> Filter中輸入hive.security,把
Enable Authorization后面的勾勾掉,如下圖:

Enable Authorization勾掉

,點保存后再次在hdfs用戶下重新執行
/usr/hdp/3.0.1.0-187/kylin/bin/sample.sh應該可以得到解決。

ambari中啟動kylin報Kylin is not running錯誤

  • 錯誤描述:
Traceback (most recent call last):
  File "/var/lib/ambari-agent/cache/stacks/HDP/3.0/services/KYLIN/package/scripts/kylin_query.py", line 74, in <module>
    KylinQuery().execute()
  File "/usr/lib/ambari-agent/lib/resource_management/libraries/script/script.py", line 352, in execute
    method(env)
  File "/var/lib/ambari-agent/cache/stacks/HDP/3.0/services/KYLIN/package/scripts/kylin_query.py", line 66, in restart
    self.stop(env)
  File "/var/lib/ambari-agent/cache/stacks/HDP/3.0/services/KYLIN/package/scripts/kylin_query.py", line 59, in stop
    Execute(cmd, user='hdfs')
  File "/usr/lib/ambari-agent/lib/resource_management/core/base.py", line 166, in __init__
    self.env.run()
  File "/usr/lib/ambari-agent/lib/resource_management/core/environment.py", line 160, in run
    self.run_action(resource, action)
  File "/usr/lib/ambari-agent/lib/resource_management/core/environment.py", line 124, in run_action
    provider_action()
  File "/usr/lib/ambari-agent/lib/resource_management/core/providers/system.py", line 263, in action_run
    returns=self.resource.returns)
  File "/usr/lib/ambari-agent/lib/resource_management/core/shell.py", line 72, in inner
    result = function(command, **kwargs)
  File "/usr/lib/ambari-agent/lib/resource_management/core/shell.py", line 102, in checked_call
    tries=tries, try_sleep=try_sleep, timeout_kill_strategy=timeout_kill_strategy, returns=returns)
  File "/usr/lib/ambari-agent/lib/resource_management/core/shell.py", line 150, in _call_wrapper
    result = _call(command, **kwargs_copy)
  File "/usr/lib/ambari-agent/lib/resource_management/core/shell.py", line 314, in _call
    raise ExecutionFailed(err_msg, code, out, err)
resource_management.core.exceptions.ExecutionFailed: Execution of '/usr/hdp/3.0.1.0-187/kylin/bin/kylin.sh stop' returned 1. which: no java in (/usr/sbin:/sbin:/usr/lib/ambari-server/*:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/var/lib/ambari-agent)
readlink: missing operand
Try 'readlink --help' for more information.
dirname: missing operand
Try 'dirname --help' for more information.
dirname: missing operand
Try 'dirname --help' for more information.
dirname: missing operand
Try 'dirname --help' for more information.
Kylin is not running
  • 解決方法:
    試試直接運行:
[root@VM-16-6-centos bin]# su hdfs
[hdfs@VM-16-6-centos bin]# /usr/hdp/3.0.1.0-187/kylin/bin/kylin.sh start

ambari中啟動kylin報/find-hadoop-conf-dir.sh: No such file or directory錯誤

  • 錯誤描述:
Traceback (most recent call last):
  File "/var/lib/ambari-agent/cache/stacks/HDP/3.0/services/KYLIN/package/scripts/kylin_master.py", line 75, in <module>
    KylinMaster().execute()
  File "/usr/lib/ambari-agent/lib/resource_management/libraries/script/script.py", line 352, in execute
    method(env)
  File "/var/lib/ambari-agent/cache/stacks/HDP/3.0/services/KYLIN/package/scripts/kylin_master.py", line 68, in restart
    self.start(env)
  File "/var/lib/ambari-agent/cache/stacks/HDP/3.0/services/KYLIN/package/scripts/kylin_master.py", line 51, in start
    self.configure(env)
  File "/var/lib/ambari-agent/cache/stacks/HDP/3.0/services/KYLIN/package/scripts/kylin_master.py", line 44, in configure
    Execute(cmd, user="hdfs")
  File "/usr/lib/ambari-agent/lib/resource_management/core/base.py", line 166, in __init__
    self.env.run()
  File "/usr/lib/ambari-agent/lib/resource_management/core/environment.py", line 160, in run
    self.run_action(resource, action)
  File "/usr/lib/ambari-agent/lib/resource_management/core/environment.py", line 124, in run_action
    provider_action()
  File "/usr/lib/ambari-agent/lib/resource_management/core/providers/system.py", line 263, in action_run
    returns=self.resource.returns)
  File "/usr/lib/ambari-agent/lib/resource_management/core/shell.py", line 72, in inner
    result = function(command, **kwargs)
  File "/usr/lib/ambari-agent/lib/resource_management/core/shell.py", line 102, in checked_call
    tries=tries, try_sleep=try_sleep, timeout_kill_strategy=timeout_kill_strategy, returns=returns)
  File "/usr/lib/ambari-agent/lib/resource_management/core/shell.py", line 150, in _call_wrapper
    result = _call(command, **kwargs_copy)
  File "/usr/lib/ambari-agent/lib/resource_management/core/shell.py", line 314, in _call
    raise ExecutionFailed(err_msg, code, out, err)
resource_management.core.exceptions.ExecutionFailed: Execution of 'sh /usr/hdp/3.0.1.0-187/kylin/bin/check-env.sh' returned 1. /usr/hdp/3.0.1.0-187/kylin/bin/check-env.sh: line 21: sourc: command not found
/usr/hdp/3.0.1.0-187/kylin/bin/check-env.sh: line 24: /find-hadoop-conf-dir.sh: No such file or directory

可能是文件沒有讀取到環境變量,所以找不到所在文件。

  • 解決方法:
[root@VM-16-2-centos bin]# cd /usr/hdp/3.0.1.0-187/kylin/bin
[root@VM-16-2-centos bin]# vim check-env.sh 
在check-env.sh文件約第20行添加:
export KYLIN_HOME=/usr/hdp/3.1.0.0-78/kylin
export dir=/usr/hdp/3.1.0.0-78/kylin/bin


免責聲明!

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



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