when i do localhost:8080, the services are not getting started.. and lots of alerts are popped up for the first time.Please let me know the solution ton resolve this.
As you are running Sandbox which includes a lots of services and you might be having only around 8 GB dedicated RAM allocated to your VM (Sandbox) hence all the services might not be running at some point.
So you should do this:
1. Click on "Start All" Services from the left bottom of ambari UI.
2. Check if most of the services came up or not?
If not then this may be due to some memory constraints. So you can do this.... Choose the services which you do not want to use currently and then Put them in "Maintenance Mode" and also stop them so that they do not use memory. And only start the services from ambari UI which you actually want to use currently.
Setting Maintenance Mode enables you to suppress alerts and omit bulk operations for specific services, components, and hosts in an Ambari-managed cluster. Explicitly setting Maintenance Mode for a service implicitly sets Maintenance Mode for components and hosts that run the service. While Maintenance Mode prevents bulk operations being performed on the service, component, or host, you may explicitly start and stop a service, component, or host while in Maintenance Mode.
Means only start the services (and the dependent services) which you are actually using.
3. Once you have put the services which you do not want to use in maintenance mode and Stop them (and those services are not the dependent services like HDFS needs Zookeeper hence both should be running) you should start the services which you want to use and then you shoudl see that most of the alert becomes green.
Please try to restart the ambari agent and then start the following set of services (Zookeeper, HDFS, MapReduce, Yarn, HBase rest of the services you can put in maintenance mode if you do not want to use them and stop them as well):
Step1). Login to the Sandbox using SSH on port 2222 (Or use Web Terminal to run the commands at http://localhost:4200)
# ssh firstname.lastname@example.org -p 2222 Enter password: hadoop # ambari-agent restart
If you see that agent is not running or not starting then please check and share the agent logs
# ls -l /var/log/ambari-agent/ambari-agent.log
Once agent is running fine then you should see Heartbeat properly in ambari UI. then you can try starting the desired services like Zookeeper, HDFS, MapReduce, Yarn, HBase
For ambari operation log just click on the red bar which is failing. In the attached screenshot you will see links on texts which are failing when you click on it then you will see the operation log. Please copy and paste the whole log for the services which are failing to start.
YARN is not running because "HDFS" service is not running hence yarn startup operation is not able to connect to HDFS hence we see the following error:
curl: (7) Failed connect to sandbox-hdp.hortonworks.com:50070; Connection refused 000 stdout: <br>2019-01-06 11:13:50,127 - Stack Feature Version Info: Cluster Stack=2.6, Command Stack=None, Command Version=220.127.116.11-292 -> 18.104.22.168-292 2019-01-06 11:13:50,234 - Using hadoop conf dir<br> AND curl: (7) Failed connect to sandbox-hdp.hortonworks.com:50070; Connection refused
The best thing will be to try starting services in this sequence:
1. Start Zookeeper
2. Start HDFS
3. Start MapReduce/Yarn
4. Start HBase.
Also please check how much memory do you have free on your Sandbox? (Sandbox requires at least 8GB of Dedicated RAM)
# free -m
As you mentioned that your system total RAM is: 8GB and you have allocated 4GB to sandbox.
Sandbox Minimum Requirement: In order to run components without issue, Minimum 8GB RAM you should have dedicated on your 64 bit OS to run the Sandbox without any issue. Less RAM allocation might cause a very slow startup of Sandbox and might cause Hung Or Network Service failure.
Example: If your Laptop has 16GB RAM then you can allocate 8GB to your Sandbox VM to use it properly.