Knox Gateway Administration Guide
Also available as:
PDF
loading table of contents...

Validating Service Connectivity

Use the commands in this section to test connectivity between the gateway host and the Hadoop service, and then test connectivity between an external client to the Hadoop service through the gateway.

[Tip]Tip

If the communication between the gateway host and an internal Hadoop service fails, telnet to the service port to verify that the gateway is able to access the cluster node. Use the hostname and ports you specified in the service definition.

Testing WebHDFS by getting the home directory

  • At the gateway host, enter the following command:

    curl http:// $webhdfs-host :50070/webhdfs/v1?op=GETHOMEDIRECTORY

    The host displays:

    {"Path":"/user/gopher"}
  • At an external client, enter the following command:

    curl https:// $gateway-host : $gateway_port / $gateway / $cluster_name / $webhdfs_service_name /v1?op=GETHOMEDIRECTORY

    The external client displays:

    {"Path":"/user/gopher"}

Testing WebHCat/Templeton by getting the version

  • At the gateway host, enter the following command:

    curl http:// $webhdfs-host :50070/templeton/v1/version

    The host displays:

    {"supportedVersions":["v1"],"version":"v1"}
  • At an external client, enter the following command:

    curl https:// $gateway-host : $gateway_port / $gateway / $cluster_name / $webhcat_service_name /v1/version

    The external client displays:

    {"supportedVersions":["v1"],"version":"v1"}

Testing Oozie by getting the version

  • At the gateway host, enter the following command:

    curl http://$oozie-host :11000/oozie/v1/admin/build-version

    The host displays:

    {"buildVersion":"4.0.0.2.1.2.0-302"} 
  • At an external client, enter the following command:

    curl https://$gateway-host : $gateway_port/$gateway /$cluster_name/$oozie_service_name /v1/admin/build-version

    The external client displays:

    {"buildVersion":"4.0.0.2.1.2.0-302"}

Testing HBase/Stargate by getting the version

  • At the gateway host, enter the following command:

    curl http:// $hbase-host :17000/version

    The host displays:

    rest 0.0.2 JVM: Oracle Corporation 1.7.0_51-24.45-b08 OS: Linux 3.8.0-29-generic amd64 Server:jetty/6.1.26 Jersey:1.8:
  • At an external client, enter the following command:

    curl http:// $hbase-host :17000/version

    The external client displays:

    rest 0.0.2 JVM: Oracle Corporation 1.7.0_51-24.45-b08 OS: Linux 3.8.0-29-generic amd64 Server:jetty/6.1.26 Jersey:1.8

Testing HiveServer2

Both of the following URLs return an authentication error, which users can safely ignore.

  1. At the gateway host, enter:

    curl http://$hive-host:10001/cliservice
  2. At an external client, enter:

    curl https://$gateway-host:$gateway_port/$gateway/$cluster_name/$hive_service_name/cliservice