Database Reference
In-Depth Information
Now, I restart the Ambari agent as the root user:
ambari-agent restart
When the agent starts, it registers with the server so that the server has a list of the agent hostnames. I can check
this list by using the curl command and see all the fully qualified server names I have previously specified. For
example, the following curl command accesses the Ambari server URL by using the username and password admin
provided by the -u option. It requests a list of hosts from the server, which is displayed as shown here. For instance, I
ran this command as the Linux root user from the cluster2 Name Node machine hc2nn:
[root@hc2nn ~]# curl -u admin:admin http://hc2nn:8080/api/v1/hosts
{
"href" : "http://192.168.1.103:8080/api/v1/hosts",
"items" : [
{
"href" : "http://192.168.1.103:8080/api/v1/hosts/hc2nn.semtech-solutions.co.nz",
"Hosts" : {
"host_name" : "hc2nn.semtech-solutions.co.nz"
}
},
{
"href" : "http://192.168.1.103:8080/api/v1/hosts/hc2r1m1.semtech-solutions.co.nz",
"Hosts" : {
"host_name" : "hc2r1m1.semtech-solutions.co.nz"
}
},
{
"href" : "http://192.168.1.103:8080/api/v1/hosts/hc2r1m2.semtech-solutions.co.nz",
"Hosts" : {
"host_name" : "hc2r1m2.semtech-solutions.co.nz"
}
},
{
"href" : "http://192.168.1.103:8080/api/v1/hosts/hc2r1m3.semtech-solutions.co.nz",
"Hosts" : {
"host_name" : "hc2r1m3.semtech-solutions.co.nz"
}
},
{
"href" : "http://192.168.1.103:8080/api/v1/hosts/hc2r1m4.semtech-solutions.co.nz",
"Hosts" : {
"host_name" : "hc2r1m4.semtech-solutions.co.nz"
}
}
]
}
If the full list of server names in this output looks correct, I return to the Ambari user interface and manually
register the agent servers. I can see that all of the servers in cluster2 are listed in the output of the curl command just
given. Figure 8-1 shows notification of a successful registration.
 
Search WWH ::




Custom Search