我正在尝试使用本教程在我的ec2示例上设置hadoop。当我遇到以下错误时,我正在尝试设置ambari服务器:
[root@ip-xxx-xxx-xxx-xxx ec2-user]# ambari-server setup
Using python /usr/bin/python2.6
Setup ambari-server
Checking SELinux...
WARNING: Could not run /usr/sbin/sestatus: OK
Ambari-server daemon is configured to run under user 'root'. Change this setting [y/n] (n)?
Adjusting ambari-server permissions and ownership...
Checking iptables...
Checking JDK...
JCE Policy archive already exists, using /var/lib/ambari-server/resources/jce_policy-6.zip
Completing setup...
Traceback (most recent call last):
File "/usr/sbin/ambari-server.py", line 4236, in <module>
main()
File "/usr/sbin/ambari-server.py", line 4055, in main
setup(options)
File "/usr/sbin/ambari-server.py", line 2089, in setup
retcode = configure_os_settings()
File "/usr/sbin/ambari-server.py", line 1909, in configure_os_settings
os_name = os_info[0].lower()
AttributeError: 'NoneType' object has no attribute 'lower'
我真的不知道这是怎么发生的,也不知道该怎么做来解决这个问题。有人知道我做错了什么吗?
编辑:我在网站上查看了代码,发现:
os_info = platform.linux_distribution(
None, None, None, ['SuSE', 'redhat' ], 0
)
os_name = os_info[0].lower()
看来 platform.linux_distribution
是用它的参数创建一个数组并对其执行其他操作。我在文件中找不到函数的实现,并且有几个文件在同一个目录中,仍然不确定该怎么办。
1条答案
按热度按时间tyu7yeag1#
我解决了问题,我去掉了3个
None
对象并移除2大小的数组,并使它们成为自己的参数。然而,现在Ambari正在引发另一个问题。