You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ambari.apache.org by Krishna Kishore Bonagiri <wr...@gmail.com> on 2015/12/08 13:00:57 UTC

Adding a custom services onto HDP stack

Hi,
   I am trying to add a new custom service to my HDP stack. Added a new
directory for my custom service
at /var/lib/ambari-server/resources/stacks/HDP/2.1/services/SAMPLESRV,
created the metainfo.xml and the other required scripts. But the service
doesn't appear in the list of services through Ambari.

I also tried to add the same through the following curl command, and
getting a Bad Request like below. Please see if you can help.

[root@datanode5 resources]# curl -u admin:admin -i -X POST -d
'{"ServiceInfo":{"service_name":"PX_SAMPLESRV"}}'
http://9.126.90.236:8080/api/v1/clusters/HadoopCluster/services
HTTP/1.1 400 Bad Request
Set-Cookie: AMBARISESSIONID=udr70j73sob4x1f5dmq93coi;Path=/
Content-Type: text/plain;charset=ISO-8859-1
Content-Length: 47
Server: Jetty(7.6.7.v20120910)

{
  "status": 400,
  "message": "Bad Request"
}

Thanks,
Kishore

Re: Adding a custom services onto HDP stack

Posted by Krishna Kishore Bonagiri <wr...@gmail.com>.
Yes, I restarted the ambari-server after adding my new files.

On Tue, Dec 8, 2015 at 8:03 PM, James Tanner <ta...@gmail.com> wrote:

> Did you restart ambari-server after adding your new files?
>
> On Tue, Dec 8, 2015 at 7:00 AM, Krishna Kishore Bonagiri <
> write2kishore@gmail.com> wrote:
>
>> Hi,
>>    I am trying to add a new custom service to my HDP stack. Added a new
>> directory for my custom service
>> at /var/lib/ambari-server/resources/stacks/HDP/2.1/services/SAMPLESRV,
>> created the metainfo.xml and the other required scripts. But the service
>> doesn't appear in the list of services through Ambari.
>>
>> I also tried to add the same through the following curl command, and
>> getting a Bad Request like below. Please see if you can help.
>>
>> [root@datanode5 resources]# curl -u admin:admin -i -X POST -d
>> '{"ServiceInfo":{"service_name":"PX_SAMPLESRV"}}'
>> http://9.126.90.236:8080/api/v1/clusters/HadoopCluster/services
>> HTTP/1.1 400 Bad Request
>> Set-Cookie: AMBARISESSIONID=udr70j73sob4x1f5dmq93coi;Path=/
>> Content-Type: text/plain;charset=ISO-8859-1
>> Content-Length: 47
>> Server: Jetty(7.6.7.v20120910)
>>
>> {
>>   "status": 400,
>>   "message": "Bad Request"
>> }
>>
>> Thanks,
>> Kishore
>>
>
>

Re: Adding a custom services onto HDP stack

Posted by James Tanner <ta...@gmail.com>.
Did you restart ambari-server after adding your new files?

On Tue, Dec 8, 2015 at 7:00 AM, Krishna Kishore Bonagiri <
write2kishore@gmail.com> wrote:

> Hi,
>    I am trying to add a new custom service to my HDP stack. Added a new
> directory for my custom service
> at /var/lib/ambari-server/resources/stacks/HDP/2.1/services/SAMPLESRV,
> created the metainfo.xml and the other required scripts. But the service
> doesn't appear in the list of services through Ambari.
>
> I also tried to add the same through the following curl command, and
> getting a Bad Request like below. Please see if you can help.
>
> [root@datanode5 resources]# curl -u admin:admin -i -X POST -d
> '{"ServiceInfo":{"service_name":"PX_SAMPLESRV"}}'
> http://9.126.90.236:8080/api/v1/clusters/HadoopCluster/services
> HTTP/1.1 400 Bad Request
> Set-Cookie: AMBARISESSIONID=udr70j73sob4x1f5dmq93coi;Path=/
> Content-Type: text/plain;charset=ISO-8859-1
> Content-Length: 47
> Server: Jetty(7.6.7.v20120910)
>
> {
>   "status": 400,
>   "message": "Bad Request"
> }
>
> Thanks,
> Kishore
>