Python Ambari服务器设置:';非类型';对象没有属性';下';
我正在尝试使用在我的EC2实例上安装Hadoop。出现以下错误时,我正在尝试设置ambari服务器:Python Ambari服务器设置:';非类型';对象没有属性';下';,python,hadoop,amazon-ec2,hortonworks-data-platform,ambari,Python,Hadoop,Amazon Ec2,Hortonworks Data Platform,Ambari,我正在尝试使用在我的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
[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'
看来,
platform.linux\u发行版
正在用它的参数创建一个数组,并对其进行其他操作。我在文件中找不到函数的实现,并且有几个文件在同一个目录中,仍然不确定该怎么办 我解决了这个问题,删除了3个None
对象,删除了2个大小的数组,并将它们设置为自己的参数
os_info = platform.linux_distribution(
None, None, None, ['SuSE', 'redhat' ], 0
)
os_name = os_info[0].lower()