Ambari 服务器设置:'NoneType' 对象没有属性 'lower'

Ambari server setup: 'NoneType' object has no attribute 'lower'

我正在尝试使用 this tutorial 在我的 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 正在用它的参数创建一个数组并对它做一些其他事情。我在文件中找不到函数的实现,并且在同一目录中有几个文件,仍然不确定我应该怎么做。

我解决了这个问题,我删除了 3 个 None 对象并删除了 2 大小的数组并将它们作为自己的参数。 However now Ambari is causing another problem.