我使用本教程试图安装Hadoop的在我的EC2实例。 我试图建立的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...
Configuring database...
Enter advanced database configuration [y/n] (n)?
Default properties detected. Using built-in database.
Checking PostgreSQL...
Configuring local database...
Connecting to the database. Attempt 1...
Configuring PostgreSQL...
Traceback (most recent call last):
File "/usr/sbin/ambari-server.py", line 4242, in <module>
main()
File "/usr/sbin/ambari-server.py", line 4061, in main
setup(options)
File "/usr/sbin/ambari-server.py", line 2129, in setup
retcode = configure_postgres()
File "/usr/sbin/ambari-server.py", line 863, in configure_postgres
configure_pg_hba_postgres_user()
File "/usr/sbin/ambari-server.py", line 841, in configure_pg_hba_postgres_user
for line in fileinput.input(PG_HBA_CONF_FILE, inplace=1):
File "/usr/lib64/python2.6/fileinput.py", line 253, in next
line = self.readline()
File "/usr/lib64/python2.6/fileinput.py", line 322, in readline
os.rename(self._filename, self._backupfilename)
OSError: [Errno 2] No such file or directory
我看着这件事,显然os.rename
只是重命名一个文件,当这个错误发生,这是因为一些文件,我想重新命名不存在。 但是我不知道它需要什么文件重命名和readline
功能具有self
作为它的参数,所以这个问题可能不会在功能启动。 我知道蟒蛇少量但由于程序做了太多让我知道在哪里可以修复它。