Support Questions
Find answers, ask questions, and share your expertise
Announcements
Check out our newest addition to the community, the Cloudera Innovation Accelerator group hub.

access livy server using curl

How can I access livy sever using curl command? When I try curl hostaname:8998, it is throwing 401 error

I created the ticket and tried using userID livy and having same issue

1 ACCEPTED SOLUTION

Super Mentor

@Anpan K

Can you please share the output of the following command to see if there is a valid Kerberos ticket?

# klist

.

Also please share the exact command which you are using ? Is it somethink like mentioned in the SupportKB https://community.hortonworks.com/content/supportkb/210571/how-to-submit-spark-job-using-livy-rest-a...

# curl -iv -X POST --negotiate -u:<any-user> --data '{"file": "/tmp/spark-client/lib/spark-examples.jar", "className": "org.apache.spark.examples.SparkPi", "args": ["100"]}' -H "Content-Type: application/json" node1.localdomain:8998/batches

.

Can you please post the complete stacktrace of the error which you are getting ?

View solution in original post

2 REPLIES 2

Super Mentor

@Anpan K

Can you please share the output of the following command to see if there is a valid Kerberos ticket?

# klist

.

Also please share the exact command which you are using ? Is it somethink like mentioned in the SupportKB https://community.hortonworks.com/content/supportkb/210571/how-to-submit-spark-job-using-livy-rest-a...

# curl -iv -X POST --negotiate -u:<any-user> --data '{"file": "/tmp/spark-client/lib/spark-examples.jar", "className": "org.apache.spark.examples.SparkPi", "args": ["100"]}' -H "Content-Type: application/json" node1.localdomain:8998/batches

.

Can you please post the complete stacktrace of the error which you are getting ?

thanks, it works.