I have aws linux ubuntu ec2 t2.micro instance with django application deployed, recently I installed boto3 and django-storages on my ec2 instance and created s3 bucket, after which I was unable to makemigrations on my django project as it kept saying
"-bash: fork: Cannot allocate memory issue in EC2 "
after which I stopped and started ec2 server and then I am unable to access ec2 via command line or ftp, even with new public ip. it says
"ssh_exchange_identification: read: Connection reset by peer"
ftp connects sometimes but then few moments later it again says
"Error: Connection reset by peer
Error: Could not connect to server"
need some help here that if issue is due to my storage or usage limit or for some other reason?
Thanks,
Bilal
Related
Stopped reason "Error response from daemon: create ecs-parser-api-dev-45-allsorter-efs-c4c8df9386aaff820100: Post http://%2Frun%2Fdocker%2Fplugins%2Famazon-ecs-volume-plugin.sock/VolumeDriver.Create: dial unix /run/docker/plugins/amazon-ecs-volume-plugin.sock: connect: connection refused"
AWS ECS EC2 based:
It was working fine. suddenly a new revision came and it didn't run the new revision but it stopped with above error
This indicates a problem with the ECS volume plugin and not necessarily a permissions/security group issue between ECS and EFS.
Replace your instances and ensure you are running the latest ECS AMI (or ECS agent if you have a custom AMI). That should resolve the issue.
About 6 months ago I created an AWS EC2 instance to mess around with on the free tier. After months of having no issues remoting into my AWS EC2 server, I've recently been unable to access it via SSH. I am using the following command:
ssh -i my-key-pair.pem ec2-user#ec2-**-**-***-***.us-****-*.compute.amazonaws.com
...and after a minute or two, am getting this response
ssh: connect to host ec2-**-**-***-***.us-****-*.compute.amazonaws.com port 22: Operation timed out
What's strange is that
1) I can read and write to my RDS database just fine
2) I can ping into the server
3) My port 22 is open
4) The instance is running and healthy
5) In the Inbound section of the security group of the EC2 server it allows for all traffic and SSH from any location via port 22.
6) I'm using the same key-pair as always
I went through this documentation (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/TroubleshootingInstancesConnecting.html) and can confirm that the VPC, subnet, network ACL and route tables all line up (I haven't changed anything with those since the SSH stopped working). Any insight would be extremely helpful!
Sometimes the instance fails, you can check the screen of it via AWS
console.
Run another instance in the same security group and try to
connect to it and then from there to your original one - to verify if
ssh is still open (even if you do not have the ssh key, the error
will not be 'timeout')
You can create a snapshot of your instance and
attach it as another volume in a new one and you can investigate
logs, maybe something went wrong.
You can restart the instance, if
for example i ran out of memory it will most likely work after the
reboot (hopefully for a long enough time for you to investigate).
You can contact AWS support.
I created EC2 instance in aws server and status is also showing fine, in which installed mosquitto broker and also configured security group with port 1883.
I was able to publish commands to the broker but suddenly when I try to publish commands to the broker with elastic ip address, I am getting connection was lost error from past 3 days.
Any suggestions?
I have a nodeJS app deployed to Amazon Elastic Beanstalk and uses Application Load Balancer.
The problems is - once in a while instance stop responding. When I try to get logs, I see:
requestEnvironmentInfo is starting
and a timeout as a result.
I simply cannot access logs, even when I do eb shh I get:
INFO: Attempting to open port 22.
INFO: SSH port 22 open.
INFO: Running ssh -i /Users/Rostyslav/.ssh/cards-eb-keypair ec2-user#xx.xxx.xxx.xx
ssh_exchange_identification: read: Connection reset by peer
ERROR: An error occurred while running: ssh.
I also have set up logs auto-transfer to S3, but after instance get stacked - no new logs there anymore.
If I kill the EC2 instance and Load Balancer creates a new one and problem get fixed. However in usually ~1 day the same thing is happening.
Any ideas about why it is happening? Thank you!
I had successfully used putty to login into Debian-8.1 on AWS by using key file. Once I upgraded debian using the command apt-get upgrade and tried to login through putty, it shows the error which i mentioned below:
putty fatal error: network connection refused
How can i resolve this?
I think Kernal Upgrade , Reboots the system in Linux and if you have not allocated Elastic Ip to the instance , the Ip would have have changed.
Did you Check the Instance IP ? Are you able to Login via Web based Interface from EC2- Console ?