Error while connecting to AWS EMR cluster from mac - macos

I'm trying to create 3 node AWS EMR cluster. I have also create a key to connect to cluster from macOS with command :
ssh -i ~/Downloads/BigdataKey.pem hadoop#ec2-xx-xx-xx-xx.ap-south-1.compute.amazonaws.com
But its giving error :
192:Downloads nageshsinghchauhan$ ssh -i ~/Downloads/BigdataKey.pem hadoop#ec2-xx-xx-xx-xx.ap-south-1.compute.amazonaws.com
ssh: connect to host ec2-xx-xx-xx-xx.ap-south-1.compute.amazonaws.com port 22: Operation timed out
Any one please help me out, I'm trying this for the first time using macOS.

The solution I found is that:
Go to EC2 security groups and and open "ElasticMapReduce-master".
Under Inbound tab, click edit.
Add rule, and provide Type = All TCP, port range = 0-65535, source = MyIP.
now go to terminal and provide permission as :chmod 400 my-key-pair.pem
Last step, try SSH to your cluster via your key from mac.
It's Done :)

Related

Cassandra: target machine actively refused it

I am trying to run Cassandra (CQL Shell) and I am receiving the following error, I have tried all the google responses to existing questions, nothing has fixed it so far.
Connection error: ('Unable to connect to any servers', {'127.0.0.1': error(10061, "Tried connecting to [('127.0.0.1', 9042)]. Last error: No connection could be made because the target machine actively refused it")})
Before installing Apache Cassandra, JDK must be installed.
Can you make sure the IP address is set correctly on your rpc_address setting in your cassandra.yaml file, on your cassandra server.
Also, you need to make sure port 9042 is open and available for incoming traffic (if your IT department is setting up servers, it is possible this port is blocked, unless otherwise specified...)
Hope it helps.
I also faced the same issue , but may be the below 2 way's can help :
Option 1 :
In my case i haven't started the Cassandra Server and was directly trying to connect to Cassandra.
(a) Firstly start the cassandra server via cmd --> \bin>cassandra.bat -f
and then
(b) Try to connect to it's node --> \bin>cqlsh.bat -u cassandra
Option 2:
Try changing the rpc_address in your cassandra.yaml file to eihter 127.0.0.1 instead of localhost
or to 0.0.0.0 instead of localhost
and then again start the server from new CMD.

Google Cloud Platform - SSH/Telnet

I am running apps on Compute Engine. I run on a Windows box and use Putty to connect to the CE. This pretty much seems to work fine (leaving aside the problems in the Google doc on this).
I have set up another user who I want to enable for SSH (on a Mac) and have her use FileZilla to push files to the CE.
I am trying it out on my own Mac. I set up 2 firewall rules with 2 different priorities for tcp:22 =
myssh Apply to all IP ranges: 0.0.0.0/0 tcp:22 Allow 1000 default
default-allow-ssh Apply to all IP ranges: 0.0.0.0/0 tcp:22 Allow 65534 default
The user has permissions on of the Project of: "Compute Instance Admin(v1)"
On the Mac terminal I do the following:
ssh-keygen -t rsa -f ~/.ssh/userfirstname-ssh-key -C [googleusername.gmail.com]
I go to the GCP CE Meta data (logged in as myself) and then copy the contents of the userfirstname-ssh-key.pub to the Metadata/SSH Keys and save.
After GCP gives the ok on the key being added I enter the following in the Mac terminal:
ssh -i [userfirstname]-ssh-key [googleusername.gmail.com]#gcp-external-ip
Depending on i-don't-know-what, sometimes it says "Permission denied (public key)", "Operation timed out"
I've repeated this a few times and just tried to telnet in to the gcp-external-ip and get "Operation timed out" telnet: Unable to connect to remote host.
At a complete loss. Please help.
You could (and should) use the gcloud command line tools. Then it is easiest to simple copy the correct gcloud command from the Web Console. There is a little drop-down menu next to 'SSH' for each of your instances.

Presto installation error

Im trying to install presto on a cluster, but when im trying to deploy/ install presto server through the several nodes it gives an error on every node:
Fatal error: [host1] Needed to prompt for a connection or sudo password (host: host1), but input would be ambiguous in parallel mode.
Does anyone know where the problem came from?
That error comes when you don't have SSH connectivity between the node running presto-admin and the nodes in the cluster. The default user for the connection is root, but that can be changed by modifying config.json. Either set up passwordless SSH or specify the SSH password via --password (or -I for an interactive prompt). See the docs for more on this: https://teradata.github.io/presto/docs/current/presto-admin/ssh-configuration.html.

Why am I getting a connectionTimeout error while trying to update my chef node?

I keep getting this error on the Chef tutorial while trying to update my node. Its very strange because I was able to bootstrap in and ssh in using the same credentials. I have also confirmed that my security for inbound ports for 80, 20 and 443 were open. For the life of me I can't understand why it's holding up here. I am using MacOSX and terminal with an AWS virtual.
WARNING: Failed to connect to 172.31.46.107 -- Net::SSH::ConnectionTimeout: Net::SSH::ConnectionTimeout
knife ssh 'name:node1-centos' 'sudo chef-client' --ssh-user centos --identity-file /Users/gavindevops/.ssh/GavinChefKeyPair.pem --attribute ipaddress
SSH uses port 22. Was that a typo in the question or in the security group?
Okay so turns out even if you're using key based authentication, scroll down to the user name and password instructions part of the tutorial because it tells you to use "cloud.public_hostname" in place of "ipaddress" if you are using a service like AWS.

Connection ec2 instance operation timeout error using ssh

After creating a new instance,I am trying to access my instance like below:
ssh -i private_key.pem root#my_instance_public_domain
but the operation is timing out,I have updated the private key file permission using
chmod 400
and also edited default security group by adding a new in bound rule,selecting SSH and source Ip as 1.12.34.0/32
but getting port 22: Operation timed out .
what I am missing.
Thanks in advance
For testing to get this working you'll probably want to set your rule to 0.0.0.0/0.

Resources