Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

connection refused - AWS (HDPCD practice exam) : getting this error eventhouth i restarted ambari-agent

avatar
Rising Star

Hi there,

I'm trying to work with AWS for HDPCD practice exam. I ran " hdfs dfs -ls / " cmd on the terminal and getting " connection refused error". I could see all the services are not running and displays with red colour rectangle icon. I ran the below command

ssh root@namenode

password: hadoop

service ambari-agent restart

exit

~/start-all-services.sh

but, no services are running except Zookeeper and Ganglia services. Please let me know to solve this issue. Thanks! @rich

1 ACCEPTED SOLUTION

avatar
Guru
hide-solution

This problem has been solved!

Want to get a detailed solution you have to login/registered on the community

Register/Login
30 REPLIES 30

avatar
Guru

Like I said in the answer above, if restarting services fails then the quickest and easiest fix is to terminate the EC2 instance and start a new one. Have you done that yet? I can't login to your instance - I do not know the IP address.

avatar
Rising Star

Hi thanks for your reply. I terminated the old one and this is the new one and still the same problem.

Public DNS: ec2-54-86-20-155.compute-1.amazonaws.com

Public IP 54.86.20.155 Could you please login and see what the issue is ? Thanks..

avatar
Rising Star

Hi rich, I greatly appreciate your help. Thanks for your support. I'd like to know what the issue is for future reference.. Once again Thanks..

avatar
Guru

The correct answer is up above - about turning off safemode on the namenode

avatar
Master Mentor

@rich Is it possible to write an article on this topic ? @Mark Herring

avatar
Guru

I explained the fix above and the steps involved, but my answer got out of order in this discussion. It's the answer about shutting off safemode on the NN.

avatar
Guru

Hi @Jeeva Jeeva : it looks like your NameNode was in safemode. Leaving safemode allowed your cluster to startup properly. Here is what I did - then ran start_all_services.sh and everything started up fine:

$ ssh root@namenode   (password is "hadoop")
# su - hdfs
$ hdfs dfsadmin -safemode leave

avatar
New Contributor

ec2-54-186-154-189.us-west-2.compute.amazonaws.com.. am also facing this issue.. please help me

avatar
Guru

1. Restart ambari-agent

2. Run the start_all_services.sh script

3. Wait 5 minutes and see if the cluster is up and running

If those steps fail, then terminate your EC2 instance and build a new one. That will be quicker than trying to debug the issue.

avatar
New Contributor

I am also facing the same issue, cam you please help. I tried all the options in the blog. Twice I rebuild the cluster as well. I am not able to start & work.