問(wèn)題
一次 pip 升級(jí)后灸姊,發(fā)現(xiàn) CDH6.1 運(yùn)行出現(xiàn)警告(當(dāng)時(shí)并不知道是因?yàn)樯?jí) pip 導(dǎo)致的)
查詢?nèi)罩?/var/log/cloudera-scm-server/cloudera-scm-server.log
沒(méi)有有價(jià)值的錯(cuò)誤
于是重啟集群,hue 仍然重啟失敗
錯(cuò)誤只有:
ERROR CommandPusher:com.cloudera.cmf.model.DbCommand: Command 2142(Restart) has completed. finalstate:FINISHED, success:false, msg:Failed to start all the services.
于是刪除 hue 服務(wù)重新添加
在測(cè)試連接數(shù)據(jù)庫(kù)時(shí)岸军,連接失敗企锌。得到報(bào)錯(cuò):
2019-06-27 11:47:20,073 INFO CommandPusher:com.cloudera.cmf.service.AbstractOneOffHostCommand: Unsuccessful 'HueTestDatabaseConnection'
2019-06-27 11:47:20,074 INFO CommandPusher:com.cloudera.cmf.service.AbstractDbConnectionTestCommand: Command exited with code: 1
2019-06-27 11:47:20,074 INFO CommandPusher:com.cloudera.cmf.service.AbstractDbConnectionTestCommand: + '[' ldaptest = is_db_alive ']'
+ exec /opt/cloudera/parcel-repo/CDH-6.1.0-1.cdh6.1.0.p0.770702/lib/hue/build/env/bin/hue is_db_alive
Traceback (most recent call last):
File "/opt/cloudera/parcel-repo/CDH-6.1.0-1.cdh6.1.0.p0.770702/lib/hue/build/env/bin/hue", line 9, in <module>
from pkg_resources import load_entry_point
File "/opt/cloudera/parcel-repo/CDH-6.1.0-1.cdh6.1.0.p0.770702/lib/hue/build/env/lib/python2.7/site-packages/pkg_resources/__init__.py", line 3126, in <module>
@_call_aside
File "/opt/cloudera/parcel-repo/CDH-6.1.0-1.cdh6.1.0.p0.770702/lib/hue/build/env/lib/python2.7/site-packages/pkg_resources/__init__.py", line 3110, in _call_aside
f(*args, **kwargs)
File "/opt/cloudera/parcel-repo/CDH-6.1.0-1.cdh6.1.0.p0.770702/lib/hue/build/env/lib/python2.7/site-packages/pkg_resources/__init__.py", line 3139, in _initialize_master_working_set
working_set = WorkingSet._build_master()
File "/opt/cloudera/parcel-repo/CDH-6.1.0-1.cdh6.1.0.p0.770702/lib/hue/build/env/lib/python2.7/site-packages/pkg_resources/__init__.py", line 572, in _build_master
ws = cls()
File "/opt/cloudera/parcel-repo/CDH-6.1.0-1.cdh6.1.0.p0.770702/lib/hue/build/env/lib/python2.7/site-packages/pkg_resources/__init__.py", line 565, in __init__
self.add_entry(entry)
File "/opt/cloudera/parcel-repo/CDH-6.1.0-1.cdh6.1.0.p0.770702/lib/hue/build/env/lib/python2.7/site-packages/pkg_resources/__init__.py", line 621, in add_entry
for dist in find_distributions(entry, True):
File "/opt/cloudera/parcel-repo/CDH-6.1.0-1.cdh6.1.0.p0.770702/lib/hue/build/env/lib/python2.7/site-packages/pkg_resources/__init__.py", line 1968, in find_on_path
for dist in factory(fullpath):
File "/opt/cloudera/parcel-repo/CDH-6.1.0-1.cdh6.1.0.p0.770702/lib/hue/build/env/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2030, in distributions_from_metadata
if len(os.listdir(path)) == 0:
OSError: [Errno 13] Permission denied: '/usr/lib/python2.7/site-packages/pip-19.1.1.dist-info'
2019-06-27 11:47:20,074 ERROR CommandPusher:com.cloudera.cmf.model.DbCommand: Command 2332(HueTestDatabaseConnection) has completed. finalstate:FINISHED, success:false, msg:Unexpected error. Unable to verify database connection.
可以看出是對(duì) pip-19.1.1.dist-info
的權(quán)限不夠
(由于剛升級(jí) pip 到 pip19辟狈,因此想到是 pip 升級(jí)導(dǎo)致 hue 沒(méi)有足夠權(quán)限叹誉,啟動(dòng)失敗)
解決方法
找到 pip-19.1.1.dist-info
所在路徑忿项,賦權(quán)限755蓉冈。繼續(xù)添加 hue,成功轩触。
chmod 755 -R pip-19.1.1.dist-info