Support Questions

Find answers, ask questions, and share your expertise

Can Ambari server and agent run on same host ?

avatar
Contributor

Hello,

I am a newbie to horton and ambari. I am trying to make a 2 node hadoop cluster with physical server.

I am thinking of using Ambari to do provisioning. However since i only have 2 nodes, can i use Ambari server and ambari-agent on same node?

Right now if i do that, ambari-agent fails to startup and gives java unknown host exception . when i used FQDN

Thanks

1 ACCEPTED SOLUTION

avatar

Yes thats possible and necessary if you want to add services to your Ambari-server node.

How does your Ambari Agent configuration look like?

Make sure you have prepared the environment according to http://docs.hortonworks.com/HDPDocuments/Ambari-2.1.2.1/bk_Installing_HDP_AMB/content/_prepare_the_e..., especially DNS settings.

View solution in original post

33 REPLIES 33

avatar

Yes thats possible and necessary if you want to add services to your Ambari-server node.

How does your Ambari Agent configuration look like?

Make sure you have prepared the environment according to http://docs.hortonworks.com/HDPDocuments/Ambari-2.1.2.1/bk_Installing_HDP_AMB/content/_prepare_the_e..., especially DNS settings.

avatar
Contributor

Thanks Jonas for the reply.

The issue is now resolved but the ambari-server stuck on step 8,

Preparing to Deploy 0 of 42 tasks,

Please note , that i am behind proxy server

avatar
Master Mentor
@Majid Ali Syed Amjad Ali Sayed

I see your last comments and looks like that you are stuck on the install. Are you still facing the issue?

avatar
Master Mentor
@Majid Ali Syed Amjad Ali Sayed

I have 2 node cluster in my demo env.

Node 1 - Ambari server and agent

Node 2 - Ambari agent

Make sure that you have enough resources in the nodes. Anything less than 8GB cause issues like oom and very slow install.

java unknown host exception - This is related to your setup. Make sure that you use FQDN and both nodes can talk to each other.

hostname -f and hostname needs to be same.

avatar
Contributor

My nodes have 10 GB RAM respectively . But still the gui just get stuck at step 8 , when i click deploy

avatar
Master Mentor

@Majid Ali Syed Amjad Ali Sayed I have experienced this few times on slower nodes...patience 🙂

On serious note, check ambari log file and see whats happening there.

avatar
Master Mentor

@Majid Ali Syed Amjad Ali Sayed are you still having problems with this? Can you provide your own solution or accept best answer?

avatar
Contributor

Unfortunately, i am still stuck, the GUI just get stuck on step 8, Installing 8 of 42 tasks. and then timesout.

The logs say that both server and client can communicate and see each other heartbeat.

And yes i have configured proxy in ambari-env.sh

avatar
Master Mentor

@Majid Ali Syed Amjad Ali Sayed

A 2 node cluster shouldn't pose alot of problems, YES the agent and Ambari server can runon te same host

Make sure you did all the belows steps successfully as the root user

1. Validate that your network setup is correct IP,Hostname FQDN etc

2. Run ssh-keygen and copy the id_rsa generated key to all the hosts and configuring passwordless SSH connect between the 2 servers for root user

2. Disable firewall / iptables on all the cluster hosts

3. Disable SELinux

4. Disable Transparent Huge Pages (THP)

5. Configure Database for ambari assuming you are using MySQL and dont forget to yum install mysql-connector-java and the appropriate permissions 644 and pre-load the Ambari database schema into your MySQL database

6. yum install ambari-server

7. ambari-server setup output Ambari Server 'setup' completed successfully.

8. Start the server #ambari-server start

1. Run ssh-keygen and copy the id_rsa generated key to all the hosts 2. Disable firewall / iptables on all the cluster hosts 3. Disable SELinux 4. Disable Transparent Huge Pages (THP) 6. Configure Database for ambari assuming you are using MySQL and dont forget to yum install mysql-connector-java and the appropriate permissions 644 and pre-load the Ambari database schema into your MySQL database

I recently did a 4 node cluster install without tweaking the proxy in ambari-env.sh

Could you paste the screen shot and logs in here