Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]

Community Articles

Find and share helpful community-sourced technical articles.
Announcements
Share your experience with Cloudera on G2 and get a $25 Amazon Gift card.
Hi, I'm CLEO! Something exciting is coming to the Community. Stay Tuned!
Labels (1)
avatar
Super Guru

Problem Statement:

When you try to execute GET call using ambari api to list/GET services, it usually gives error as shown below -

# curl -u admin:admin -H "X-Requested-By: ambari" -X GET  http://<AMBARI_SERVER_HOST>:8080/api/v1/clusters/<cluster_name>/services/

curl: (1) Protocol  http not supported or disabled in libcurl

OR

# curl -u admin:admin -H "X-Requested-By: ambari" -X GET “http://node1.example.com:8080/api/v1/clusters/HDP_TEST/services/“

curl: (1) Protocol “http not supported or disabled in libcurl

Solution:

  1. It’s a tipical curl_php error, but, the error response is not very, ehmmmm easy to deduce. It’s simple, surely there is an extra space before ‘http’, so check the CURLOPT_URL declaration, and search for this space, and then, delete it!!!!
  2. Make sure the syntax of double quotes is correct. This also leads to the error.
1,519 Views
Version history
Last update:
‎05-27-2016 01:20 PM
Updated by:
Contributors