[2021-03-27 06:27:22,991] {{models.py:1736}} ERROR - [Errno 13] Permission denied: 'beeline'
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/airflow/models.py", line 1633, in _run_raw_task
result = task_copy.execute(context=context)
File "/usr/local/lib/python3.6/site-packages/airflow/operators/hive_operator.py", line 134, in execute
self.hook.run_cli(hql=self.hql, schema=self.schema, hive_conf=self.hiveconfs)
File "/usr/local/lib/python3.6/site-packages/airflow/hooks/hive_hooks.py", line 226, in run_cli
close_fds=True)
File "/usr/local/lib/python3.6/subprocess.py", line 709, in __init__
restore_signals, start_new_session)
File "/usr/local/lib/python3.6/subprocess.py", line 1344, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
PermissionError: [Errno 13] Permission denied: 'beeline'
原因beeline没有权限
解决办法
1、以root模式进入容器中
docker-compose exec -u root webserver bash
2、找到beeline命令所在的文件夹,并进入其中
通常直接执行beeline报错后会返回beeline所在的位置
如下
root@9432737fc0ae:/usr/local/airflow# beeline
/usr/lib/hive/bin/beeline: line 26: ps: command not found
/usr/lib/hive/bin/beeline: line 26: ps: command not found
Missing Hive Execution Jar: /usr/lib/hive/lib/hive-exec-*.jar