Question

I'm new to Amazon web services, I'm trying to run job flows on Amazon elastic map reduce jobs using command line interface tools.

I followed the steps from amazon developer guide of this developer guide from aws.But things are not getting clear to me.

If I execute the command ./elastic-mapreduce --list to list the job flows. Shows the Following error.

/home/pdurai/Applications/elastic-mapreduce-cli/amazon/coral/httpdestinationhandler.rb:23: warning: else without rescue is useless
/usr/local/rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': /home/pdurai/Applications/elastic-mapreduce-cli/amazon/coral/httpdestinationhandler.rb:19: syntax error, unexpected ':', expecting keyword_then or ',' or ';' or '\n' (SyntaxError)
/home/pdurai/Applications/elastic-mapreduce-cli/amazon/coral/httpdestinationhandler.rb:36: syntax error, unexpected keyword_end, expecting $end
    from /usr/local/rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /home/pdurai/Applications/elastic-mapreduce-cli/amazon/coral/awsquery.rb:6:in `<top (required)>'
    from /usr/local/rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /usr/local/rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /home/pdurai/Applications/elastic-mapreduce-cli/amazon/coral/service.rb:8:in `<top (required)>'
    from /usr/local/rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /usr/local/rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /home/pdurai/Applications/elastic-mapreduce-cli/amazon/coral/elasticmapreduceclient.rb:6:in `<top (required)>'
    from /usr/local/rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /usr/local/rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /home/pdurai/Applications/elastic-mapreduce-cli/client.rb:6:in `<top (required)>'
    from /usr/local/rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /usr/local/rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /home/pdurai/Applications/elastic-mapreduce-cli/commands.rb:7:in `<top (required)>'
    from /usr/local/rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /usr/local/rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /home/pdurai/Applications/elastic-mapreduce-cli/elastic-mapreduce-cli.rb:5:in `<top (required)>'
    from /usr/local/rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /usr/local/rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from ./elastic-mapreduce:6:in `<main>'

Thanks in Advance, and Can anyone Please tell me Why i am getting the above error while listing the job flows.

Was it helpful?

Solution

check the avilable rvm, by using the following command

   $ rvm list

it will show:

   ruby-1.8.7-p374
   ruby-2.0.0-p247

then you should specifiy the rvm version, by using the following command

   $ rvm use 1.8.7

then you can try to list the jobflows . . .

OTHER TIPS

If rvm doesn't work for you, you can try changing the Current symbolic link:

cd /System/Library/Frameworks/Ruby.framework/Versions
sudo rm Current
sudo ln -s 1.8 Current

You may have to adjust the 3rd parameter to point to the correct version.

I recommend learning how to do the process first using the service console.

It seems that your command line tool is not able to connect correctly. Maybe this is an issue with your access_key and secret_key.

as @sasikkumar answer but with rbenv

   $ rbenv versions

it will show:

   1.8.7-p370
   * 1.9.3-p194 (set by /PATH_NEEDED/.ruby-version)

(Optional) If 1.8.7-p370 doesn't appear

   $ rbenv install 1.8.7-p370

then you should specifiy the rbenv version, by using the following command

   $ rbenv local 1.8.7-p370

( local because it will be used on PATH_NEEDED but you can use global for general use)

then you can try to list the jobflows . . .

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top