Archives of Support Questions (Read Only)

This is an archived board for historical reference. Information and links may no longer be available or relevant
Announcements
This board is archived and read-only for historical reference. To ask a new question, please post a new topic on the appropriate active board.

access livy server using curl

avatar

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

avatar
Master 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

avatar
Master 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 ?

avatar

thanks, it works.