Hi,

I had already tried restart of Ambari server because the db was edited at some point to make sure the host-component was in a known state (set version number and set INSTALLED). Tried a new restart now, including the postgresql db for good measure. Still same 404 for service+component, and 500 for host+component (for DELETEs).

The GETs are listed below. I double-checked and see that service-10-0 still has STORM_REST_API listed as a component, and servicecomponentdesiredstate still has STORM_REST_API as well.

Thanks,
Eirik

curl -u admin:admin -i -X GET -H 'X-Requested-By: ambari' http://localhost:8080/api/v1/clusters/helm/services/STORM
HTTP/1.1 200 OK
Set-Cookie: AMBARISESSIONID=17av8wwjl78ozqn2wki23f242;Path=/
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Content-Type: text/plain
Content-Length: 729
Server: Jetty(7.6.7.v20120910)

{
  "href" : "http://localhost:8080/api/v1/clusters/helm/services/STORM";,
  "ServiceInfo" : {
    "cluster_name" : "helm",
    "maintenance_state" : "OFF",
    "service_name" : "STORM",
    "state" : "UNKNOWN"
  },
  "alerts_summary" : {
    "CRITICAL" : 1,
    "MAINTENANCE" : 0,
    "OK" : 0,
    "UNKNOWN" : 0,
    "WARNING" : 0
  },
  "alerts" : [
    {
"href" : "http://localhost:8080/api/v1/clusters/helm/services/STORM/alerts/8";,
      "Alert" : {
        "cluster_name" : "helm",
        "definition_id" : 24,
        "definition_name" : "storm_supervisor_process_percent",
        "host_name" : null,
        "id" : 8,
        "service_name" : "STORM"
      }
    }
  ],
  "components" : [ ],
  "artifacts" : [ ]

=====================

curl -i -u admin:admin -X GET http://localhost:8080/api/v1/clusters/helm/hosts/service-10-0.local/host_components
HTTP/1.1 200 OK
Set-Cookie: AMBARISESSIONID=tjn6m87o7t7ox0juqnrt8fvx;Path=/
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Content-Type: text/plain
Content-Length: 3258
Server: Jetty(7.6.7.v20120910)

{
"href" : "http://localhost:8080/api/v1/clusters/helm/hosts/service-10-0.local/host_components";,
  "items" : [
    {
"href" : "http://localhost:8080/api/v1/clusters/helm/hosts/service-10-0.local/host_components/HBASE_MASTER";,
      "HostRoles" : {
        "cluster_name" : "helm",
        "component_name" : "HBASE_MASTER",
        "host_name" : "service-10-0.local"
      },
      "host" : {
"href" : "http://localhost:8080/api/v1/clusters/helm/hosts/service-10-0.local";
      }
    },
    {
"href" : "http://localhost:8080/api/v1/clusters/helm/hosts/service-10-0.local/host_components/HDFS_CLIENT";,
      "HostRoles" : {
        "cluster_name" : "helm",
        "component_name" : "HDFS_CLIENT",
        "host_name" : "service-10-0.local"
      },
      "host" : {
"href" : "http://localhost:8080/api/v1/clusters/helm/hosts/service-10-0.local";
      }
    },
    {
"href" : "http://localhost:8080/api/v1/clusters/helm/hosts/service-10-0.local/host_components/MAPREDUCE2_CLIENT";,
      "HostRoles" : {
        "cluster_name" : "helm",
        "component_name" : "MAPREDUCE2_CLIENT",
        "host_name" : "service-10-0.local"
      },
      "host" : {
"href" : "http://localhost:8080/api/v1/clusters/helm/hosts/service-10-0.local";
      }
    },
    {
"href" : "http://localhost:8080/api/v1/clusters/helm/hosts/service-10-0.local/host_components/METRICS_MONITOR";,
      "HostRoles" : {
        "cluster_name" : "helm",
        "component_name" : "METRICS_MONITOR",
        "host_name" : "service-10-0.local"
      },
      "host" : {
"href" : "http://localhost:8080/api/v1/clusters/helm/hosts/service-10-0.local";
      }
    },
    {
"href" : "http://localhost:8080/api/v1/clusters/helm/hosts/service-10-0.local/host_components/NAMENODE";,
      "HostRoles" : {
        "cluster_name" : "helm",
        "component_name" : "NAMENODE",
        "host_name" : "service-10-0.local"
      },
      "host" : {
"href" : "http://localhost:8080/api/v1/clusters/helm/hosts/service-10-0.local";
      }
    },
    {
"href" : "http://localhost:8080/api/v1/clusters/helm/hosts/service-10-0.local/host_components/SPARK_JOBHISTORYSERVER";,
      "HostRoles" : {
        "cluster_name" : "helm",
        "component_name" : "SPARK_JOBHISTORYSERVER",
        "host_name" : "service-10-0.local"
      },
      "host" : {
"href" : "http://localhost:8080/api/v1/clusters/helm/hosts/service-10-0.local";
      }
    },
    {
"href" : "http://localhost:8080/api/v1/clusters/helm/hosts/service-10-0.local/host_components/TEZ_CLIENT";,
      "HostRoles" : {
        "cluster_name" : "helm",
        "component_name" : "TEZ_CLIENT",
        "host_name" : "service-10-0.local"
      },
      "host" : {
"href" : "http://localhost:8080/api/v1/clusters/helm/hosts/service-10-0.local";
      }
    },
    {
"href" : "http://localhost:8080/api/v1/clusters/helm/hosts/service-10-0.local/host_components/YARN_CLIENT";,
      "HostRoles" : {
        "cluster_name" : "helm",
        "component_name" : "YARN_CLIENT",
        "host_name" : "service-10-0.local"
      },
      "host" : {
"href" : "http://localhost:8080/api/v1/clusters/helm/hosts/service-10-0.local";
      }
    }
  ]
}

Reply via email to