0

I have made an EC2 key pair and saved it to a location under my home directory on mac. Also I have changed permissions with 'chmod 600 /path/to/saved/keypair/file.pem'. Now I have followed the following instructions to run pig jobs on EC2:

To set up and connect to a pig cluster, perform the following steps:

  1. Go to http://console.aws.amazon.com/elasticmapreduce/home signing in if necessary.
  2. Click the "Create Cluster".
  3. Enter "Data Science Assignment Cluster" or anything you wish as the Cluster Name.
  4. Uncheck the Logging box so that it is disabled.
  5. Scroll down to Software Configuration and select AMI Version 2.4.2 (We will be using Hadoop 1.x for compatibility with the version of Pig)
  6. Scroll down to "Security and Access" and select the Key Pair you created above.
  7. Scroll to the bottom and select "Create Cluster"
  8. On the next page, information about your cluster will be displayed. It will begin in the "Starting" state and may take several minutes to startup completely.
  9. Once the cluster has started, you will see a "Master Public DNS" name of the form ec2-XX-XXX-X-XXX.compute-1.amazonaws.com. Make a note of this; we will refer to it as master.public-dns-name.amazonaws.com.
  10. Now you are ready to connect to your cluster and run Pig jobs. From a terminal, use the following command: $ ssh -o "ServerAliveInterval 10" -i /path/to/saved/keypair/file.pem [email protected]
  11. Once you connect successfully, just type
    $ pig
  12. Now you should have a pig prompt
    grunt>

Having executed the ssh command in step 10 I get a '>' prompt after hitting enter. Further if I write pig at the '>' prompt then I get again a '>' prompt in the next line instead of the expected 'grunt>' prompt. I have checked that ssh is installed on my mac and remote login is enabled for all users in 'sharing' settings under system preferences. What seems to be the problem here?

2
  • You mistyped the ssh command. Hit Ctrl-C and try again. Aug 3, 2014 at 14:19
  • @Michael- What exactly have I mistyped with the ssh command? I did do Ctrl+C at '>' prompt upon which I got back the $ prompt with home directory, and I have typed out the entire ssh command manually, but still the same problem.
    – PronojitS
    Aug 3, 2014 at 16:05

1 Answer 1

0

The problem seemed to be generating from the path name of the EC2 key pair in the ssh command of step 10. My key pair was on desktop. So earlier, I tried executing the ssh command from the HOME$ prompt and mentioned the pathname of key pair file in the ssh command of step 10 of the instructions as '/desktop/key-pair-filename.pem', and it dint work.

But then, at the terminal window I changed to the desktop directory ('cd desktop'). After that I executed the ssh command this time by simply putting 'key-pair-filename.pem' instead of '/desktop/key-pair-filename.pem' and it worked.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .