Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Error when creating instances using ambari

Error when creating instances using ambari

Hi team,

when i try creating instances using Ambari for the first time, the process is failing, and the error message I see is pasted below. Where can I specify to use ec2-user and not root?

PLease note - I am using AWS and running redhat linux.

ambari version is 2.2.1.0

Thanks in advance

Naveen Keshava

==========================
Creating target directory...
==========================

Command start time 2017-05-10 06:54:17
Please login as the user "ec2-user" rather than the user "root".
Connection to ip-10-0-0-202.eu-west-2.compute.internal closed.
SSH command execution finished
host=ip-10-0-0-202.eu-west-2.compute.internal, exitcode=0
Command end time 2017-05-10 06:54:27

==========================
Copying common functions script...
==========================

Command start time 2017-05-10 06:54:27

Please login as the user "ec2-user" rather than the user "root".
scp /usr/lib/python2.6/site-packages/ambari_commons
host=ip-10-0-0-202.eu-west-2.compute.internal, exitcode=1
Command end time 2017-05-10 06:54:37

==========================
Copying OS type check script...
==========================

Command start time 2017-05-10 06:54:37

Please login as the user "ec2-user" rather than the user "root".
scp /usr/lib/python2.6/site-packages/ambari_server/os_check_type.py
host=ip-10-0-0-202.eu-west-2.compute.internal, exitcode=1
Command end time 2017-05-10 06:54:48

ERROR: Bootstrap of host ip-10-0-0-202.eu-west-2.compute.internal fails because previous action finished with non-zero exit code (1)
ERROR MESSAGE: Please login as the user "ec2-user" rather than the user "root".

STDOUT: 
Please login as the user "ec2-user" rather than the user "root".
7 REPLIES 7
Highlighted

Re: Error when creating instances using ambari

Super Mentor

@Naveen Keshava

You can setup ambari-server to run as a non-root user.

Please refer to the following doc: http://docs.hortonworks.com/HDPDocuments/Ambari-2.5.0.3/bk_ambari-security/content/configuring_ambar...

.

During the ambari-server setup process, when prompted to Customize user account for ambari-server daemon?, choose y.

Highlighted

Re: Error when creating instances using ambari

Thanks for your response @Jay SenSharma. So does that mean, I have to un install my ambari server set up and then re-install it to get to the step mentioned above?

Highlighted

Re: Error when creating instances using ambari

Super Mentor

@Naveen Keshava

No you do not need to uninstall ambari.

Just try the following stop ambari and then do the setup again.

# ambari-server stop
# ambari-server setup

.

Later you should also configure the ambari-agents as well to run as non root:

http://docs.hortonworks.com/HDPDocuments/Ambari-2.5.0.3/bk_ambari-security/content/how_to_configure_...

Highlighted

Re: Error when creating instances using ambari

Thanks @Jay SenSharma, I am still getting the same error message. what i did is,

stopped the server and initiated set up and used "hadoop" user. I then started the server and tried again in ambari. I got the same error message.

To verify, I again ran the setup command, and I could see that ambari has understood the "hadoop" user as you can see below.

[root@ip-10-0-0-60 etc]# ambari-server setup

Using python /usr/bin/python2 Setup ambari-server Checking SELinux... SELinux status is 'enabled' SELinux mode is 'permissive' WARNING: SELinux is set to 'permissive' mode and temporarily disabled. OK to continue [y/n] (y)? y

Ambari-server daemon is configured to run under user 'hadoop'. Change this setting [y/n] (n)?

Thanks

Naveen

Highlighted

Re: Error when creating instances using ambari

Super Mentor

@Naveen Keshava

There is a good article available on Setting Ambari Based HAdoop Cluster on EC2 .. may be you can compare the steps once to see any step is missing:

https://hortonworks.com/blog/deploying-hadoop-cluster-amazon-ec2-hortonworks/

.

Highlighted

Re: Error when creating instances using ambari

@Jay SenSharma

Thanks, that was the article I was following indeed and I think I have followed all the steps listed in there - as far as I can say. Is there any other way to perhaps see the config file, of ambari? where I can see if it is hardcoded as "root"?

Highlighted

Re: Error when creating instances using ambari

It turned out that in the install options page, "root" is the default value and all I had to do was change the default value to ec2-user. and then it worked :) @Jay SenSharma

Don't have an account?
Coming from Hortonworks? Activate your account here