Support Questions
Find answers, ask questions, and share your expertise

python client api get_parcel() throwing 404

Highlighted

python client api get_parcel() throwing 404

New Contributor
parcel = cluster.get_parcel('CDH', PARCEL_VERSION)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.6/site-packages/cm_api/endpoints/clusters.py", line 195, in get_parcel
return parcels.get_parcel(self._get_resource_root(), product, version, self.name)
File "/usr/lib/python2.6/site-packages/cm_api/endpoints/parcels.py", line 33, in get_parcel
return _get_parcel(resource_root, PARCEL_PATH % (cluster_name, product, version))
File "/usr/lib/python2.6/site-packages/cm_api/endpoints/parcels.py", line 36, in _get_parcel
return call(resource_root.get, path, ApiParcel, api_version=3)
File "/usr/lib/python2.6/site-packages/cm_api/endpoints/types.py", line 139, in call
ret = method(path, params=params)
File "/usr/lib/python2.6/site-packages/cm_api/resource.py", line 110, in get
return self.invoke("GET", relpath, params)
File "/usr/lib/python2.6/site-packages/cm_api/resource.py", line 73, in invoke
headers=headers)
File "/usr/lib/python2.6/site-packages/cm_api/http_client.py", line 174, in execute
raise self._exc_class(ex)
cm_api.api_client.ApiException: Parcel for product 'CDH' and version '5.5.1-1.cdh5.5.1.p0.11' is not found in cluster 'TestCluster'. (error 404)

I am seeing this exception while using get_parcel() method to download parcels.

 

I am not able to understand why this is occuring. I am behind proxy but have set http_proxy and https_proxy already. I can use curl, wget without any issues.

2 REPLIES 2
Highlighted

Re: python client api get_parcel() throwing 404

Super Collaborator

Is CDH version '5.5.1-1.cdh5.5.1.p0.11' listed in your parcels list? [1a,b]. if not, add this [2] in your [3] 

 

 

[1a] https://cloudera.github.io/cm_api/apidocs/v11/path__clusters_-clusterName-_parcels.html

[1b] search for "REMOTE_PARCEL_REPO_URLS" in 

http://cm-server-host:7180/api/v6/cm/deployment

[2] http://archive.cloudera.com/cdh5/parcels/5.5.1.11/

[3] CM> Administration> Settings> Parcels> Remote Parcel Repository URLs

 
 
Highlighted

Re: python client api get_parcel() throwing 404

New Contributor

Yes I have added http://archive.cloudera.com/cdh5/parcels/5.5.1.11/ in REMOTE_PARCEL_REPO_URLS using 

get_cloudera_manager().update_config() method.

 

I didn't get 404 when I added repo_url "http://localhost:8080/" following  https://community.cloudera.com/t5/Cloudera-Manager-Installation/No-parcels-found-from-the-configured... and was able to download and distribute parcels. So it should work for http://archive.cloudera.com/cdh5/parcels/5.5.1.11/ too, but each time I get 404.