-4

I've been having issues with ssh connections terminating, and thought it might be better to install mosh on the emr master - this way there would be some protection from loss of connectivity. I've created the following script to act as part of my bootstrap, but when I run it, I'm having a few issues.

#!/bin/bash

#
# Make sure we've got git, autoconf, automake, protobuf-compilers
#

sudo yum install -y \
    git \
    autoconf-2.69-11.9.amzn1.noarch \
    automake-1.13.4-3.15.amzn1.noarch \
    protobuf-compiler-2.5.0-1.8.amzn1.x86_64 \
    protobuf-2.5.0-1.8.amzn1.x86_64

#
# Pull the latest code from github
#

cd /home/hadoop
git clone https://github.com/keithw/mosh

#
# Build and install
#

cd mosh
./autogen.sh && ./configure && make && sudo make install

Currently this falls over on the configure step with the following:

checking for protobuf... no
configure: error: Package requirements (protobuf) were not met:

No package 'protobuf' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

I've tried setting PREFIX=/usr and PKG_CONFIG_PATH=${PREFIX}/lib64/pkgconfig, then running ./configure with --prefix=$PREFIX - that doesn't help, I've also tried installing the 32 bit package, which also didn't help. This would all be easier if there were a source for sudo yum install -y mosh, however yum whatprovides mosh comes back empty.

Any pointers would be welcome!

Jean-François Corbett
  • 37,420
  • 30
  • 139
  • 188
theheadofabroom
  • 20,639
  • 5
  • 33
  • 65
  • 7
    please don't addend a question which has been answered (especially one with a bounty) with a new question created by the answer. It's much better (and less confusing to future readers) to award the answer, and post a new question, with links to the original question and answer if they provide context. If someone tries to answer now, are they answering the installation question or the nat question? and which is the bounty on?..... – Claies Jun 09 '15 at 17:42
  • @Claies the bounty is on the question precisely as it was when it was placed, however the answer as it is does not solve fully the issue of getting mosh up and running on an emr instance - I don't believe that anyone would arrive at this question looking for a solution that did not result in a working set-up. It's not really successfully installed if there is a load of residual configuration to be done. My intent is that by the time this question has an accepted answer, my past self could have looked at this question and used it to get things set up without needing any external resources. – theheadofabroom Jun 09 '15 at 17:48
  • 7
    It still looks like 2 separate questions to me; I just generally find it less confusing if you are able to limit your question to one answerable segment at a time. As it is now, you'll have one answer with an awarded bounty and *possibly* some other answer as the accepted, which isn't really clear. – Claies Jun 09 '15 at 17:52
  • @theheadofabroom, I think you problem is in AWS security group, – mr0re1 Jun 09 '15 at 21:04
  • 3
    Two questions is the correct way to go. You can write the result of your N questions somewhere, you can link this question from your new question and even add a link here to the new question... – Eric Levieil Jun 10 '15 at 23:51
  • 4
    @theheadofabroom: It's two separate questions. Think of it this way: The first question was "How do I unlock my car?" And that was answered. Now you're saying "Why won't my car start?" *Different* question. – T.J. Crowder Jun 11 '15 at 07:45
  • Except the answer to the second question is that you haven't finished unlocking it. Generally if agree, but with the specifics of this question, the second part was already implied - the update only makes it explicit – theheadofabroom Jun 11 '15 at 08:15
  • One question per question, please. I removed your second question; feel free to post it as a new question if relevant. – Jean-François Corbett Jun 11 '15 at 08:42
  • 1
    Your question is [discussed on meta](http://meta.stackoverflow.com/q/296489/1393766). Anyway if you have additional question you should post it as separate one. You can add link to your previous question, but make sure that link will not be only source of knowledge about your problem. So next time try creating question like "This is follow up of [this question]. So I tried to do foo() but bar() happened which I solved with baz(), but now I have problem with xyz. What could be the cause and how to solve it? I suspect that it can be caused by X so I tried Y but it didn't solve my problem". – Pshemo Jun 11 '15 at 10:40
  • Except to know the car won't start, by definition it has to be unlocked or you couldn't get inside to try and start it. Modifying the very meaning of the question after you've received answers to it is inappropriate, as it can invalidate those answers and negatively impact the individuals who posted them if they receive downvotes for their (now) incorrect answers. Changing the entirety of the question's intent after it's been answered is referred to here as a *chameleon question*, and they're not acceptable. – Ken White Jun 11 '15 at 22:07
  • Please see the update I made. It doesn't entirely change the question, it clarifies that the answer was incomplete. The answer had solved one part of the problem, but the end result is still something that would have left future visitors in the dark as to why it still want working. I don't know why I'm still debating this, I've received more help, which should be useful to later visitors, and I'm reasonably confident that when I test it tomorrow it'll work. – theheadofabroom Jun 11 '15 at 23:39

1 Answers1

4

It depends on which version of AMI you make an installation. There is a changes you need to make to build it on AMI 3.7.0:

  • Do not specify particular version of protobuf package.

    There is protobuf version 2.5.0-1.10 on new AMIs

  • Additionally install package protobuf-devel

So your yum install command should look like this:

sudo yum install -y \
  git \
  autoconf-2.69-11.9.amzn1.noarch \
  automake-1.13.4-3.15.amzn1.noarch \
  protobuf-compiler \
  protobuf \
  protobuf-devel

UPD:

Don't forget to modify your ElasticMapReduce-master security group to open UDP port 60001.

  • Go to the AWS EC2 WebConsole / Network & Security / Security Groups;
  • Pick an ElasticMapReduce-master security group from a list;
  • Go to the Inbound tab and and a new rule for UDP port 6001.
mr0re1
  • 1,515
  • 2
  • 10
  • 18