I can't connect to my AWS Ubuntu instance via Putty, before everything was fine, I connected via putty, the security group was configured, port 22 SSH was open for incoming calls.
But when I started Nginxs I could not connect via Putty with error "connection timed out", if I type IP in the browser, I see that nginxs is working, but IP does not ping ...
Related
I connected to ssh remotely and did all the server setup, but then when I tried to connect to do some things, I started getting the "timed out" error.
Example using browser:
In "Security Groups", the ports are correctly configured, including an SSH with "MyIp" in source:
And the instance is running normally, i can access my back-end etc. And the status is running
PS: i also restarted the instance etc.
I am using an Amazon EC2 instance for the last 2 months but today I am unable to connect to it. Earlier I was connecting using ssh and the service is still running (http://ec2-13-233-199-251.ap-south-1.compute.amazonaws.com).
Last night I tried to add an SSL certifcate from Let's Encrypt using this blog: https://www.digitalocean.com/community/tutorials/how-to-secure-apache-with-let-s-encrypt-on-ubuntu-16-04
After that, when I try to connect to the EC2 instance using ssh as:
ssh -i "majorPillar.pem" ubuntu#ec2-13-233-199-251.ap-south-1.compute.amazonaws.com
I am getting connection time out error.
I checked my security group and port 22 is open and other inbound and outbound rules are correct. How can I connect to my instance now?
the port 22 in your server does not respond, 443 port refuses connections.
Double check your configuration in aws console:
inbound traffic configuration on port 22, ensure your ip address has access to that port.
For example:
nc -zv 13.233.199.251 22
The https certificate install should not have side-effects on ssh config.
Anyway, check /etc/ssh/sshd_config configuration file too and ensure ssh port is the one you want (22?)
sudo grep Port /etc/ssh/sshd_config
I'm trying to launch a socket server on Amazon EC2. It binds the socket to 0.0.0.0:5000 and then listens on this port, printing every incoming message
However, when I simply try to connect to ec2-18-x-x-x.us-east-2.compute.amazonaws.com:5000 via Chrome, it throws an error: ERR_CONNECTION_TIMED_OUT. Of course, when I try to connect to it with a client using socket.connect(), a client is also unable to set up a connection.
I've already added the port to the security group inbound rules like that:
netstat -a shows that this port is open:
I use the public DNS IPv4 address, that is stated in instance description.
As I've successfully launched the server and tested netstat, it's obvious I can connect to EC2 using RDP.
Guided by this troubleshooting manual, I've also checked the route table for subnet and ACL for subnet, but everything was OK.
What's the problem then?
netstat is simply showing that some process is listening on that port, not that the port is "open". You still need to open port 5000 in the Windows firewall.
I installed memcached on AWS EC2 Ubuntu, and I can connect it by telnet in the server:
telnet localhost 11211
But how can I connect it from other machine? I know the interval ip is 172.31.17.208, but when I try to connect it from another EC2 by:
telnet 172.31.17.208 11211
the response is
Could not open connection to the host, on port 11211: connect failed.
You will need a Public IP/ Elastic IP if you want to access your Memcache from outside of the AWS.
Your internal IP will work within the VPC and not outside of your VPC. I am guessing the another instance that you are trying to access is not in the same VPC. Try pinging your Memcache server from another instance and check if it is resolved using internal IP.
Edit:
Apart from this, you might need to check your security group and make sure the ports are open for incoming connection.
I created a new Ubuntu T2 Micro instance on EC2.
Created a new Elastic IP and selected "EIP used in: VPC"
Associated the address to my new EC2 Ubuntu instance.
I now have a Private IP and a Public/Elastic IP. No Public DNS.
My security group has SSH port 22 and HTTP port 80 open.
I can connect to the instance just fine through SSH using the Public IP, but when I try to browse to the Public IP through the browser it says connection refused. I can't ping it either.
I'm out of ideas.
Amazon EC2 HTTP connection refused, but HTTP port is open
That's already proven by the fact that you got 'connection refused'. If the port wasn't open it would have been 'connect timeout'.
'Connection refused' means that the service you tried to connect to wasn't listening at that port. Possibly it isn't started at all, or even installed.
You need to install a web server on your machine, such as Apache or Nginx. This is not provided by default in EC2.
go to security groups --> edit inbound rules --> add rule (add a custom TCP port 8888 with 0.0.0.0/0 ).
There are two major things that can happen to your web server.
Connection refused :- Which means there is no service running (http/JBOSS/nginx) on your server which is available to accept connections on port specified (which is 80 in this case)
Connection timed out :- Would mean server is not able to process any incoming connection hitting it at port 80. Once you fix the security group and your NACL (if you don't have a default one), then you need to re-check to see if it's service which is giving out the error, not to forget that the error response will change.