python - Ambari 服务器设置 : 'NoneType' object has no attribute 'lower'

标签 python hadoop amazon-ec2 hortonworks-data-platform ambari

我正在尝试使用 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-size 数组并使它们成为自己的参数。 However now Ambari is causing another problem.

关于python - Ambari 服务器设置 : 'NoneType' object has no attribute 'lower' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29738554/

相关文章:

python - 如何以列而不是行的形式显示表格中的数据?

python给出一个E501 : line too long error

hadoop - 运行 Phoenix 示例错误

amazon-web-services - 如何在AWS EMR上安装Hadoop 3?

kubernetes - 如何增加 Terraformed EKS 节点的体积

java - 使用 Play 框架的 EC2 连接到 RDS

python - Numpy:按键函数排序

python - Python 编译器是否有可能优化掉一些整数运算?

hadoop - 通过使用水槽将本地文件源到HDFS接收器

amazon-web-services - 如何使用云模板添加存储?