I'm trying to setup Hadoop on my EC2 instance using this tutorial. I'm trying to setup the ambari server when I get this error:
[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
I've looked this up and apparently os.rename
is just renaming a file and when this error happens, it because some file I'm trying to rename doesn't exist. However I don't know what file it wants to rename and the readline
function has self
as its parameter so the problem may not start in the function. I know a small amount of python but since program is doing way too much for me to know where to fix it.